Mission 02 / 52• Basic Vim

Basic Movement

In normal mode, your keyboard becomes a remote control for the cursor. Instead of reaching for the arrow keys, vim puts movement directly on the home row.

The four directions

  • hmoves the cursor left
  • jmoves the cursor down
  • kmoves the cursor up
  • lmoves the cursor right

A handy mnemonic: j looks a bit like a downward arrow, and it sits below k on the keyboard.

1
function moveAround() {
2
const left = "h";
3
const down = "j";
4
const up = "k";
5
const right = "l";
6
return left + down + up + right;
7
}

Now it's your turn!

0 / 5 tasks complete0.0s / 17s par0 / 11 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Move down one line with j, keeping the same column.

Show hint

Press j.

1
const value = 1;
2
const other = 2;

Why not the arrow keys? Because your hands never have to leave the home row. It feels slow for the first day or two, then it becomes faster than reaching for arrows ever was.

Try it in the challenge above: use h, j, k, and l to complete all four directional tasks.

jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next