editing

p / P

Paste the contents of the unnamed register: p pastes AFTER the cursor (or below the line, for a linewise yank), P pastes BEFORE the cursor (or above the line). Works with anything you dd'd, yy'd, or x'd.

p  P  (normal / visual mode)

Variations

Keystroke Effect
3p Paste the register contents 3 times
"0p Paste from the yank register (survives deletes)
"+p Paste from system clipboard
gp Paste and leave cursor AFTER the pasted text

Examples

yyp

Duplicate current line below

ddP

Move current line up by one

"+p

Paste from OS clipboard

Gotcha

Every d, c, s, x overwrites the unnamed register — if you delete something and then try to paste your earlier yank, it's gone. Use register "0 for the last yank specifically.

Related

← All Vim commands · Vim cheat sheet