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

How do you use a macro to create an incrementing numbered list in Vim?

Answer

qaYp<C-a>q

Explanation

Record a macro that yanks the current line, pastes it below, and increments the number with <C-a>. Repeat with @a to build a numbered list.

Next

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