Gilney
Gilney

Reputation: 381

Vim remap: Where does the Capslock go?

Ok, I'm convinced that I need remap Esc in vim. My choice is to use Capslock as common. But my question is: Where does the Capslock functionality go?

What do you think it's more productive?

Thanks in advance.

Upvotes: 0

Views: 679

Answers (3)

TimK
TimK

Reputation: 4835

I use AutoHotKey (on Windows) to re-map capslock, mainly because I sometimes hit it accidentally. Then I use shift-capslock to get the normal capslock functionality.

I think it would be weird for capslock to work as capslock in some programs but not others.

AutoHotKey mappings to do this (capslock -> esc, shift-capslock -> capslock):

CapsLock:: Send, {ESC}
+CapsLock:: Send, {Blind}{CAPSLOCK}

Upvotes: 4

weronika
weronika

Reputation: 2629

Do you see any reason why you might want to still use the Esc key in vim after the CapsLock key is remapped to Esc functionality? (for instance, other people using vim on your computer). If not, there's no reason not to remap Esc to CapsLock functionality - at least unless you want to use the Esc for something else.

Personally I never use CapsLock anyway, but if you do, then you should probably keep it around somewhere - where depends on which keybindings you use and don't use, so it's hard to make a recommendation.

Upvotes: 0

ZyX
ZyX

Reputation: 53634

I can say that I find my current solution as the most convenient:

  1. capslock is left control,
  2. left control is escape and
  3. escape is capslock (after some X server update I failed to make it behave this way, thus now escape is no-op as I don’t use it anyway).

Upvotes: 1

Related Questions