How to automatically change keyboard layout on switch to vim normal-mode? -


sometimes use vim write non-us text, , when wanna use command in normal mode, need change layout us. it's possible automatically?

ps. can mapping this, in case command looks :ц instead :w - not pretty , typo-risk.

update

i don't want use keymap option, because prefer switch languages capslock. i've try write autocmd insertleave event, failed...

update 2

probably know, why following not work?

function setuslayout()   !setxkbmap us,ru endfunction  autocmd insertleave * call setuslayout() 

:help langmap 

is provide info need.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -