Vim-Friendly Keyboard
Vim is the fastest editor I know because you can operate it with the keyboard. Only the long distance to the Escape key is annoying. But Linux would not be Linux if you could not change the keyboard mapping yourself.
IMHO the CapsLock key is quite superfluous. Therefore I have mapped Escape to the CapsLock key and use the even more superfluous Break key for CapsLock functionality.
Changing the keyboard mapping is easy. First create ~/.Xmodmap with this content:
!! map CapsLock functionality to the "Break" key keycode 110 = Caps_Lock !! map Escape to the CapsLock key keycode 66 = Escape !! clear CapsLock and map it on "Break" clear Lock add Lock = Caps_Lock
Then you have to make sure that .Xmodmap is loaded at login. The KDE keyboard settings tend to overwrite earlier settings, therefore I load my .Xmodmap late enough in a script inside the KDE autostart folder:
xmodmap /home/cb/.Xmodmap
If you want to modify the keymap of the virtual consoles also (this time without changing Break), create the file /usr/share/kbd/keymaps/i386/qwertz/escape-capslock.map with this content:
include "de-latin1-nodeadkeys.map.gz" # enter your local keytable here keycode 58 = Escape alt keycode 58 = Meta_Escape
Then change your keyboard layout in /etc/sysconfig/keyboard:
KEYTABLE="escape-capslock.map"
That’s it. With this little change of the keyboard layout, working with vim is more comfortable and faster.
No comments yet