I've tried using the h, j, k and l
keys for a while in Vim, but did not get used to it and fell back to using the arrow keys. My question is: from your experience, is it worth switching to these keys? Did you achieve faster typing/navigating?
3 Answers
When I first used Vim, it seemed very difficult to stick to hjkl after years of maintining a habit of navigating with arrow keys.
Then I learned actual touch typing.
After that, not only did hjkl feel more natural than the arrow keys. Everything computer-related became faster. It's really worth the investment timewise (I'm assuming you're not a touch typer, otherwise you wouldn't have asked this question).
By the way, Vim is incredibly useful when learning to touch type. Just keep a keyboard diagram closer to the screen than to the actual keyboard when learning, ideally a keybord diagram with vim usage on it.
-
1"I'm assuming you're not a touch typer, otherwise you wouldn't have asked this question" that sort of sums it up, it seems like such an obvious thing to me Oct 5, 2011 at 17:40
-
You might not want to link to a page showing that your right hand should be on jkl; when touch typing if you're arguing that hjkl doesn't require you to move your hands.– WoobleOct 5, 2011 at 17:43
IMHO, no, it's not worth the trouble. I've tried it, and I couldn't get used to it either.
The whole point of those using those keys was that most keyboards, at the time of Vi's creation, did not have arrow keys. I've yet to run across a modern keyboard without those keys.
I could be wrong.
-
4yep you're mostly wrong. The whole point nowadays is that you shouldn't have to move your hands away from base position - that speeds up (touch) typing and reduces mis hits. Of course, it depends on your typing style/dexterity etc. The historical reason is true but nobody is arguing that you should use
<Esc>
1 forF1
(erm... except sometimes on AIX consoles :))– seheOct 5, 2011 at 17:40
I like it. Having discovered visual mode used with f/F and t/T could cut and replace so quickly, easy access to ;
became necessary. And you can go straight to .
with the 3rd finger too.
-
True! I just realized that I definitely started using the hjkl keys more often initially for (a) scrolling (U and D as well, also in pagers) (b) visual mode and (c) wincmd's (
^WH
,^WJ
,^WK
,^WL
); only since then have they begun to come natural to me– seheOct 5, 2011 at 17:43
:nnoremap <Up> <nop>
etc. If that is not accurate, it is way more relevant than anyone else's word for it