vim-xkbswitch
vim-xkbswitch copied to clipboard
restore keyboard layout on vim exit
I just installed the plugin and it works really nicely. Just one thing, I haven't figured out how to do, is: How can I restore my original key map as opposed to the normal mode one, when exiting vim.
I use swiss layout for typing text and us for vim normal mode. So I'd like vim to go back swiss layout, once I exit vim, as opposed to staying us. Is there any way to do that?
Hmm, a good point! It is not implemented but it's easy to do. Wait a minute...
Try updated version.
I'll leave it open because current implementation works well only in terminals (which is rarely needed in practice), but gvim has issues both in Linux and Windows (see comments to commit 1e5d4c9).
- In Windows with global keyboard layout switching configuration it does not work for unknown reason.
- In Linux there are confusing interactions with keyboard layout switching layers like xneur.
This issue requires further investigations for gvim. In any cases the feature is not required at all when the system keyboard layout switcher is configured on per-window basis.