Remapping the escape key
The first thing you need to do to make using
Remap Vim to the Caps Lock key to be a Ctrl key.
This serves two purpose:
It makes it much easier to invoke CTRL commands in vim, the shell, and all your applications.
More significant is that CTRL-[ is equivalent to hitting the Esc key.
You can remap the Caps Lock key in one of two ways:
1- Using a directive in /etc/X11/xorg.conf:
In your Section "InputDevice" section for the keyboard, add the line:
Option "XkbOptions" "ctrl:nocaps"
2- Using an xmodmap :
Create a file in your home directory called " .Xmodmap" with the following contents:
remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Control = Control_L
Refrence :
Kevin's Vim Tips and Tricks at :
http://www.8t8.us/vim/vim.html