Remapping takes less than 5 seconds in MacOs and Linux. 2 minutes in Windows. And you only have to set it up once.
Also my left pinkie never misses CapsLock and I don't even have to think about it. Can't say that's the case for Ctrl+[ which I have used extensively for one year. I am really happy I switched.
But frankly I don't use Ctrl that much. Ctrl + L/K in Firefox (I use vimium but I prefer the native bar) And I have Ctrl + J/K to switch terminal tabs In vim I only rarely use Ctrl + I/O
Additionally, I use Ctrl outside of vim very frequently as I keep my terminal key bindings native, which means all of the command line control patterns use Ctrl (jump to front, jump to back, cut (forwards/backwards), move by word, reverse search, etc etc)
I'm still of the opinion that Ctrl+[ like the OP said would be mentioned is the best because (1) it's native and (2) it uses both hands so it's almost as fast as hitting a single key and requires no hand contortion.
- 14 year exclusive vim user
I guess I'm not a normal person then? Never bothered doing the remapping and I've been an enthusiastic Vim user for a decade.
Most people are not believers and when they find something inconvenient they abandon it. Most people do what most people are doing :-) That's not the case for me. I am a believer, I use Firefox, Signal and vim, not Chrome, WhatsApp or VsCode. And I like it that way. The problem with being a believer is that you tend to downplay issues and that can bite you sometimes. I know because I have been been bothered by Escape being too far away for one whole year and use the weird combo instead. Surely there was a good reason for things being that way but I finally asked it turned out there was not.
Maybe you are the rare person that has very long fingers or whatnot and it's not inconvenient for you but you most likely are a believer :)
I use jk to get out of Insert mode on my local machine, and ctrl-C on remote machines where I don't have my .vimrc.
Also doing embedded stuff, I find the caps lock key nice for when typing out a few defines or macros.
I think this is great advice for EVERYONE, vim user or not. Someone else made this suggestion on HN some 8 years ago and I haven't looked back since.
CapsLock is essentially useless for modern computing needs, but having a No/Cancel/Quit/Esc button immediately under your left pinky is fantastic. Your brain will get used to it in a day or so, give it a try!
But seriously, I have hitting escape muscle memory engrained, I cannot remap it to any key because I won't ever think to hit capslock even if it's ergonomically "better"
I just instinctively did it to see my motion and it's an awkward feeling for me to move my left pinky over to the capslock key, definitely something I have to be mindful of doing to make happen and probably will take a long time for me to get used to.
Meanwhile, I actually extend my ring finger up and barely touch the escape and move it back down, all of that is very comfortable for me and I can do it without looking 100% of the time and never miss it.
Currently just have Esc on the CapsLock.
Add this config to ~/.config/karabiner/assets/complex_modifications/custom-capslock.json
{
"title": "Change caps_lock to Esc and Control",
"rules": [
{
"description": "Post Esc if Caps is tapped, Control if held.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
}
]
}
and then in the GUI enable it in the Complex Modifications tab. Last you need to map "capslock" to "left_control" in the Simple Modifications tab. {
"title": "Hold z or / for control",
"rules": [
{
"description": "Hold z for control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "z",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "Hold / for control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "/",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "right_control"
}
]
}
]
}
]
}I consider it indispensable.
$ setxkbmap -option caps:ctrl_modifier
$ xcape -e 'Caps_Lock=Escape'
if that need be run multiple times (i.e. in bashrc), add a guard: pgrep xcape >/dev/null || (
setxkbmap -option caps:ctrl_modifier
xcape -e 'Caps_Lock=Escape'
)...and to try and avoid this being perpetuated as it always seems to: ctrl-c is NOT the identical to escape. Notably is doesn't trigger InsertLeave which means a handful of plugins won't trigger.
I think your advice can be summed up to: Remap esc to something more convenient. My capslock key is tap for escape and hold for ctrl. I use jk for escaping insert mode because why would I want to be a "victim" who has to stretch their pinky even one key when my fingers are always going to rest on JK? ;)
I have taken to remapping it to a function key, moving caps lock to function+shift. Function+tab is mapped to escape, a combination I can easily press with my pinky alone.
This allows me to map a lot of the keys that would require moving my hand to function+[alphanumeric key], function+i is insert, function+u is page up, function+j is page down, function+r is home, function+f is end, and other such combinations.
I use a keyboard that supports QMK, so all of this customization is on the keyboard, but this could probably be done with software running on the computer, like AutoHotKey on Windows.
Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)
It's the most important key and you should punctuate all your inserts with it. So it'd better not be the key that's the furthest away from your fingers. The reason that's the case is an historical accident.
Don't be a victim. Remap.
P.S : Yes, I know about people using Ctrl+[, or Ctrl+C, I know you got used to it but one gets used to anything, it does not mean it's good. A weird combination isn't great and Ctrl + C has some quirks --> https://vi.stackexchange.com/questions/25764/use-control-c-i...
P.P.S : Yes, I know about `jk` it's clever ok but my mapping is system-wide and now I enjoy Escape being at the right spot for bash, zsh, fish, gdb, firenvim vim modes at no configuration cost.