Aside from the advice mentioned (I bind caps to escape), I find that beginners use escape waaaay more often than is necessary because they aren't using all the commands at their disposal. For example, entering insert mode to delete some characters instead of using d+motion or x. Or entering insert mode to add indentation instead of using the = operator. It would take too long to enumerate all the cases where there is a much more streamlined way to perform an operation than entering insert mode, but I think this would explain the difference in experiences between people that may have used longer and aren't bothered by escape-use frequency and newer vim users.
First I “live” in command mode and only visit insert mode to …insert stuff afterwards which I always leave with escape.
So using vim becomes a series of small edits.
I map caps to Ctrl and use Ctrl-[ for escape.
That means I can still use Ctrl for insert mode shortcuts such as
Ctrl-w (delete last word)
Ctrl-r to insert a register (eg Ctrl-r% for filename)
Ctrl-h instead of reaching for backspace.
There’s loads of them.
It just takes a bit of muscle memory but if you’re a touch typist it’s well worth it IMHO.
Doing it this way, rather than say ‘jk’ in insert mode, also has the advantage of working in other vim-like programs where you’d have to repeat the mapping. If that’s even possible.
I’ve never found a problem with it. Right at the corner, it’s easy to hit with my left ring finger, sitting perfectly at a comfortable distance (based on where I rest my hands) for a slap in that general direction.
(I use my Caps Lock as Backspace. Backspace near the top right is vastly less comfortable to reach than Escape in the top left.)
That’s how I use Escape too in Evil Emacs/Spacemacs. There is some funky default in Spacemacs where you can hit something like d+f in rapid succession in order to enter normal mode but I didn’t find it to be worth it.
People really like the home row but (1) I think it is fine to leave it once in a while and (2) my joints don’t like stay in a very static position for too long in any case.
Disagree with Esc being in a good spot but having dabbled with the "workman" keyboard layout can confirm its quite lovely having backspace as caps. I often wonder about making capslock backspace, and original backspace becoming Escape. Since I already have strong muscle memory to stretch to backspace...
We simply do get used to that and all the rest. The benefits of modal editing far outweigh the eventual clunkiness of pressing a given key now and then. But the more you know how to use Vim, the less you need to get in and out of insert mode and the less you need to hit <Esc>.
I've been using this mapping for so long and it's so ingrained in my brain that I completely forgot about it. It used to happened that I'd start typing jjjjj into a textarea or a word processor, and it took me a while to realize what was wrong.
Doom Emacs had this behavior by default, and it caught me by surprise when it prevented me from typing "noto-fonts-cjk." I knew a lot of people do this in Vim, but it took some time to figure out exactly what had happened. Excellent framework though.
You can map both jk and kj to Esc, which will allow you to press both of them simultaneously. Then you can set your timeout quite low when in insert mode.
Its the weakest part of the vim keyboard scheme IMO for ergonomics, and switching modes in general. I wish there was an alternative that gave a nod to vim but remained in 'input' mode without loss of capability, you know...without having to be vscode. If the key layout wasnt even worse, and it wasn't a bloated mess (on windows at least) I'd have switched to Emacs. Capslock is mostly a redundant button so I wholey support remapping it and for me is the only sensible way to use vim, binding to jj is hacky and plays up often and is inefficienct, and ctrl+] is insanity for such a regular press. Caps as Esc is useful in games when remapped to esc too for speedy pausing or simply pressing it by accident to kill you in a gunfight lol struggles
> I wish there was an alternative that gave a nod to vim but remained in 'input' mode without loss of capability
Problem is, without modes, we lose capability that comes from the fact that modes exist, such as simple characters being compositeable commands;
How should a non-modal editor know whether that [d] I just pressed is me wanting the letter `d` or the delete command? It can't;
Either I have to somehow tell it "the next letter I press is to be interpreted as a command", or "interpret what I press as commands until I say otherwise". The former gets tiresome rather quickly (what if I have to do several commands?), the latter would again be a modal editor.
If you want stay in insert mode most of the time you could use Ctrl-o to switch to command mode for a single command and then be immediately returned to insert mode.
Eg
Ctrl-o de
To delete to the end of the current word.
Again, I definitely wouldn't do it that way but vim makes pretty much everything possible.
I wish Ctrl+[ wasn't tied to Esc. I hit that often instead of Ctrl+P. Haven't yet found a way to map Ctrl+[ to Ctrl+P without affecting behavior of Esc as well.
It's because your computer can't tell the difference. c-[ and ESC send the same key-code. Same with c-i and tab. What you can do to get around this is to remap one of them to something like f20 using Karabiner, then map f20 to what you like in vim.
Can recommend interception-tools mentioned in that SO link. I have been using them for quite a while, remapping caps to escape in desktop environment agnostic way.
Esc is probably the easiest key to hit in the keyboard? Tied with bottom left ctrl/fn and whatever you have in the other two corners. As in it's the easiest to misclick without accidentally hitting other keys
The easiest are F and J, the home keys where your index fingers rest. The more you have to "reach away", the harder it is to always correctly reset your hand.
I'm not advocating for that! Just that Esc/Mode shouldn't be far. Vim uses Esc for mode switching because the author wrote vim on a keyboard that had Esc where now Capslock is on a modern keyboard.
I use ctrl+c. Since I'm already used to ctrl+c while using a terminal, it became easy even in vim.
By default vim goes to normal mode when you press ctrl+c
I mentioned in another comment that I used to do this, note there are some rare cases when it's not the same as esc. You can remap Ctrl-c to be exactly the same though.
Caps Lock being Esc is so convenient that I use Esc a lot more outside of Vim too. Stop the browser loading a page? a quick pinky tap on the caps lock. Take the focus out of a text field (so I can use my Vimium commands)? tap the caps lock. Decide not to save or open that file after all? caps lock's got your back.
The remapping was originally for Vim, but now at least a third of my Esc usage is outside of it.
Agreed! But it's a frustrating experience when you find when a website or application doesn't implement Esc for what you find to be nearly standard behavior across other applications. E.g., it seems like 80% of lightboxes allow closing via Esc.
Time. It slowly becomes second nature and now I quickly reach for esc in many applications, not just vim. It does seem weird at first, an insert key (i, a, o, etc) and an esc needed for every text addition, but over time you grow used to it.
I also have my caps mapped to both ctrl and esc. Ctrl when held, and esc when tapped. Wish I had done that ages ago.
I remapped caps lock, to be control when you hold it and escape when you use it alone.
However, for a long time I used Ctrl-c instead of escape, which is 99% the same except in some odd corner cases (not recommending that, just mentioning my history).
These days I use the common vi tweak of 'jk' being mapped to escape.
I've just got used to over time. It's gotten to the point I accidently use vi keybindings in other applications. Luckily there's keybindings in common applications e.g. typing / followed by a search phrase works in Firefox as it does in Vi which is pretty cool.
On my Ultimate Hacking Keyboard I have a mapping of (left)space+q to produce Esc which for this combo I hit comfortably with my left hand thumb + ring finger.
On other keyboards I find fishing for the Esc key with the left ring or sometimes even middle finger good enough since it's so prominently singled out on the top left corner on all the keyboards I had yet to use, but it breaks the flow a bit more.
It probably helps that I'm not typing in proper form for the 10-finger system but only some hodgepodge approximation of it...
I use either karabiner on my laptop or map it in my keyboard firmware (mostly drive QMK boards for the last few years) to swap caps lock to escape on tap and control on hold. Makes vim life great. Also means that using ctrl+a as a tmux leader is comfortable to type.
Do you consider hitting enter/return for a newline to be clunky as well? Its generally the same size as caps lock and opposite it on the keyboard. I'd say I press return a bit more often then Esc when using vim, but its close
I use a programmable keyboard with thumb keys, similar to the ergodox. I have escape set to one of the thumb keys so that it's no more work than hitting "space".
Not a great answer, but I switched Cap with Esc and it took several months before I was hitting Esc automatically like you might Ctrl + s a document when stopping typing.