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 โ€” and once you reach Text Objects, any text object as well. dw deletes a word. d$ deletes to end of line. dG deletes from the cursor to the end of the file. The grammar carries you here, and it keeps composing as you learn more nouns.

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
$
Delete to end of line (same as d$)
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 (same as d$)
diw Delete inner word (text object; see Text Objects)
dap Delete around paragraph (text object; see Text Objects)
{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.

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