Remix.run Logo
andrewl 2 hours ago

Cassepipe, it’s not a great default for sure. What do you have yours mapped to? I mapped jj to return to normal mode and also save my file. So, as I’m typing, I just hit jj, the jj vanishes, and this command is run:

<Esc>:w<CR>

I could just have it escape instead without saving.

If I hadn’t chose jj it would have been ff, which is also always under an index finger. I do wish I’d been clued into the idea when I started with Vim instead of two years later.

cassepipe 2 hours ago | parent [-]

I find the jj/jk hack a bit too clever for my taste. I just map CapsLock to Escape system-wide because it also unlocks quick escaping for shells vi-modes too and I realized that actually Escape is a really nice key to have around in a lot of UIs to get out/go back/cancel what you are doing. I also like that it's a simple gui setting away (or registry key editing in windows).

I either put CapsLock where Escape sits or use both shifts simultaneously (one cancels it) but even then I almost never use it. The rare times I need to type a lot of uppercase together is generally code in vim and visual selection + gU does the job.

The point of my comment was not to shill for a particular solution though but for the vim community to acknowledge the problem publicly instead of it being some insider knowledge you discover in a random internet comment six months into fighting vim (if you haven't dropped out yet)

zargon 36 minutes ago | parent [-]

What key would be a good candidate as a default though? Imagine the memes for exiting vim if you needed a modifier to get into normal mode. Caps lock is truly a useless key and should be escape anyway.