'langmap' interaction with :nmap and <Plug> and/or <SID>

3 views
Skip to first unread message

Nikolai Weibull

unread,
May 14, 2008, 3:23:40 PM5/14/08
to Vim development list
'langmap' interacts with :nmap and that's fine. However, it also
interacts with :nmap when the rhs is a <Plug> or <SID> mapping.
That's not fine. Am I missing something, or is this a bug?

Here's a test:

nmap t <SID>bug

nnoremap <SID>bug <Esc>:echoerr "actually, i'm not a bug if this is
echoed as an error, despite what you might think"<CR>

set langmap=gj

Now, pressing t will not display anything. However, after executing

set langmap=

pressing t will display the error.

Bram Moolenaar

unread,
May 19, 2008, 1:49:42 PM5/19/08
to Nikolai Weibull, Vim development list

Nikolai Weibull wrote:

The problem appears to be that 'langmap' applies to recursive mappings.
It should only be used once, on the characters that are typed by the
user. Not on characters that end up in the typeahead buffer from the
RHS of another mapping.

Thus it's not directly related to using <SID> or <Plug>, although <SID>
things would never be typed by the user.

--
Every person is responsible for the choices he makes.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages