Vim logo vim online Vim Book Ad

 Tip #314: Insert and back...

 tip karma   Rating 13/10, Viewed by 1064 

created:   August 14, 2002 16:29      complexity:   intermediate
author:   Alex A. Naanou      as of Vim:   5.7

this is related to vimtip #289 in terms of programmers (like I) too lazy to move their hands to reach the far far away <esc> key.... joking! :)
  actually the less your hands move around the faster you type, and the fester you type the more time you have on your hands to think of "what" 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....

--cut---
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

---uncut---

Good luck!!

 rate this tip  Life Changing Helpful Unfulfilling 

<<printing using kprinter (unix + kde) | "Smart <home>" >>

Additional Notes

[email protected], August 16, 2002 7:54
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.
Alex A. Naanou <[email protected]>, August 16, 2002 16:19
  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 by Jeffrey Lim in vimtip #289 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...

Best Regards...
Alex.
[email protected], August 17, 2002 13:11
I personally found mapping <esc> key to a double pressing "J"  while in insert mode faster and very convinient.

imap jj <esc>

give it a try,
by
[email protected], August 21, 2002 9:40
mapping jj to ESC... What an excellent idea !
There is no occasion to type jj in any situation,
so jj should be just fine. Yes, it should be much faster.
But I still need to make it as my habit. Still, because of
my habit, extending my pinkie to ESC is faster at
this moment.
Thanks a lot ! :-)
Alex A. Naanou <[email protected]>, August 21, 2002 17:24
Cool!!  I think this one is worth the adaptation period!! :)
   pressing one button in the middle of the keyboard twice is a lot more intuitive than <S-Space>, and may be quite a speedup if you spend the time to get used to it.....

Thanks!!
[email protected], September 13, 2002 17:47
Ya jj is good. I'm used to <M-j>
[email protected], October 19, 2002 15:13
> There is no occasion to type jj in any situation,

Yeah, except when you're trying to add it to your .vimrc file.  ;)

Great idea.

[email protected], November 6, 2002 4:42
Of course, if you ever DO need to actually type j twice, you can wait a half second or so between them (until the cursor moves).

Though Idunno if I could ever get used to something like this. the escape key isn't that far away. ;)
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo