5 ms·
is ESC really the only way to get back out of insertion mode? that feels like CTS waiting to happen
by Tycho 15y ago
is ESC really the only way to get back out of insertion mode? that feels like CTS waiting to happen
- tudorizer 15y agoI have jj mapped to exit from insert mode and save the file. This trick was found in a long SO thread, plus I never had the need to type something with a double j ;)
- yogsototh 15y agoI have the even faster jk mapped to ESC. And if you want to type jk in your text you just have to - type j - wait 1 second - type k.
- billybob 15y agoVery nice! For those wondering how to do this, you can try it out with :imap jk <esc> (imap means "use this mapping when I'm in insert mode".) If you like it, add everything but the : to your .vimrc
- masterj 15y agoI find kj easier to type, since it's an outward muscle movement. Warning: If you do this you will wind up typing those characters by memory nearly everywhere.kj
- billturner 15y agoI know lots of folks remap the Caps Lock to key as ESC, since it's easier to hit than ESC.
- dredmorbius 15y agoBut my CapsLock is already mapped to Control ....
- sophacles 15y agoControl-[ is also escape (writing that in vim style <C-[> ).
- snarfy 15y agoControl-[ is the best way to move into command mode. It fits the vi philosophy better than ESC. When hitting ESC you have to lift your hand off the home row. After years of using vim, using ESC feels as inefficient as using arrow keys instead of hjkl.
- checker22 15y agoCtrl-C is what I prefer.
- mitjak 15y ago…which is particularly easy to press if you remap Caps Lock to be another Ctrl.
- Aga 15y ago<Ctrl-c> should also work. However, I also recommend mapping ESC to Caps Lock. Once you have vimified your whole computing experience, it starts paying back big time.. ;-)
- dcvetinovic 15y agoAs well as <Ctrl-{>.
- dredmorbius 15y agoI don't even think about it, but apparent pivot on my wrist to hit the 'Esc' key (top left of my keyboard) with my middle finger, rather than my pinkie as would be prescribed by a strict "home row" typing style. I find emacs's ctrl-meta-foo-bang key combinations to be far more stressful (you have to hit multiple keys in one swell foop) than vi/vim's modal just-one-key-at-a-time standard keystrokes.
- pge 15y agoC-[
- mattsacks 15y agoI map the right command key to escape. http://pqrs.org/macosx/keyremap4macbook/ http://pqrs.org/macosx/keyremap4macbook/
- graywh 15y agoVi was developed on a system that had Ctrl and Esc where Caps and Tab are now. One now about using Ctrl-c: that bypasses InsertLeave autocmd's.