Move to the top or bottom of the buffer.

Section: Essential motions

Jump within file

vim
vim
gg  G
Explanation

`gg` jumps to the first line and `G` to the last.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Essential motions
Move with home-row keys
Navigate left, down, up, and right.
OpenIn sheetvimsame section
Move by words
Jump by word starts and ends.
OpenIn sheetvimsame section
Move to line edges
Jump to line start or end.
OpenIn sheetvimsame section
Jump to matching delimiter
Move between matching brackets, braces, or parentheses.
OpenIn sheetvimsame section
Half-page scrolling
Scroll quickly without losing context.
OpenIn sheetvim2 tag match
Enter insert mode
Start typing before or after the cursor.
OpenIn sheetvim1 tag match