normal·mode
~ / registers
7

Registers

Vim's many clipboards: the unnamed register, named registers, the yank register, the black hole and appending.

  1. 01

    The unnamed register: x, dd, yy and p

    Every delete and yank lands in one shared register, and p puts it back.

    xddyypPxpddpyypnvim
  2. 02

    Named registers: "a to "z

    Stash text under a letter so later deletes can't touch it; capitals append.

    "{a-z}"ayy"ap"Ayy:regnvim
  3. 03

    The yank register "0 and the black hole "_

    Get your last yank back after a delete, or delete without touching any register.

    "0p"_d{motion}"_dd"1p"-pnvim
  4. 04

    Replace a selection with p (and P)

    Select text and put over it; the old text drops into the unnamed register.

    viwpVpv{motion}Pv{motion}"0pnvim
  5. 05

    More ways to put: gp, ]p, counts and Ctrl-r

    Choose where the cursor lands, match indentation, and paste while typing.

    gpgP]p[p{count}p<C-r>{reg}nvim
outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim