Bug#233008: vim: inconsistent handling of special chars in langmap definition

James Vega jamessan at debian.org
Mon Jan 28 01:42:04 UTC 2008


On Mon, Feb 16, 2004 at 11:34:04AM +0100, Tomas Hoger wrote:
> Help for langmap states:
> 	Special characters need to be preceded with a backslash.  These are
> 	";", ',' and backslash itself.
> 
> I experimented with it for a while and here are my findings:
> 
> - ',' does not need to be escaped in many cases:
>   set langmap=,a
>   set langmap=iI,,a

This does seem to do some pseudo-intelligent handling based on how many
characters are present.  This could probably be improved to require
escaped commas.

> - ';' and '\' needs to be double-escaped
>   set langmap=\\a    ->  E357
>   set langmap=\\\\a  ->  ok
>   set langmap=\;a    ->  E357
>   set langmap=\\;a   ->  ok

As noted in ":help option-backslash", backslashes need to be doubled if
they're to be considered literal.  Your experimentation reflects this
properly.

> - '"' needs to be escaped too
>   set langmap="a     ->  no error, it just does not work
>   set langmap=\"a    ->  ok

" is Vim's comment character which is why the first one does nothing and
the second one works as expected.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080127/ba8fe900/attachment.pgp 


More information about the pkg-vim-maintainers mailing list