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

How do you record a macro to split a long line at a certain column?

Answer

qa80|i\n<Esc>jq

Explanation

Record a macro that moves to column 80 using 80|, inserts a newline, and moves to the next line. Wraps long lines at 80 characters.

Next

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