Vim RecallEnglish

重新安排目前行的換行

gqq

範例

一般模式 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。q 會重複行格式化運算子。按 gqq。

詳細說明與 Vim 文件

範例已在 Vim 重播驗證

用格式運算子重新排列目前行的文字。

第二個 q 指定整行。本例設定 textwidth=24 和 formatoptions=tcq,過長的行會依規則折行。