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

How do you record a macro to increase indentation of a code block?

Answer

qaI <Esc>jq

Explanation

Record a macro that inserts two spaces at the beginning of the line and moves down. Run 10@a to indent a block of 10 lines.

Next

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