Skip to content
Vim Learn
Learn/

Delete Lines

15 / 51

Basic Operators

Delete Lines

Remove complete lines or everything to line end.

Repeating d makes the operation linewise, while D removes from the cursor through the end of the current line.

Use dd, and D in the editor beside this lesson. The challenge proves it once; Practice is a timed run against the clock.

Keys in this lesson

dd
Delete the whole line
D
Delete from the cursor to the end of the line
All 91 keys →

Practice against the clock.

The challenge proves completion once. Practice is a timed run of 15 goals — beat par, then beat your own best time. Every completed goal saves locally.

dd

Delete the current line with dd.