Wikia

Vim Tips Wiki

Changes: Map extra keys on non US keyboards

Edit

Back to page

(Comments)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 3: Line 3:
 
|previous=1323
 
|previous=1323
 
|next=1332
 
|next=1332
|created=September 10, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=Martin Krischik
 
|author=Martin Krischik
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
On a US keyboard, it is convenient to press <tt>[</tt> and <tt>]</tt> which each have their own key.
+
On a US keyboard, it is convenient to press <code>[</code> and <code>]</code> 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):
 
You can have the same convenience on non-US keyboards with a map like the following (this example is for a German keyboard):
Line 23: Line 23:
 
</pre>
 
</pre>
   
A key like <tt>ü</tt> is only useful in insert mode, and you can still use it in that mode.
+
A key like <code>ü</code> is only useful in insert mode, and you can still use it in that mode.
   
 
==Comments==
 
==Comments==

Latest revision as of 06:21, July 13, 2012

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.

CommentsEdit

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

Around Wikia's network

Random Wiki