Thursday, April 8, 2010

Re: Conflict between lmap and imap

On 08/04/10 11:08, Israel Chauca F. wrote:
> I'm having problems with imap<buffer> overriding lmap:
>
> 1. start vim
> 2. :set keymap=russian-jcukenwin (you can use other)
> 3. :imap<buffer> [ ()
> 4. :set iminsert=1
>
> Now inserting "[" will map to "()" (the imap for [) instead of "х" (the lmap for [). If I switch steps 1 and 2 or use global imap, everything works fine.
>
> Is that the expected behaviour?
>
> Cheers,
> Israel
>

What happens if you use

2bis. :setlocal imi=0

then later set 'imi' to 1 (or use Ctrl-^ in Insert mode) to enable lmaps
again: does it now switch between [ -> () (imap, imi=0) and [ -> х
(lmap, imi=1) ?

see
:help 'iminsert'
:help i_CTRL-^


Best regards,
Tony.

P.S. I use a different Russian keymap (own-coded, see attachment), with
more dead keys but less overlap. It does not require memorizing the
"usual" location of the characters on Russian keyboards. Use it or not,
it may or may not suit you. You may want to comment away line 20 (the
lCursor highlight, which is global).

--
Rule 46, Oxford Union Society, London:
Any member introducing a dog into the Society's premises shall
be liable to a fine of one pound. Any animal leading a blind person
shall be deemed to be a cat.

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

To unsubscribe, reply using "remove me" as the subject.

No comments: