Shortcut
Vim Delete the Rest of the Line Shortcut
The Vim shortcut to delete the rest of the line is D on Windows. It's the same on Mac.
Quick Answer
- Windows
- D
- Mac
- D
- Web
- Not confirmed yet
VimShortcut
Delete the Rest of the Line
Removes everything from the cursor to the end of the line.
How to delete the rest of the line in Vim
- Open Vim and go to where you want to delete the rest of the line.
- Press D on Windows or D on Mac.
Vim Delete the Rest of the Line Shortcut for Windows
Press D.
Vim Delete the Rest of the Line Shortcut for Mac
Press D.
Vim Delete the Rest of the 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 rest of the line shortcut?
On Windows, press D. On a Mac, press D.
Is there a Mac shortcut to delete the rest of the line in Vim?
Yes: D.
Does it work in Vim for the web?
We haven't confirmed a web version shortcut for this yet.
Official source · How we verify