Delete Lines

In Vim, you can delete entire lines or parts of lines using the d command.

d
d
-delete the current line
Example
D
d
-delete from the cursor to the end of a line
Example









const name = "Vim";
let count = 42;
let score = 100;
const PI = 3.14;
const items = [1, 2, 3];
const MAX = 1000;
 0/15  00:00

Tips

The D command is a quick way to delete from the cursor to the end of the line. It's equivalent to d$.