Pasting registers

From Vim Tips Wiki

Jump to: navigation, search
Tip 1303 Printable Monobook Previous Next

created 2006 · complexity basic · author Mark Woodward · version 5.7

Just as "+p (or "*p) pastes the contents of the clipboard, other registers can be pasted as well.

Use ":p to paste the last command. For example, you might want to save a complex search and replace (:%s///g) that you have just used.

Use "/p to paste the last search.

[edit] References

[edit] Comments

Also, Ctrl-R in insert mode, and command mode, will paste the contents of a register, so when I want to paste from the clipboard, it's <C-R>+, and if I want the last search, it's <C-R>/.

Personal tools