Wikia

Vim Tips Wiki

Pasting registers

Talk0
1,612pages 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.

ReferencesEdit

CommentsEdit

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