I know it sounds masochistic, but it really isn't; I actually had to check after a while whether I really set it, because I didn't remember any issues with navigation. Try it!
I certainly like VIM, it's my default editor on non-Windows operating systems, but I really don't care one bit about the h,j,k,l keymapping; I can use my arrow keys, which I find to be lots easier. So I TOTALLY suck at this game because it doesn't support the arrow keys like VIM does! :P
You're missing a ton of vim's value by doing that. The reason for those key mappings is so that your hands can remain in standard "typing ready" position, so that you can both type and navigate without moving your hands. If you are moving away to the arrow keys, at that point you're one step away from just navigating by mouse: it's really missing the point.
I don't know about "a ton" -- there are far better ways to move around a file than mashing hjkl, even with numbered versions (vim-easymotion, vim-seek). Once you can get to the right place in the file I almost never use hjkl with an action, but rather text objects or motions like ci" or dt;
I've started to use relative line numbering (numbers.vim is highly recommended) and that has made me use 'j' and 'k' in motions quite frequently. I wish I had made the change earlier!
Interesting. I'm curious as to how and what you use vim for. I find it hard to believe that anyone would seriously do something like d + down arrow with dj available. All of those seconds (it takes me more than a second to go to the arrows then back to home row) add up over time.
My example involved deleting two lines, which you can accomplish with '2dd', 'dj', 'dddd', etc. When my hands are on my keyboard 'dj' is my personal preference. The parent poster was using arrow keys so naturally I'm wondering if for something like 'dj' he/she would use 'd + down arrow' since that seems like waste of time. It's a somewhat contrived example to see how far some users take the use of the arrow keys, which you quickly realize are not necessary in vim.
It depends on your keyboard as well. I use a Kinesis Advantage, which has the arrow keys in a place that doesn't require movement from your hands, so hjkl doesn't provide the advantage that it used to.
This should get you comfortable with using the h,j,k,l mapping then. I actually turn arrow keys off in my vimrc, I can definitively say it is one of the things that has made me faster.
Do not turn them off; remap them! That is valuable keyboard real estate.
I use them for buffer switching, since I do that frequently. Left and right change to the next and previous buffers, respectively. Down to quickly swap to the previously focused buffer. Up to bring up a buffer switch menu. Here are the .vimrc lines:
Good point about using this to get me comfortable with the keymapping. I dunno if I'll get too depressed from dying over and over before I get the hang of it though! ;)
The game is fun, but perhaps a bit misleading regarding what 'mastering vim movement' amounts to. As I am sure many of you know, vim has tons of constructs for efficient navigation: Using b or w for word-wise jumping, special markers like $ and 0, Ctrl-D and Ctrl-U etc. A good overview of movement commands can be found here: http://vim.wikia.com/wiki/Moving_around
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.
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.
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.)
I find I'm having a mental conflict between Vim's hjkl controls and WASD-style gaming controls, despite having very little experience using the latter with my right hand. This is made worse since it happens to be 'i' that my right-hand middle finger hits when I think "go up".
This is what is preventing me from learning Vim. I play games every day using WASD movement and if I have to switch to hjkl my brain goes haywire.
I have been waiting for someone to create a Vim control scheme that relies on WASD movement and maybe also brings in other common gaming related keys (E for insert?, space for escape?) To me this seems more logical than hjkl/i/esc.
Until then though it just feels like more work that it needs to be for me to personally learn Vim. Which is a shame because I can recognize how useful it can be, especially after watching Destroy all Software screencasts.
I do both regularly. They are different hands and the different movements actually become very different feeling. When my right hand is on the mouse, WASD feels natural. Otherwise, I naturally hold my left hand near the ESC key and my right hand over HJKL.
Because it's the home row, it also feels more natural when you are getting ready to type. The mental separation between "gaming" and "typing" is not hard to get a hold of really quick. Give it a try! I guarantee you'll be completely used to it within a week.
Also, keep in mind all of these keys can be remapped in Vim anyways :)
I had the same issue. Here's my config to solve it (ijkl become like arrow keys, h is insert instead):
map k g<Down>
map i g<Up>
map j <Left>
noremap h i
Note that with this config, we maintain the normal mode "inner" text objects with "h" instead of "i". So where you would previous type di' to delete inside quotes, now you'll dh'. And dh( instead of di(, etc. It all works, and I've been using this config for a couple years now.
I just tried the sname game and had the same experience (although I use ESDF for controls). My brain is not used to using my right hand for directional control.
That said it should be easy to remap vim keys to use WASD/etc - although there might be conflicts with other functions.
Having the same mental problem myself, even with a decade or more of both esdf and hjkl, and I'm now wondering if I should or could switch i and h -- switch input mode to h.
This is awesome. I thought I was pretty good at vim, but the added pressure of needing to switch modes and directions at the same time without thinking about the keys was a great learning experience! (and fun game too!)
In light of the recent comments about mods editing article titles, I gotta say that when I saw this earlier today I didn't think it sounded interesting. After the rename, I clicked on it, and man, it's awesome.
vim and BSDs default configurations insisting on inexistance of arrow keys is a "tradition" not completely unlike clitoridectomy. Come on guys (and gals), we've been over this already.
It is not insisting. Vim will happilly let you use the arrow keys. It's just that once you acclimate to "hjkl", it is slightly faster and more comfortable, since you don't need to move right hand anywhere while typing. Or at least that's how it works for me.
Your terminal is probably not correctly configured. Remember that real terminals did not originally have arrow keys or home end keys or really anything that's not in ASCII. If you're actually using a termcap old enough that it doesn't know about those escape sequences (maybe Solaris and other commercial UNIX offerings), or you're using a more recent termcap but your $TERM is set to something ancient, then the escape sequences are not interpreted.
Of course UNIX terminal handling is not standardized at all, so you may find that some programs ignore $TERM and do their own thing.
$TERM is a joke when you're on ssh (and that's always).
It's always "xterm" but there is a huge variation between those xterms and key codes seems to be altered as they pass down the chain.
Is Home ^]]1~ or it's ^]H? You have to guess every time.
You can use the arrows in vim by default, no problem with that. For example, all my current co-workers use vim and I'm the only one who navigates using HJKL.
With that said, I really really recommend any vim user to at least give a shot at using it instead of arrow keys. YMMV, but for me, not having to reach for the arrows help me stay in the zone.
You have to be in INSERT mode (press i) to eat the food. That catch is that you can't change direction in INSERT mode. Press 'esc' to get out of INSERT mode.