Map extra keys on non US keyboards

From Vim Tips Wiki

Jump to: navigation, search
Tip 1326 Printable Monobook Previous Next

created 2006 · complexity basic · author Martin Krischik · version 6.0


On a US keyboard, it is convenient to press [ and ] which each have their own key.

You can have the same convenience on non-US keyboards with a map like the following (this example is for a German keyboard):

map ü <C-]>
map ö [
map ä ]
map Ö {
map Ä }
map ß /

A key like ü is only useful in insert mode, and you can still use it in that mode.

[edit] Comments

Enter is heavily used and - in Turkish Q keyboard layout - far from hand position so it is productive to use "ş" character as <cr> in normal mode. That way the keyboard characters are lay like G H J K L Ş which boosts performance. It is also possibly a good idea to use "ğ" as a mapleader key which lays just above Ş.


nmap ş <cr>
let mapleader = "ğ" " in your .vimrc file

Personal tools