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

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)

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)

1

u/morganmachine91 May 24 '17

Interesting, I like that. If you hit j while typing normally, us there a delay?

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

1

u/jarins May 24 '17

First thing I do on new machines

1

u/TrowSumBeans May 24 '17

You could also map the sequence "jk" to escape from insert mode. It's on the home row and that sequence is rarely needed to be typed in actual code in my experience.

1

u/Atario May 24 '17

FUCK THAT, I NEED ALL CAPS