Training plan › Editing
Delete and undo
x, dd, dw, D and the lifesaver: u.
In Normal you delete without entering Insert: x deletes the character under the cursor, dd the whole line, dw up to the next word and D to the end of the line. d is an operator: it combines with any motion (dw, d$, dj, d3w). And if you go too far, u undoes and Ctrl+r redoes.
7 steps · 5 min · 70 XP
- One character: x
- A whole line: dd
- A word: dw
- To the end: D
- Several lines: 3dd
- Undo: u
- Redo: Ctrl+r