Vim Scoops / Lessons / Move around

How to move around in Vim

In Normal mode, h moves left, j down, k up and l right. Type a number first to repeat a move: 5j goes down five lines.

The keys

KeysWhat they do
hLeft one character
jDown one line
kUp one line
lRight one character
4l, 3jSame moves, repeated with a count

The four keys sit under your right hand, so you never reach for the arrow keys. If you keep mixing them up, j has a tail that points down.

Counts are where it starts to pay off. Instead of tapping j eight times, read the distance and type 8j. With :set relativenumber on, Vim shows you the distance to every line.

Related

Want all of Vim, in order? Vim Scoops is a free game that starts at h j k l and builds up to macros.

Play the full game