Shortcut

Vim Delete the Current Line Shortcut

The Vim shortcut to delete the current line is dd on Windows. It's the same on Mac.

Quick Answer

Windows
dd
Mac
dd
Web
Not confirmed yet
VimShortcut

Delete the Current Line

Windows
dd

Removes the whole line the cursor is on.

Learn More

How to delete the current line in Vim

  1. Open Vim and go to where you want to delete the current line.
  2. Press dd on Windows or dd on Mac.

Vim Delete the Current Line Shortcut for Windows

Press dd.

Vim Delete the Current Line Shortcut for Mac

Press dd.

Vim Delete the Current 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 delete the current line shortcut?

On Windows, press dd. On a Mac, press dd.

Is there a Mac shortcut to delete the current line in Vim?

Yes: dd.

Does it work in Vim for the web?

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

Official source · How we verify