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.

(Visited 1 times, 1 visits today)
Tags: ,
Category: SUSE Linux Enterprise Desktop, Technical Solutions
This entry was posted Friday, 11 January, 2008 at 4:25 pm
You can follow any responses to this entry via RSS.

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet