Shortcut

Vim Restore the Whole Line Shortcut

The Vim shortcut to restore the whole line is U on Windows. It's the same on Mac.

Quick Answer

Windows
U
Mac
U
Web
Not confirmed yet
VimShortcut

Restore the Whole Line

Windows
U

Puts the current line back to how it was when you entered it.

Learn More

How to restore the whole line in Vim

  1. Open Vim and go to where you want to restore the whole line.
  2. Press U on Windows or U on Mac.

Vim Restore the Whole Line Shortcut for Windows

Press U.

Vim Restore the Whole Line Shortcut for Mac

Press U.

Vim Restore the Whole Line 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 restore the whole line shortcut?

On Windows, press U. On a Mac, press U.

Is there a Mac shortcut to restore the whole line in Vim?

Yes: U.

Does it work in Vim for the web?

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

Official source · How we verify