On Thursday, September 20, 2012 1:56:46 AM UTC, Alex Ogier wrote:
> Currently, langmap applies in some limited fashion to the right side of
> mappings. For example, the following from normal mode will delete until the
> end of a line:
>
> :set langmap=xd
> :nnoremap z x
> z$
>
> Strangely this doesn't apply to all cases transparently, for example, the
> following might be expected to delete a single line, but in fact it just
> blinks the cursor:
>
> :set langmap=xd
> :nnoremap z x
> zz
>
> This is all a bit wacky, since it follows that if someone has a binding
> (especially a noremap binding) they want the right side to execute as if in a
> pristine environment. For example, if someone has made a mapping, ":nnoremap
> <leader>d yyp" they presumably want a binding to duplicate a line -- not, say
> undo twice and delete a character because they have "yu,px" in their langmap.
>
I agree, I'm using bépo (a dvorak inspired french keymap) and this is exactly
the behaviour I imagine for langmap.
> This is all a bit weird but manageable if you are in control of all your
> mappings. What it really breaks is plugins. For example, a common pattern is
> to have two levels of mappings: one containing a bunch of mappings prefixed
> with <Plug> that are always installed, and another set that is conditionally
> installed with some convenient defaults, often short patterns containing
> <leader>. For example, excerpted from tpope's vim-surround plugin[1]:
>
> nnoremap <silent> <Plug>Dsurround :<C-U>call
> <SID>dosurround(<SID>inputtarget())<CR>
> nmap ds <Plug>Dsurround
>
> This is totally non-functional if any of the characters in "Dsurround" is
> included in langmap, as they will get translated on the right side of the
> 'ds' mapping. It's especially weird when people have insert mappings. For
> example, ervandew's SuperTab[2] ships with the following mappings:
>
> imap <script> <Plug>SuperTabForward <c-r>=<SID>SuperTab('n')<cr>
> exec 'imap ' . g:SuperTabMappingForward . ' <Plug>SuperTabForward'
>
> If you have a langmap affecting any of the characters in 'SuperTabForward'
> then hitting tab in insert mode fails noisily with the bizarre behavior of
> inserting the string "<Plug>SuperTabForward" into the document at the current
> position.
I'm experiencing the same issue here (archlinux and debian), so I use a long
list of noremap[1] instead, which is not really what I'm looking for.
Regards,
--
Dettorer
[1] http://paste.awesom.eu/j07
--
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