A guide to the Vim Editing tutorial: deleting with x and dd, undo and redo with u and Ctrl+r, copy and paste with yy and p, operators like dw and ciw, repeating with ., and global substitution with :%s.
Editing is where Vim starts paying off. In normal mode, keys combine into small commands: an operator (delete, change, copy) plus a target (a character, a word, a line). This tutorial walks through the combinations you will use daily, on a draft file with real mistakes to fix.
Deleting: x, dd, dw
x " delete the character under the cursor
dd " delete the whole line
dw " delete from the cursor to the next word
x fixes typos one character at a time. dd removes a whole line, and dw shows Vim's grammar: d (delete) combined with w (word).
dw is not one command to memorize: it is d (what to do) combined with w (how far).
Undo and redo: u, Ctrl+r
u " undo the last change
Ctrl+r " redo
Undo makes Vim safe to experiment in. Try any command; if the result surprises you, press u.
u walks back through the edit history; Ctrl+r walks forward again.
Copy and paste: yy, p
yy " yank (copy) the current line
p " paste below the cursor
P " paste above the cursor
Deleted text also lands in the same register, so dd followed by p moves a line.
Changing a word: ciw
ciw " change inner word: delete it and enter insert mode
ciw works from anywhere inside the word, which makes it faster than manually selecting. Type the new word and press Esc.
Repeating: .
. " repeat the last change
The dot command repeats your last edit wherever the cursor is. Combined with movement or n (next search match), it turns one fix into many.
Substituting: :%s
:%s/old/new/g " replace every old with new in the file
% means the whole file, and g means every occurrence on each line. This is the fastest way to rename something consistently.
Operators, motions, the dot command, and :%s are the core of everyday Vim editing. Everything else builds on this grammar.