Vim Tips Wiki

Pasting registers

Redirected from VimTip1303

1,619pages on
this wiki
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.



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>/.

Around Wikia's network

Random Wiki