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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -