On 12/03/10 10:11, rameo wrote:
I'm working on an italian keyboard.

I would like to map the movement keys.

However I can't map the "ò" key on my keyboard.
I tried to insert the character "ò", with the unicode #000F2, with the
alt code<M-149>
nothing works.

Same for all other keys with accents
è,é,ù à
etc.


It is possible to map accented characters, with the following caveats:

- The charset your keyboard is sending must agree with 'termencoding' if nonempty, or, if 'termencoding' is empty, with 'encoding'. See http://vim.wikia.com/wiki/Working_with_Unicode about how to change 'encoding' (e.g. set it to UTF-8) without losing understanding with the OS about what the keyboard is sending.

- If you change 'encoding', then mappings and options defined before that with characters above 0x7F may become invalid, so you should change 'encoding' first, define the options and mappings afterwards, and have a ":scriptencoding" line (q.v.) early on in your vimrc to tell Vim with which charset the script is written.

- Because of the way Vim represents the Alt (or Meta) modifier, the following are synonymous to Vim (in Latin1 or, I think, UTF-8):

à (0xE0, a-grave) and <M-`> (Alt+0x60, Alt-backtick)
è (0xE8, e-grave) and <M-h> (Alt+0x68, Alt-h)
é (0xE9, e-acute) and <M-i> (Alt+0x69, Alt-i)
ì (0xEC, i-grave) and <M-l> (Alt+0x6C, Alt-l)
ò (0xF2, o-grave) and <M-r> (Alt+0x72, Alt-r)
ù (0xF9, u-grave) and <M-y> (Alt+0x79, Alt-y)
etc.

For each of the above pairs, if you have more than one map or unmap command having a member of that pair as the {lhs}, the last such map or unmap wins, and overrides all earlier ones for the same context (e.g. imap won't override nmap, and map <buffer> won't override what the key is mapped to in a different buffer). If the last one is a map (not an unmap), then

        :verbose map ò
        :verbose map! ò

should tell you what ò is currently mapped to in the various modes, and (in Vim 7.x) where that mapping was set. See :help map-listing about the special characters which Vim may display in addition to the {lhs} and {rhs} on the same line.


Best regards,
Tony.
--
Bizarreness is the essence of the exotic

--
You received this message from the "vim_use" 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

Reply via email to