r/programming • • May 23 '17

Stack Overflow: Helping One Million Developers Exit Vim

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

24

u/reepha May 23 '17

'Ctrl+[' works as an alternative to escape if you don't want to move your fingers to esc. You know, to save yourself the strain and maybe a few milliseconds.

39

u/skztr May 23 '17

I have CapsLock remapped to be an extra Escape key, as any self-respecting* vim user does

23

u/malnourish May 23 '17

Caps to control! Useful in every program

10

u/Na__th__an May 24 '17

Especially emacs!

50

u/hoosierEE May 24 '17

true emacsen have control mapped to the left foot pedal

4

u/Max_yask May 24 '17

Repetetive strain in the legs? No thank you

6

u/Throwaway_bicycling May 24 '17

Which is a way not to have to learn how to exit vim in the first place. :-)

2

u/cubicpolynomial3 May 24 '17

Grrrrrr ;)

8

u/Throwaway_bicycling May 24 '17

Nope, that character sequence does not actually exit vim either. But a valiant effort. :-)

→ More replies (1)

10

u/[deleted] May 24 '17

Both. Hold Caps for Ctrl, push and release for Esc.

Anything less is a half measure.

2

u/[deleted] May 24 '17

RIP in peace Karabiner

→ More replies (4)

8

u/shadowdude777 May 24 '17

Caps to both! Escape when it's tapped and Ctrl when it's held down.

0

u/[deleted] May 24 '17

[deleted]

→ More replies (6)
→ More replies (1)

11

u/xiongchiamiov May 24 '17

Actually, most of r/vim maps it to escape when pressed by itself, and control when part of a chord. You do this with xcape on Linux and Karabiner on OS X. For more information, see every other day in r/vim. :)

cc u/malnourish

3

u/morganmachine91 May 24 '17

I do this too. I don't get how people can use vim without it, honestly

0

u/[deleted] May 24 '17

[deleted]

0

u/[deleted] May 24 '17

[deleted]

2

u/squirrelthetire May 24 '17

don't forget

inoremap kj <ESC>

so you can really just mash the j and k keys.

3

u/squirrelthetire May 24 '17

Especially since your middle finger is longer, so it's easier to press 'k' first.

→ More replies (2)
→ More replies (1)
→ More replies (4)

1

u/jarins May 24 '17

First thing I do on new machines

→ More replies (2)

1

u/socsa May 24 '17

Yes, when in doubt, dump the stack.

1

u/happyscrappy May 24 '17

Or if your keyboard doesn't have an escape key. STUPID MAC TOUCH BAR.

1

u/Typesalot May 24 '17

Except for those of us using Scandinavian keyboard layouts which place square brackets behind AltGr.