Mission 19 / 52• Advanced Vertical Movement

Relative Line Jumps

Every movement in Vim can be preceded by a count. `3j` moves down 3 lines; `5k` moves up 5 lines.

Modern Vim setups use relative line numbers so you can glance at any line and immediately see the exact count needed to reach it.

Counted line jumps

  • 3jjump down 3 lines
  • 2kjump up 2 lines
  • 4wjump forward 4 words
1
// Line 0: Header
2
const port = 3000;
3
const host = "localhost";
4
const env = "development";
5
const ssl = false;
6
// Line 5: Footer

From the top line, press `3j` or `4j` to jump directly down several lines in one tap.

Now it's your turn!

0 / 4 tasks complete0.0s / 14s par0 / 10 par

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

Task 1: Jump down three lines with 3j from line 1 to line 4.

Show hint

Type 3j.

1
line1();
2
line2();
3
line3();
4
line4();
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next