Vim: set langmap = e; h breaks supertab module

I am new to Vim and trying to configure some plugins. So far, I have installed the pathogen, ash and supertab. The latter does not seem to work; pressing tab , while in insert mode just writes the string <Plug>SuperTabForward .

The problem only occurs with the following line in my vimrc (for better navigation using colemak layout):

 set langmap=hjklneiHJKLNEI;kniejhlKNIEJHL 

Without the line above, this works fine. After further experimentation, I narrowed it down to set langmap=e;h . This single line breaks supertab.

I'm too inexperienced with Vim to have a faint idea of ​​what is happening or how to fix it. Even a workaround is of interest.

+6
source share
2 answers

I figured out a workaround: Editing supertab.vim , replacing <Plug>SuperTab with <P>P , which causes strings like <Plug>SuperTabForward to become <P>PForward .

I believe this works because these lines no longer contain any letters involved in set langmap=hjklneiHJKLNEI;kniejhlKNIEJHL . Several issues have not yet been resolved. Is langmap an audition? It seems to me that the option explicitly exists to enable a display that only affects commands:

 When you are typing text in Insert mode the characters are inserted directly. When in command mode the 'langmap' option takes care of translating these special characters to the original meaning of the key. This means you don't have to change the keyboard mode to be able to execute Normal mode commands. 

It does not seem to me that it is always so that the presence of the langmap character displayed in the imap line, that is, in insertion display mode, has any meaning. If so, it will randomly break any plugin, such as SuperTab, which uses imap long lines. To illustrate how strange this is, if I do imap no yes , a jo entry is needed to invoke it. I do not know how this logic works.

+2
source

I had the same problem, but this workaround did not fit my case, so I posted my own question, and someone made a fix that fixes it:

Vim langmap breaks the plugin (bépo)

https://groups.google.com/forum/#!msg/vim_dev/QnNwLWhJ744/1qNcD7d9OvgJ (see last post)

A new parameter is introduced in this patch: langnoremap , which prevents langmap affecting such mappings during installation.

This may require a few more tests and may not be included in vim very soon, but it seems to work very well!

0
source

Source: https://habr.com/ru/post/900035/


All Articles