Christian Brabandt wrote:

> > > Bram,
> > > what is the reason, setting 'lmap' applies to when a mapping is 
> > > remapped?
> > 
> > I can't remember.  I believe it has always been this way.  Perhaps not
> > intentionally.
> > 
> > > Consider this:
> > > ~$ cat lmap.vim
> > > imap <tab> <Plug>MyPluginEcho
> > > imap <Plug>MyPluginEcho <c-r>="hello"<cr>
> > > cmap <tab> <Plug>MyPluginEcho
> > > cmap <Plug>MyPluginEcho <c-r>="hello"<cr>
> > > " set lmap=i;k
> > > 
> > > run vim -u lmap.vim -N
> > > and type <tab> in insert mode, note, how "hello" is printed in either 
> > > insert mode or command line mode.
> > > Now do
> > > :set lmap=i;k
> > > and do it again. Note that <Plug>MyPluginEcho will be output. 
> > > 
> > > The problem is, setting lmap breaks plugins (see e.g. here:
> > > http://stackoverflow.com/questions/12450803)
> > > 
> > > I would consider this is a bug and actually think, that setting 'lmap'
> > > should never be applied to when recursively resolving a mapping. 
> > 
> > Since langmap is supposed to map typed characters, it makes sense that
> > the RHS of a mapping is not langmapped.
> > 
> > > Also, I do not understand what this part of the help is trying to say:
> > > 
> > > ,----[ :h 'lmap' ]-
> > > | This will allow you to activate vim actions without having to switch
> > > | back and forth between the languages.  Your language characters will
> > > | be understood as normal vim English characters (according to the
> > > | langmap mappings) in the following cases:
> > > |  o Normal/Visual mode (commands, buffer/register names, user mappings)
> > > |  o Insert/Replace Mode: Register names after CTRL-R
> > > |  o Insert/Replace Mode: Mappings
> > > | Characters entered in Command-line mode will NOT be affected by
> > > | this option.   Note that this option can be changed at any time
> > > | allowing to switch between mappings for different languages/encodings.
> > > | Use a mapping to avoid having to type it each time!
> > > `----
> > > 
> > > What are the language characters? What is the relationship to lmap 
> > > mappings?
> > 
> > Language characters is what comes out of the keyboard when switched to a
> > specific language, e.g. Greek.  Then the "a" key produces the "α"
> > character.
> > 
> > It's possible that this was only tested for when the keyboard produces
> > non-ascii characters.
> > 
> > > This patch could fix it, but I am not sure, this fixes it correctly.
> > 
> > I think you need to compare mlen to typebuf.tb_maplen.
> 
> Okay, here is a patch, that does that when the new option 'langnoremap' 
> is set (which defaults to off for backwards compatibility)

Thanks.  I'll leave it to others to try it out.

Perhaps we should set the 'langnoremap' option in vimrc_example.vim
script.  Most new users will want it on.

-- 
This is an airconditioned room, do not open Windows.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" 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/d/optout.

Raspunde prin e-mail lui