Friday, November 20, 2015

Re: Question about language specific mappings

On Fri, Nov 20, 2015 at 9:23 PM, Dmitri Vereshchagin
<dmitri.vereshchagin@gmail.com> wrote:
> Thank you Tony. But the question is how to disable one particular
> mapping provided by keymap script.
>
> The problem is that keymap I am using maps number sign `#' to numero
> sign `№'. The former is much more useful for me and the latter I can
> input using digraph. So I would like to disable only this particular
> mapping from entire keymap.
>
> I guess that there is always possibility to copy keymap script to
> ~/.vim/keymap and edit it. But is there any other ways to do what
> I want?
>
> --
> Dmitri Vereshchagin

In that case, I think Andy's autocommand might work; but I would copy
the keymap script to ~/.vim/keymap, give it another name, change its
b:keymap_name setting accordingly, and give that particular keymapping
another {lhs}, maybe N° (capital N followed by the degree sign). The
downside of this particular {lhs} is that you won't see a capital N
(or whatever it is lmapped to) appear until after a timeout, a cursor
move, or after you follow it by either a character other than °, or by
going out of Insert mode. In my own "russian-phonetic" keymap I have
this exact mapping, as set by the following line:

N° № U+2116 NUMERO SIGN

and I hardly even notice that when I hit the N key (to get a Cyrillic
Н 'en') the Н doesn't appear immediately. Maybe I type too fast for
that: sometimes when 'imi' is set wrong (0=Latin instead of
1=Cyrillic) it happens that I type three or four words before I look
at the screen and see that they have all been taken literally as Latin
script. (I am currently slowly compiling a Russian-French dictionary,
and that kind of text of course requires constant switching between
alphabets.)


Best regards,
Tony.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: