Vim Tips Wiki
Advertisement
Tip 314 Printable Monobook Previous Next

created August 14, 2002 · complexity intermediate · author Alex A. Naanou · version 5.7


This is related to VimTip289 in terms of programmers (like I) too lazy to move their hands to reach the far away <esc> key. Actually the less your hands move around the faster you type.

Here is a small snippet from my mappings file, ready to speed things up. The key overloading might be a somewhat confusing at first.

imap <S-Space> <esc>l
imap <C-CR> <esc>o
imap <S-CR> <esc>O

nmap <S-Space> i
nmap <space><space> i
nnoremap <CR> o
nmap <S-CR> O

Comments

I would rather extend my pinky quickly to <ESC> than pressing two keys at the same time. What is wrong with <ESC> key?

By trying to press <SHIFT> "and" <SPACE> at the same time, your whole hand is already moved downward, which actually delays the process. I think that you are not a touch typist, in which case this is not bothering at all. However, for the touch typist, moving the whole hand is the most annoying thing.

By pressing <ESC> alone with your pinkie, you don't need to move your whole hand, and get back to the your typing very quickly without looking at the keyboard.


I personally rest my hands on the keyboard, so as to have my forefingers relaxed on "f" and "j", my thumbs on "<space>", pinkys on "<Caps>" and " ' ", and the middle fingers touching the "number keys". so I reach all the keys without lifting or moving either hand. all but the function keys and <esc> to get to which I have to lift the whole arm, and that turns into a problem as the escape key gets pressed almost as often as the shift key.

So what was proposed in VimTip289 was quite natural for me, all but the double <S-Space> which I find a bit slow.

Which mappings work for you an which don't, depends on how you hold your hands, your typing style and maybe you keyboard, and that is your choice to make.


Advertisement