4 ms·
There are two tricks to fix the escape problem. First, you can use ctrl+[ to get out of insert, which means moving your hands less. Even better (but requires
by edanm 16y ago
There are two tricks to fix the escape problem.
First, you can use ctrl+[ to get out of insert, which means moving your hands less.
Even better (but requires customization), you can remap "jk" to get out of insert mode. Since "jk" is a combination that never comes up in actual writing, it works great. And it means you don't have to move your hands at all from home row.
- Jach 16y agoTo help the parent and or vim newbies avoid a google, and to show why this "customization" isn't scary or hard, all you need to do: :imap jk <Esc> (Literally type the angle brackets.) And if you want this as a standard default, make a .vimrc file in your home folder and stick the above without the colon in there.
- DennisP 16y agoI love you both.
- ichverstehe 16y agoIn English, maybe. In Danish there are plenty of jk's in actual writing. Ctrl+[ is terribly inaccessible on a bunch of international keyboards. Ctrl-C is the good one, really.
- andrewl 16y agoThe point is to map some easily-typed, but rarely-used, key combination as your escape key. I use jj. On the rare occasions I have to actually type jj, I just wait about a half second after typing the first j, and then the second j is received as a separate keystroke, and not interpreted as the second part of a mapping. And the only times I remember having to actually type jj are when I'm having the Vim keymapping conversation with somebody who asks "So how do you type 'jj'?
- kwantam 16y agoClearly the right way is 2ij^[ :) (EDIT: uhh, the :) is a smiley, not part of the command)