1

For VIM in command mode, the keys h,l,k, and j are used to move the cursor but I see no point in memorizing these at the moment because when going into insert mode, I use the arrow keys to move the cursor since you can't use these keys(hlkj) so lately I have been using the arrow keys in Command mode as well since it's much easier.

My question is should I try to push myself to get these memorized because I see no point since I can just use the arrow keys.

The only reason or situation I can think of right now to use the other keys is if there is a keyboard without the arrow keys but there must be a good reason why besides having more options to move the cursor.

closed as primarily opinion-based by Christopher, Jeff Schaller, jasonwryan, muru, roaima Nov 16 '18 at 21:54

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    These keys are used in other places besides vim, such as in the shell in Vi editing mode and in nethack (the game). – Kusalananda Nov 16 '18 at 16:01
  • You might get more help on vi.stackexchange.com – Vlastimil Nov 16 '18 at 16:13
  • I disable the arrow keys in vim and the shell, helps prevent fingers moving off the home row. – thrig Nov 16 '18 at 16:29
  • I have not used these keys in years (but I do most of my editing using sed). – ctrl-alt-delor Nov 16 '18 at 16:35
  • 2
    My keyboard doesn't have arrow keys (hhkb), so I use hjkl for everything. Not leaving the home row has some minimal performance efficiencies, but honestly...it just comes down to personal preference. If YOU see value in it, then do it. If not, I wouldn't say it's worth it. – bgregs Nov 16 '18 at 16:36
3

It might not mean much to you now with your current habits, but once Vim's unique mode-based command model becomes deeply ingrained in you, you'll appreciate the noticeable difference between having to move your right hand to the cursor keys, and having the most immediate navigation commands right on the home row. Users coming from different editors may be very fast using Ctrl / Shift combinations together with the cursor keys (and Ctrl + C / V to copy / paste), but in the end, there's a natural speed bump in how fast you can type those sequences. (I've been there, too.)

To me, Vi(m) pushes this to another level with the multitude of navigation commands (l vs. w vs. ) vs. }, and that's just some of the built-in ones; with plugins and customizations, this can become dozens of specialized motions). The limiting factor becomes how quickly you can recall a fitting key combination, not how fast to press keys in succession and adapt the displayed selection to what you need (though that's still possible in Vim - via visual mode).

To me, asking about cursor keys versus hjkl is the wrong question. The real question is whether to spend the effort to really learn the operating model of Vi(m) - you don't need to, but casual use of Vim won't let you experience the glowing fanaticism and allegiance that many of its users have. If you start with hjkl on the home row, the other (better) motions are close by, so you're more inclined to use them (and pretty soon will wean yourself off your focus on the cursor keys).

For an optimal start on this journey, also consider the location of the Esc key, another very central key in Vim. Its default placement on the keyboard is far from optimal; many users swap it with either Caps Lock or (left) Ctrl.

  • While I fully respect your opinion (and agree with you), this is a very subjective answer to a very subjective question. IMHO this should be a comment. There is no true answer to "preference" questions. – bgregs Nov 16 '18 at 19:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.