DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

p (paste)

Explained by Updated

What is p (paste)?

p (paste): Vim: paste whatever is in the register after the cursor. In Vim, p pastes the content of the default register after the cursor, and P pastes it before. If you yanked or deleted a whole line, p pastes it on the line below. Vim's registers are more flexible than one clipboard. Every delete also goes into a register, which can surprise you: deleting a line after copying something replaces what you were about to paste. The register "0 always holds your last yank, so "0p pastes that even after deletes.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about p (paste)

What should you keep in mind with p (paste)?

To use the system clipboard, paste from the + register with "+p, provided your Vim build supports it. Many people add set clipboard=unnamedplus to their configuration so yank and paste work with the system clipboard directly, which makes Vim behave more like other applications.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with P

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.