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!

  1. Navigate to each green target across the code snippet.
  2. Use the motions and techniques learned in this lesson to land accurately on each target.
  3. See how fast you can complete 10 targets.
0/10
1
// Line 0: Header
2
const port = 3000;
3
const host = "localhost";
4
const env = "development";
5
const ssl = false;
6
// Line 5: Footer
NORMAL
00:00