Hacker News new | ask | show | jobs
by boushley 4697 days ago
This is awesome! You should add ctrl+[ as an alias for escape as vim does. I've used that for a while now, and actually reaching up for escape feels unnatural now.
6 comments

I was thinking the same thing. Not being able to use ctrl+[ actually made this game really really hard for me as my muscle memory screams in protests each time i want to exit insert mode.
Ctrl+[ isn't an alias for escape, it is escape on traditional terminals (and a whole lot of terminal emulators). It's useful to know this when using a keyboard that lacks an escape key.
Thanks for the VIM tip! I never even thought of looking for an alias for esc before.
I aliased jk to ESC. Can that be added in?
Out of habit I used jj to escape. A touch of inoremap would help this game :)
did this recently and it's been very useful. if anyone's interested ('kj' is faster for me), add to ~/.vimrc:

inoremap kj <ESC>

Easy! I'll add this today
why don't you map escape to caps lock?
This is what I do too. Caps lock is a mistake anyway. The keyboards vi was written on had ESC where the tab key is on most keyboards now[1].

[1] http://en.wikipedia.org/wiki/File:KB_Terminal_ADM3A.svg

And if you're one of those skeptics that thinks "but I sometimes use caps lock to type C_STYLE_CONSTANTS, and I need it!", there's a wonderful thing I call two-shift caps lock: you press both shift keys at the same time, and it toggles caps lock. Now you have your Shift keys, and your caps lock, and a key that really truly has no purpose. Now go forth into the world, and remap thy keyboard.

In GNOME: System → Preferences → Keyboard; Layouts; Options; Miscellaneous compatibility options → "Both Shift-Keys together toggle Caps Lock" (You can also remap Caps Lock in this same dialog, so the change isn't just for Vim. It's under "Caps Lock key behavior". Also, having a compose key is awesome.)

Is there a way to do this without installing addons to vim?