News for hackers. Stuff that matters.
Re:Vim Anti-Patterns (2012) by Assossa on Sunday March 17, 2019 @11:06PM (#19418414)
Ctrl-[ is a good replacement for escape but I've found it's not always supported in every vim implementation. If I remember correctly it doesn't work in the visual studio vim plugin.

Binding something like JJ to escape is also a good solution, but if you ever have to edit on another machine without your vimrc, your speed will seriously suffer. I try to not change/add any core hotkeys for this exact reason. I can ssh into a brand new Linux install and edit with stock vi at the same speed as on my development machine's vim install.

I discovered that Ctrl-C is another default escape alternative. It's worked on everything I've tried so far: vi, vim, nvim, gvim, vim over ssh, vim for visual studio, vim for IntelliJ, etc. This is what I've gotten used to using. Another benefit is if you're using a non-vi editor and try to exit insert mode out of habit, Ctrl-C won't actually do anything, whereas Ctrl-[ could be a hotkey in that program and JJ will obviously insert two unwanted characters in your document.

Re:Vim Anti-Patterns (2012) by fwip on Monday March 18, 2019 @12:54AM (#19418763)
Ctrl-C will keep certain events from firing in vim (can't remember their names off the top of the head, something like OnInsertLeave).

Remap caps lock to escape on your computer and it'll work in every editor and every machine you ssh into.

Re:Vim Anti-Patterns (2012) by sjy on Monday March 18, 2019 @05:40PM (#19425604)
But I'm using Caps Lock to type Ctrl-C!
Re:Vim Anti-Patterns (2012) by amedvednikov on Monday March 18, 2019 @01:59AM (#19418985)
Caps Lock :)
Re:Vim Anti-Patterns (2012) by gameswithgo on Monday March 18, 2019 @08:18AM (#19420441)