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

How do you use a macro to prepend text from a register to each line?

Answer

qaI<C-r>a<Esc>jq

Explanation

Record a macro that inserts the contents of register a at the start of each line using <C-r>a in insert mode, then moves down.

Next

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