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

How do you record a macro to swap the current line with the one below?

Answer

qaddpq

Explanation

Record a macro that deletes the current line with dd and pastes it below the next line with p. Effectively swaps two adjacent lines.

Next

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