Vim Recall繁體中文

Format only the paragraph interior

gwip

Example

Normal 0 / 2
one two three four five six seven eight nine ten

keep
Cursor on line 1, column 1

Use the inner paragraph as the formatting range.

Before & after
Before
one two three four five six seven eight nine ten

keep
Cursor on line 1, column 1
After
one two three four five
six seven eight nine ten

keep
Cursor on line 1, column 1

Start in Normal mode, at line 1, column 1 (one-based). Set textwidth=24 and formatoptions=tcq. Adjacent blank lines are outside the inner object. Press gwip.

Details & Vim help

Example replayed in Vim

Use the inner paragraph as the formatting range.

Set textwidth=24 and formatoptions=tcq. Adjacent blank lines are outside the inner object.