vimtricks.wiki Concise Vim tricks, one at a time.

How do you use a register value in a substitute command?

Answer

:%s/<C-r>a/replacement/g

Explanation

In command-line mode, <C-r>a inserts the contents of register a. Use it in substitute commands to search for previously yanked text.

Next

How do you yank a single word into a named register?