Shortcut

Vim Go to the Top, Middle or Bottom of the Window Shortcut

The Vim shortcut to go to the top, middle or bottom of the window is H / M / L on Windows. It's the same on Mac.

Quick Answer

Windows
H/M/L
Mac
H/M/L
Web
Not confirmed yet
VimShortcut

Go to the Top, Middle or Bottom of the Window

Windows
H/M/L

Moves to the first, middle or last line you can see.

Learn More

How to go to the top, middle or bottom of the window in Vim

  1. Open Vim and go to where you want to go to the top, middle or bottom of the window.
  2. Press H / M / L on Windows or H / M / L on Mac.

Vim Go to the Top, Middle or Bottom of the Window Shortcut for Windows

Press H / M / L.

Vim Go to the Top, Middle or Bottom of the Window Shortcut for Mac

Press H / M / L.

Vim Go to the Top, Middle or Bottom of the Window 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 top, middle or bottom of the window shortcut?

On Windows, press H / M / L. On a Mac, press H / M / L.

Is there a Mac shortcut to go to the top, middle or bottom of the window in Vim?

Yes: H / M / L.

Does it work in Vim for the web?

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

Official source · How we verify