On 28/12/13 14:22, Alexey wrote:
On Saturday, December 28, 2013 3:05:29 PM UTC+4, Tony Mechelynck wrote:
On 28/12/13 10:35, Alexey wrote:

Hello,



i am using a Canadian Qwerty keyboard layout with dead keys for entering "^" and "¨" accents.  For 
example, typing what would be "[o" in US Qwerty produces "ô".



Is it possible to map a dead key in Vim (in Normal mode for example)?  I would like to remap 
the keyboard so that pressing the US Qwerty <[> key acts as "[" even in 
Canadian layout.



Thanks,



Alexey.





It is not possible to map only the dead key, because when you hit it the

keyboard interface (part of your OS or of X11 or…) sends nothing to Vim,

it waits until you hit the next key. You can map â ê î ô û ŷ or even, if

Thanks, but i do not think that Vim does not receive anything when i press a dead key: when in Insert mode i 
press the dead <^>, it shows "^", which turns into "ô" when i press <o>.

Alexey.

That might mean that the "dead key" feature isn't due to your keyboard interface but to some keymap or mapping (or maybe some langmap, but that's less likely): see (while editing the file in question)

        :help 'keymap'
        :verbose setl keymap?

        :help 'langmap'
        :verbose setl langmap?

        :verbose map! <Char-0x5E>

In that case, change the keymap or mapping to remove the multikey {lhs} starting with ^ (there should be more than one). On my system, the dead keys happen ahead of Vim, and e.g. also when typing this email in Mozilla SeaMonkey. See http://users.skynet.be/antoine.mechelynck/other/keybbe.htm for details of my keyboard layout.

IMPORTANT: DO NOT MODIFY-IN-PLACE A KEYMAP WHICH IS IN $VIMRUNRIME/keymap/ because any upgrade could undo your changes. Instead, copy it under another name in ~/.vim/keymap/ (on Unix) or ~/vimfiles/keymap/ (on Windows, but using Vim terminology) (while creating any directories which don't exist yet), make the changes there, then find where the keymap is invoked (e.g. with ":verbose setl keymap") and invoke the new one.

See also http://vim.wikia.com/wiki/How_to_make_a_keymap


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
58. You turn on your computer and turn off your wife.

--
--
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

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to