Mission 20 / 52• Advanced Vertical Movement

Absolute Line Jumps

Files can be hundreds or thousands of lines long. `gg` and `G` transport you to the extremes in a fraction of a second.

Absolute jumps

  • ggjump to the very first line of the file
  • Gjump to the very last line of the file
  • {n}Gjump directly to line {n} (e.g. 5G)
1
// Start of long file
2
const app = createApp();
3
app.use(logger);
4
app.use(auth);
5
app.use(router);
6
app.listen(port);
7
// End of long file

Press `G` to instantly drop to the bottom line of the code. Press `gg` to shoot straight back to line 1.

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 directly to bottom of file with G.

Show hint

Press G.

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