News for hackers. Stuff that matters.
Re:Snake Vim Trainer by boushley on Friday August 16, 2013 @10:33AM (#6224207)
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.
Re:Snake Vim Trainer by nils_ on Friday August 16, 2013 @10:39AM (#6224241)
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.
Re:Snake Vim Trainer by dllthomas on Friday August 16, 2013 @02:54PM (#6226019)
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.
Re:Snake Vim Trainer by Arnor on Friday August 16, 2013 @10:35AM (#6224217)
Thanks for the VIM tip! I never even thought of looking for an alias for esc before.
Re:Snake Vim Trainer by NoodleIncident on Friday August 16, 2013 @11:00AM (#6224373)
I aliased jk to ESC. Can that be added in?
Re:Snake Vim Trainer by yogo on Friday August 16, 2013 @11:13AM (#6224447)
Out of habit I used jj to escape. A touch of inoremap would help this game :)
Re:Snake Vim Trainer by andrv on Friday August 16, 2013 @11:14AM (#6224456)
did this recently and it's been very useful. if anyone's interested ('kj' is faster for me), add to ~/.vimrc:

inoremap kj <ESC>

Re:Snake Vim Trainer by aith on Friday August 16, 2013 @10:40AM (#6224255)
Easy! I'll add this today
Re:Snake Vim Trainer by shime on Friday August 16, 2013 @12:10PM (#6224898)
why don't you map escape to caps lock?
Re:Snake Vim Trainer by paulnechifor on Friday August 16, 2013 @12:31PM (#6225023)
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

Re:Snake Vim Trainer by deathanatos on Friday August 16, 2013 @03:46PM (#6226324)
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.)

Re:Snake Vim Trainer by ejk314 on Friday August 16, 2013 @04:24PM (#6226568)
Is there a way to do this without installing addons to vim?