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

  1. One character: x
  2. A whole line: dd
  3. A word: dw
  4. To the end: D
  5. Several lines: 3dd
  6. Undo: u
  7. Redo: Ctrl+r

Create a free account