Shortcut

Vim Go to the Start of the File Shortcut

The Vim shortcut to go to the start of the file is gg on Windows. It's the same on Mac.

Quick Answer

Windows
gg
Mac
gg
Web
Not confirmed yet
VimShortcut

Go to the Start of the File

Windows
gg

Moves to the very first line.

Learn More

How to go to the start of the file in Vim

  1. Open Vim and go to where you want to go to the start of the file.
  2. Press gg on Windows or gg on Mac.

Vim Go to the Start of the File Shortcut for Windows

Press gg.

Vim Go to the Start of the File Shortcut for Mac

Press gg.

Vim Go to the Start of the File Shortcut for Vim Web

We haven't confirmed a Vim Web shortcut for this yet.

Related Keyboard Shortcuts

Frequently asked questions

What is the Vim go to the start of the file shortcut?

On Windows, press gg. On a Mac, press gg.

Is there a Mac shortcut to go to the start of the file in Vim?

Yes: gg.

Does it work in Vim for the web?

We haven't confirmed a web version shortcut for this yet.

Official source · How we verify