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

How do you use a macro to number each paragraph in a document?

Answer

qa{jI## Section \n<Esc>}q

Explanation

Record a macro that goes to the start of each paragraph and inserts a section header. Manually adjust numbers or use expressions.

Next

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