Format the current line
gqq
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 1Use a repeated formatting operator for one line.
Waiting for motion or text object
Command applied
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. The q repeats the line-formatting operator. Press gqq.
Details & Vim help
Example replayed in Vim
Use a repeated formatting operator for one line.
Set textwidth=24 and formatoptions=tcq. The q repeats the line-formatting operator.