Hacker News new | ask | show | jobs
by aiham 2994 days ago
How do they escape input mode?
6 comments

By mapping escape to the otherwise useless caps lock key
Well, due to a bug in a specific version of vi, holding the space-bar for a few seconds causes the laptop to overheat. I bought an external thermometer that connects via USB, and I have a daemon that monitors it to notice the overheating and send the ESC key to the application.
Look. I thought it was funny too, but at least put a link so you're not just stealing the joke.

https://xkcd.com/1172/

Ctrl-[
I remap the sequence 'j-k' to esc. It provides really fast exiting of insert mode and leaves you on the home row to navigate after.
C-c. Easier for some reason.
Ctrl+c is technically not quite the same as Esc: it doesn't trigger InsertLeave autocmds, and doesn't finish abbreviations. But as long as you don't have those you'll be fine.