In vi:

  • h moves the cursor left
  • j moves the cursor down
  • k moves the cursor up
  • l moves the cursor right

this of course happens only in command mode...

Back in those days not every ASCII terminal had cursor keys to move about that blinking thing. Sometimes it didn't even blink, it was a solid inverted rectangle, preferably green or amber. Some other terminals had an underscore instead.

An interesting fact is that the Sinclair ZX Spectrum cursor keys were laid out in the same way. Cursor movement used too be accessed through the 5 6 7 8 keys. Coincidence?

In vi and clones, hjkl are used as the arrow keys. They correspond to left, down, up, and right respectively.

In vim, you can use the arrow keys for getting around if you've got a sane terminal type. If your terminal type is set to something brain-dead (like dtterm), you will need to use hjkl for navigation.

Also, these keys are used in robots for getting around.

Log in or registerto write something here or to contact authors.