Delete

d is the verb. Pair it with any motion.

Keys: x, X, d, dw, D, dd

d is the delete operator. It takes a motion: dw deletes a word, d$ deletes to end of line. Doubling the operator (dd) makes it linewise. x and X are convenience deletes for single characters.

d is the delete operator. It's a verb that needs a noun. The noun is any motion or text object. dw deletes a word. d$ deletes to end of line. dip deletes the inner paragraph. The grammar carries you here.

Delete character under cursor
KeyNote
x
Delete character before cursor
KeyNote
X
Delete a word
KeyNote
d
w
Delete to end of line
KeyNote
d
$
= d$ (delete to end of line)
KeyNote
D
Delete the current line
KeyNote
d
d
x โ€” delete a character
X โ€” backspace-delete
dw โ€” delete a word
D โ€” delete to end of line
dd โ€” delete a line

Reference

Key Action
x Delete char under cursor
X Delete char before cursor
d{motion} Delete what {motion} covers
dd Delete current line (linewise)
D Delete to end of line (= d$)
diw Delete inner word
dap Delete around paragraph
{n}dd Delete {n} lines

Worked example โ€” x dw dd

Three deletes, three scopes.

Step 1 ยท Cursor on 'q'.
Cursor on 'q'.
Step 2 ยท x ยท x โ€” one char gone.
x โ€” one char gone.
Step 3 ยท dw ยท dw โ€” through next word boundary.
dw โ€” through next word boundary.
Step 4 ยท dd ยท dd โ€” entire line.
dd โ€” entire line.

d is the operator; x is sugar for dl. The deleted text goes to the unnamed register and the numbered register 1.

โ–ถ Try this in the simulator

See also: The Universal Grammar, Change, Yank and Put, The Unnamed Register