Do You Remap Caps-Lock?

I've been remapping the caps-lock key to CTRL for a long time now. So long that it takes me a few minutes of fumbling before I can get used to the standard mapping. Vim uses CTRL for lots of handy shortcuts, and I find caps-lock easier to hit with my little finger than the standard position for CTRL. I think Apple keyboards made this worse, but I currently use a Topre Realforce and it's better there too.

If you want to do this then on Mac you're looking for "Modifier Keys":

Reset Modifier

I've also found this works reliably when I'm working in Windows in Parallels on a Mac, which is useful because I prefer the Windows keyboard mappings rather than the default Parallels Apple-mapped keys.

I'm not sure about Windows, but I found Map caps lock to escape in Windows on the VimTips Wiki. There's an extremely detailed article on the Emacs Wiki called MovingTheCtrlKey, and this includes instructions for several other environments including Android.

Chromebooks have a search key instead of caps-lock, which goes to show that even Google doesn't respect caps-lock. Fortunately you can also remap search to CTRL there too, so when you're ssh'd to a shell you can work in Vim just like your main development machine.

There's an article about why not to swap caps-lock, where it suggests using the palm instead of the little finger for the standard CTRL key. This won't work on an Apple keyboard because the function key is where CTRL should be. I tried using my palm, but after years of training my little fingers to be stronger for musical instruments I find it a lot easier than the palm. Also, my hands are slightly large so using my palm is too imprecise. It's very interesting to read a rebuke for the caps-lock remap argument, however.

blog comments powered by Disqus