Warning: Once you remap this, you can never use vi on a non-remapped keyboard again (Source: me)
Can confirm. It's terrifying when muscle memory sends you half a dozen (or more) upper-case key strokes into the abyss because you hit capslock when you thought it would Esc, kept firing away keystrokes until you realized what had happened, and you have no idea what you just did, where you are, or how to get back.
If you're using a vi variant without undo capability, you've skipped right past hard mode to nightmare difficulty.
I'd argue that it's more akin to skipping to hardcore mode (i.e., permadeath).
If you didn't hit escape, wouldn't you be in insert mode and just need to backspace?
I recently changed my caps lock + hjkl to be the arrow keys system wide and act as command-option-shift-Ctrl+ whatever key you press. And finally f18 if pressed and released by itself(though you could map it to escape instead). In vim(well spacemacs) I have jk and kj set to escape so I can exit out of insert mode by just mashing those two keys on home row. This is the best setup I have ever used. To get caps locks on I have it set to toggle if I press right shift and caps locks.
I had a WASDKeyboard made with a Ctrl key in place of the capslock key and it has a switch to allow that mapping. I'm spoiled by not accidentally TYPING ALL IN CAPS!
I am almost certain all of the newer WASD products have a DIP switch on the bottom that has this feature. IIRC my CODE keyboard does too (because it’s manufactured by WASD).
Second this tip. For Emacs users, remapping Caps Lock to Control is a godsend.
It was a sad day (ok, sad years I suppose) when Sun and Apple gave up this battle to conform to the PC world. Control was already in that spot for real computers.
Why not both! I use xcape on linux, and karabiner on OSX to remap caps to control when chorded (ctrl+c) and escape when pressed alone. You'll never go back
As an emacs ex-user I could never live without Caps Lock being remapped to Ctrl, the advantages on Mac are tremendous, I use daily C-a, C-e, C-r, C-s, C-k, etc etc. This is one of the best features of Mac OS in my book, being able to use Cmd for operating system commands and Ctrl for typical UNIXy commands. Whenever I have to use a linux (usually Ubuntu) laptop I cringe at all the Ctrl-Shift-C/V.
FWIW I do the same on Windows. Not usable without that change.
> Ctrl-Shift-C/V
you should be highlight+middle clicking anyway,
this is a PCism which was brought over to 'simplify things'
Caps Lock needs to be Ctrl.
Are you an Emacs user? I'm currently trying to undo two decades of Windows keyboards in order to use my MBP, and have had to switch up alt, command, etc. in iterm2 to get things as I'm used to, but I'm willing to force my brain into using Caps-lock as CTRL if this is something that works better in the long term.
Generally live in Vim; i've remapped Caps->Ctrl on win/OSX/Linux on every computer I've owned for well over a decade now.
When I do this, I also pry of and switch the key caps wherever possible.
You can also use an external keyboard to have a hardware escape key too.