On Dec 9, 10:44 am, Tony Mechelynck <[email protected]>
wrote:
> What you are missing is documented under :help option-backslash
>
> In order to get a backslash in the value of an option, you need two in
> the :set statement; in order to get two, you need four. Similarly, if
> you want a space, a tab or a vertical bar to be part of the value of an
> option, you need backslash-escaping in the :set statement.
>
> When it is said under 'langmap' that "special characters must be
> preceded by a backslash", it means they must be preceded by a backslash
> in the _value_ of the option; but _setting_ that value already halves
> the number of backslashes in the :set command.
>

Thanks, Tony; it all makes sense now.

How about a change to :help 'langmap', so that it reads:

        The 'langmap' option is a list of parts, separated with commas.  Each
        part can be in one of two forms:
        1.  A list of pairs.  Each pair is a "from" character immediately
            followed by the "to" character.  Examples: "aA", "aAbBcC".
        2.  A list of "from" characters, a semi-colon and a list of "to"
            characters.  Example: "abc;ABC"
        Special characters ';', ',', and backslash itself need to be preceded
        in the option value with a backslash, meaning you must escape
        backslashes twice in a |:set| command.

        Example for mapping the first few alphabetic characters to their
        capitalized counterpart, and also mapping '\' to I and ',' to J: >
            set langmap=aA,fgh;FGH,cCdDeE,\\\\I,\\,J

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui