Vim RecallEnglish

依文字寬度重排段落

gqap

範例

一般模式 0 / 2
one two three four five six seven eight nine ten
游標位於第 1 行,第 1 欄

依設定的換行寬度,重新排列段落內的文字。

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

從一般模式開始。游標在第 1 行第 1 欄,行和欄都從 1 起算。設定 textwidth=24 與 formatoptions=tcq。gq 會使用已設定的格式化規則並移動游標。按 gqap。

詳細說明與 Vim 文件

範例已在 Vim 重播驗證

依設定的換行寬度,重新排列段落內的文字。

本例設定 textwidth=24 和 formatoptions=tcq。gq 使用目前的格式規則,完成後游標會移動。