Vim RecallEnglish

只重排段落內文

gwip

範例

一般模式 0 / 2
one two three four five six seven eight nine ten

keep
游標位於第 1 行,第 1 欄

重新安排目前段落的換行,保留兩側空行。

操作前後
操作前
one two three four five six seven eight nine ten

keep
游標位於第 1 行,第 1 欄
操作後
one two three four five
six seven eight nine ten

keep
游標位於第 1 行,第 1 欄

從一般模式開始。游標在第 1 行第 1 欄,行和欄都從 1 起算。設定 textwidth=24 與 formatoptions=tcq。段落內文的範圍不包含相鄰空行。按 gwip。

詳細說明與 Vim 文件

範例已在 Vim 重播驗證

重新安排目前段落的換行,保留兩側空行。

ip 指定段落內文,gw 使用內建格式規則並保留游標位置。本例設定 textwidth=24 和 formatoptions=tcq。