Clipboard (registers)
Links
Learning
Basic
Registers in Vim let you run actions or commands on text stored within them.
To access a register, you type "a before a command, where a is the
name of a register. If you want to copy the current line into register k,
you can type:
"kyy
You can then move through the document and paste it elsewhere using:
"kp
To list current registers:
:reg
Special
|
Default register. Is populated with yanked and deleted text. |
|
Register |
|
(or |
|
last search command |
|
last command. |
|
the current file-name. |
Tips
Copy/Delete/Replace
To copy some text, delete something and replace it with the copied text:
yank the text you want to copy. This text is saved in the
"and0registers (see Special above).delete the text you want to replace. This text is saved in the
"register.paste the yanked text with
"0p