Muscle Memory vs. Ctrl-C
If you're like me, not long ago you were using Ctrl-C as your escape-from-insert key. You stopped because you found that it was also occasionally an effective instantly-escape-from-nvim key.
If you're especially like me, you are trying to get used to an alternative key but you keep accidentally hitting Ctrl-C, instantly killing your neovim. Muscle memory > me.
If you're on Windows, here's a tip! Use AutoHotkey to contextually disable Ctrl-C. I'm using WezTerm and it chucks the child process name on the end of the window title. I match against that and it blocks Ctrl-C only in neovim.
If you're on Linux, you have all the cool programs anyway. There's probably a dozen equivalents.
Sorry if this thread seems a bit superfluous. I was chuffed having thought to do this. n_n No more sudden exits for me!
PS: If you want to do something a little bit evil you could bind Ctrl-C to another rarely-used key in AutoHotkey then, in neovim, map that key to Esc. No more sudden exits, but you're still pressing Ctrl-C. Hmmm...
Posted Mar 22, 2022, 2:19 AM UTC
I just started using Ctrl-[ instead. Similar enough that it was easy to transition to but much better for the purpose.
Map CAPS to Ctrl and replace the keys Esc (Ctrl-[), Enter (Ctrl-m), Tab (Ctrl-i) and Backspace (Ctrl-h)... Can be used in reasonable terminal emulators, too. I love it...