Walking the Numbered Registers
"1p, then u and . to walk the cut-history backwards.
After a deletion, "1p pastes the most recent cut. Press u then . β Vim undoes and pastes from the next-older numbered register. Walks all 9 cuts.
A delightful Vim quirk: the numbered registers (1-9) hold the last 9 things you cut. Combine with undo + dot, and you can browse your cut history one keypress at a time.
| Key | Note |
|---|---|
| {key:"}{key:1}{key:p} | Paste the most recent cut |
| {key:u} | Undo it |
| {key:.} | Repeat β but the dot bumps to register 2 next |
| {key:u} | Undo |
| {key:.} | Bumps to register 3 |
| β¦ | β¦all the way to register 9 |
Watch
See also: Numbered Registers, The Unnamed Register