vim-xkbswitch icon indicating copy to clipboard operation
vim-xkbswitch copied to clipboard

restore keyboard layout on vim exit

Open DanielFabian opened this issue 10 years ago • 3 comments

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?

DanielFabian avatar Jan 17 '15 11:01 DanielFabian

Hmm, a good point! It is not implemented but it's easy to do. Wait a minute...

lyokha avatar Jan 17 '15 13:01 lyokha

Try updated version.

lyokha avatar Jan 17 '15 13:01 lyokha

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).

  1. In Windows with global keyboard layout switching configuration it does not work for unknown reason.
  2. 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.

lyokha avatar Jan 18 '15 10:01 lyokha