I highly encourage mapping the Escape key to the Caps Lock key for a couple days and seeing how it feels. I gave it a spin last year out of curiosity and have since fallen in love with it. My poor pinky no longer has to frequently stretch out to the farthest upper left reaches of the keyboard!
If you're on macOS, you can do this in System Preferences > Keyboard > Modifier Keys... and selecting the "Escape" in the Caps Lock dropdown.
I've been using Caps Lock for CTRL for years now. Instead of Caps Lock for Escape, in Vim, I use jj and that has served me well. I mention this because there are others out there that have already remapped Caps Lock, and mapping to escape might not work well for them.
I tried all the above suggestions for extended periods of time. Ultimately the most productive thing for me was caps lock as control, and Ctrl-[ for escape since it works everywhere in the system.
Thanks... unfortunately I've already co-opted the caps lock key to be the control key... a common thing for emacs users to do. Now I need to find another home for esc. shakes fist at sky
Using karabiner-elements, https://pqrs.org/osx/karabiner/, you can map caps to behave a esc when pressed alone, and as ctrl when pressed with another key.
I just switched to a new Touchbar machine, and am adapting to the fact that I had several of my most common shortcuts bound to F-keys. At this point, I'm seriously considering trying to add better touchbar support to Emacs to work around this.
Around when they introduced the first touchbar models, they finally made it so you can remap caps lock to escape which I'd been wanting for years. So at least there's that option.
Ctrl-C also exits insert mode (and replace mode) and some people find that easier to type than Ctrl-[ (especially if you have a keyboard where '[' is not handy)
This is interesting - what are the typical use cases where you need to write more than 2-4 letters (e.g. "FBI" or "NASA" or something like that) in all caps ? It seems like quite unusual domain of writing - is it legal documents or something like that?
The hardware registers in our designs are all defined and used in upper case.
The file names in our code base have a lot of upper case in them as well.
But the real reason is tbat I learned speed typing in high school on an IBM Selectrix typewriter. I use CAPS LOCK even for FBI and NASA. It comes totally natural to me.
While I haven't remapped it for Esc (I have for Ctrl), you can reassign both keys. It took about a week to get used to it, but now my Control key acts as caps lock and honestly it works like it was designed to work that way. No more accidental hitting of caps lock with my pinky, and no weird gestures to hit a key I use all the time. Not saying your method is by any means worse or wrong, just thought it'd be worth pointing out!
You don't know many serious vim users. I remapped Caps Lock to control years ago (primarily for the tmux prefix ctrl+a), and escape is remapped to jj. So easy. Besides, my understanding was that Escape wasn't an option on Mac until a couple years ago.
Get Karabiner-Elements and you can map press-and-hold on caps lock to control and press-and-release on caps lock to esc. Massive win for emacs users and most vim users I have introduced it to seem to like it.
ControllerMate is another really powerful tool, though not just for keyboards but for USB devices in general. Interface is a bit funky but it's really worth checking out, not just mapping but conditional reactions, timing, scripting, for any key or arbitrary combinations of keys or non-keyboard devices (I made a DS4 work with a Mac at launch except for the touchpad part of it for example).
Ooo, interesting! I'll definitely look into that when I go into one of my next "optimize my workflow as a form of procrastination" mindsets I tend to end up in
Why do you say that? I've used emacs for years and use the escape key very infrequently. (Although I do swap control and caps lock, and have for years.)
At a guess, it's the layout of Ctrl and Alt on Mac keyboards. They're small and crammed right next to each other. It's physically painful to use Mac keyboards for Linux-y tasks and I don't understand people's love of them.
The escape key is there in terminal in same position it would be if there was no touchbar. Its been a complete non issue that people who do not have the touchbar like to complain about.
You can set it up so that tapping caps lock is interpreted as escape, while holding it is interpreted as control. It's one of the first things I do whenever I get a new machine.
This complaint always strikes me as trolling of the highest order. As though a 2018 laptop should definitely be designed to accommodate software structured for the limitations of 1970. In 2050, when the world has moved to direct neural interfaces, vi trolls on HN will still be saying "but my escape key!"
I've never failed to hit the software escape key on my 15. Not one time since the past rev was released. What is that, six months? Not once in six months. I just put my finger in exactly the same place as I would on any other keyboard and it always works.
I really think that dismissing this complaint as "trolling" is odd. The escape key is used in a lot of applications, not just vim. It's used to cancel out of actions, it's used to often dismiss modals, it's used across a lot of software for a lot of purposes. And I'm personally someone that misses the key often enough that I wish it was still there. And the escape button on the touchbar is actually not at the same place as it is on other keyboards, which makes me think you've maybe not used one of these new touchbars and are arguing just for the sake of it.
> And the escape button on the touchbar is actually not at the same place as it is on other keyboards, which makes me think you've maybe not used one of these new touchbars
Nonzero finger width easily makes up for the difference. You don't have to hit the center of it to register a touch. In fact you don't actually need to touch it at all.
Anyone who uses a keyboard to navigate their computer (most software professionals worth their salt) hit the escape key often enough to warrant it as a complaint. Try not using your mouse for your computer
Anyone who uses a keyboard to navigate their computer and has not already re-mapped their keyboard to put esc into a more RSI-friendly location is going to be paying for this choice in a decade or so...