lyokha / vim-xkbswitch

vim plugin for automatic keyboard layout switching in insert mode
MIT License
481 stars 23 forks source link

Vim-xkbswitch conflicts with delimitMate #20

Closed myshov closed 9 years ago

myshov commented 9 years ago

DelimitMate - this is a very popular plugin for automatically closing pairs of chars (', ", [, () and it does other realted stuff.

I was trying to install it and find out that delimitMate cause insertion chars ', [ and ]instead of э, х and ъ resprectively. When I troubleshooted that problem I found out that without vim-xkbswitch being loaded this plugin works without errors.

Is it problem of vim-xkbswitch or delimitMate itself?

By the way here is realated issue from delimitMate's repository, hope it helps maybe https://github.com/Raimondi/delimitMate/issues/13

lyokha commented 9 years ago

This happens because delimitMate defines its own Insert mode mappings for those symbols and vim-xkbswitch translates them to appropriate symbols from Russian keyboard layout. The easiest way to fix it is to define

let g:XkbSwitchSkipIMappings = {'*'   : ["'", '"', '[', '(']}

in .vimrc. See also README to vim-xkbswitch where a similar issue with omnicompletion is given as an example.

myshov commented 9 years ago

Thank you! It works!