Format a paragraph to textwidth
gqap
Example
Normal 0 / 2Operator pending 1 / 2Normal 2 / 2one two three four five six seven eight nine tenCursor on line 1, column 1one two three four five six seven eight nine tenCursor on line 1, column 1one two three four five
six seven eight nine tenCursor on line 2, column 1Wrap paragraph text with the formatting operator.
Waiting for motion or text object
Wrap paragraph text with the formatting operator
Before & after
one two three four five six seven eight nine tenCursor on line 1, column 1one two three four five
six seven eight nine tenCursor on line 2, column 1Start in Normal mode, at line 1, column 1 (one-based). Set textwidth=24 and formatoptions=tcq. gq uses the configured formatting rules and moves the cursor. Press gqap.
Details & Vim help
Example replayed in Vim
Wrap paragraph text with the formatting operator.
Set textwidth=24 and formatoptions=tcq. gq uses the configured formatting rules and moves the cursor.