Vim RecallEnglish

重排段落並保留游標位置

gwap

範例

一般模式 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
游標位於第 1 行,第 1 欄

從一般模式開始。游標在第 1 行第 1 欄,行和欄都從 1 起算。設定 textwidth=24 與 formatoptions=tcq。gw 使用內部格式化並如文件所述還原游標位置。按 gwap。

詳細說明與 Vim 文件

範例已在 Vim 重播驗證

重新安排段落的換行,完成後返回原來的游標位置。

本例設定 textwidth=24 和 formatoptions=tcq。gw 會用 Vim 內建的格式規則處理 ap 選取的段落。