File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1- *fold.txt* For Vim バージョン 9.1. Last change: 2024 Dec 17
1+ *fold.txt* For Vim バージョン 9.1. Last change: 2025 Jul 09
22
33
44 VIMリファレンスマニュアル by Bram Moolenaar
@@ -633,13 +633,17 @@ zk カーソルより上方の折り畳みへ移動する。閉じられた折
633633オペレータを使用したときには、閉じた折り畳みは全体が含まれる。だから "dl" は
634634カーソルの下の閉じた折り畳みの全体を削除してしまう。
635635
636- バッファの行に作用するExコマンドの作用範囲は、開始位置と終了位置ともに閉じられ
637- た折り畳みのそれらへ、それぞれ補正される。よって以下のコマンドを: >
636+ バッファ行を操作する Ex コマンドの場合、範囲は常に閉じた折り畳みの最初の行から
637+ 始まり、閉じた折り畳みの最後の行で終わるように調整される。つまり、以下のコマン
638+ ドは: >
638639 :s/foo/bar/g
639640 閉じた折り畳みへカーソルを合わせて実行すると、折り畳み内の全ての行にある "foo"
640641が "bar" へ置き換えられてしまう。
641642これは| :folddoopen | と| :folddoclosed | に対してはあてはまらない。
642643
644+ Note | :source | のような一部の Ex コマンドでは、範囲は 2 つのアドレスの [range]
645+ を使用する場合にのみ調整されることに注意。
646+
643647(同一セッション中で)以前に編集したバッファに対しては、最後の折り畳み設定が再び
644648使用される。手動折り畳みでは以前に定義された折り畳みが復元される。全ての折り畳
645649み方法で、手動で開閉した折り畳みは復元される。同じウィンドウで同じバッファが編
Original file line number Diff line number Diff line change 1- *fold.txt* For Vim version 9.1. Last change: 2024 Dec 17
1+ *fold.txt* For Vim version 9.1. Last change: 2025 Jul 09
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -642,14 +642,17 @@ what you type!
642642When using an operator, a closed fold is included as a whole. Thus "dl"
643643deletes the whole closed fold under the cursor.
644644
645- For Ex commands that work on buffer lines the range is adjusted to always
645+ For Ex commands that operate on buffer lines, the range is adjusted to always
646646start at the first line of a closed fold and end at the last line of a closed
647- fold. Thus this command: >
647+ fold. Thus, this command: >
648648 :s/foo/bar/g
649649 when used with the cursor on a closed fold, will replace "foo" with "bar" in
650650all lines of the fold.
651651This does not happen for | :folddoopen | and | :folddoclosed | .
652652
653+ Note that for some Ex commands like | :source | the range is only adjusted when
654+ using a two-address [range] .
655+
653656When editing a buffer that has been edited before, the last used folding
654657settings are used again. For manual folding the defined folds are restored.
655658For all folding methods the manually opened and closed folds are restored.
You can’t perform that action at this time.
0 commit comments