Last Updated: February 25, 2016
·
572
· ynonp

How to use vim registers

Old style cut/copy/paste uses only one clipboard. Vim can do much better. By using multiple clipboards (called registers) you can hold multiple code fragments in memory and paste the one you need.

Here's the short how-to:

Precede any yank/cut/paste command with "[register] to have the command performed on the named register.

### Examples:

Copy a line to register a

"ayy

(you can replace a with any letter from a-z)

Paste from register a

"ap

More Info

For the full documentation on using registers, type in vim:

:help registers