Training plan › Power

Registers and marks

Several clipboards and return points.

Vim has many clipboards called registers. "ayy yanks the line into register a and "ap pastes it. Register 0 always holds the last yank even if you delete things afterwards, and is the black hole: deleting into it touches nothing. Marks store positions: ma marks the current spot and a jumps back to it.

5 steps · 5 min · 80 XP

  1. Yank into a register: "ayy
  2. Paste from a register: "ap
  3. The last yank survives: "0p
  4. Black hole: "_dd
  5. Marks: ma and `a

Create a free account