Is there a way to change the keyboard layout in Vim on Windows?

1.5k views Asked by At

I am working on several documents where I have to type [ ] { and the like (which is much easier with with an american keyboard layout (and to which I am used much more)) but where I also have to type Umlauts such as ä, ö and ü.

Usually, I go be setting up the (what I believe to be a standard) Windows Shortcut Alt+Shift to switch between these layouts.

This is unpractical, because at times I am not sure if I am already in the german layout when I need the german layout (and vice versa).

So, is there a better way to change the keyboard layout in Vim on *OS-level"?

I guess it could be solved with changed :map and :imap but I'd rather not use these for such porposes unless really forced to.

4

There are 4 answers

0
ThiefMaster On

I don't think there is such an option - even though vim can even make pancake for you! It'd be highly unlikely for any program to allow changing the keyboard layout of regular keys since basically any OS already supports it.

0
idbrii On

I am not sure if I am already in the german layout when I need the german layout

Do you have the language bar enabled? It should have an icon that represents your current settings.

Microsoft Knowledgebase article: HOW TO: Use the Language Bar in Windows XP

0
Benoit On

Maybe you could be interested in some Dvorak layouts (mine is bépo, maybe it could suit you?)

0
Chris Truett On

If the only thing that you need is to add umlauts easily, Vim has built-in support for adding these characters:

Method 1. In insert mode type: CTRL-K a: to give ä.
Method 2. If you use :set digraph you can enter a<BS>: to give the same result.

These methods will work with any character that needs umlauts, just use CTRL+K o: or CTRL+K u: respectively.

Source: http://vim.wikia.com/wiki/Entering_special_characters