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

How do you format (rewrap) a visual selection to textwidth?

Answer

gq in visual mode

Explanation

Select text with v or V, then press gq to format the selection according to textwidth. Reformats paragraphs and wraps long lines.

Next

How do I visually select a double-quoted string including the quotes themselves?