Skip to content

Commit d055a31

Browse files
authored
Merge pull request #2028 from h-east/update-autocmd
Update autocmd.{txt,jax}
2 parents d4a1be0 + be70012 commit d055a31

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

doc/autocmd.jax

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Mar 12
1+
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Apr 04
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -596,9 +596,10 @@ BufWriteCmd バッファ全体をファイルに書き込む前。ファイル
596596
の書き込みの役目を負い、成功したときはオプショ
597597
'modified' をオフにする。バッファの内容を変
598598
更すべきではない。
599-
'modified' をオフにすると、以前の undo 状態が
600-
'modified' (変更あり) になるように undo 情報が
601-
調整される (|:write| と同様)。
599+
コマンドが 'modified' をリセットすると、
600+
|:write| と同様に、古い undo 状態を'modified'
601+
としてマークするように undo 情報が調整される。
602+
行の範囲には |'[||']| マークを使用する。
602603
|Cmd-event|
603604
*BufWritePost*
604605
BufWritePost バッファ全体をファイルに書き込んだ後 (イベント
@@ -882,13 +883,15 @@ FileType オプション 'filetype' が設定されたとき。
882883
*FileWriteCmd*
883884
FileWriteCmd バッファ全体を書き込まない場合の、ファイルに書
884885
き込む前。ファイルへの書き込みの役目を負う。バッ
885-
ファを変更すべきではない。 |Cmd-event|
886+
ファを変更すべきではない。行の範囲には |'[|
887+
|']| マークを使用する。 |Cmd-event|
886888
*FileWritePost*
887889
FileWritePost バッファ全体を書き込まない場合の、ファイルに書
888890
き込んだ後。
889891
*FileWritePre*
890892
FileWritePre バッファ全体を書き込まない場合の、ファイルに書
891-
き込む前。
893+
き込む前。行の範囲には |'[||']| マークを使
894+
用する。
892895
*FilterReadPost*
893896
FilterReadPost フィルタコマンドからファイルを読み込んだ後。
894897
Vimは FilterReadPre と同様に、現在のバッファの
@@ -1457,6 +1460,12 @@ WinScrolled カレントのタブページのウィンドウでテキストが
14571460
さが変更された後。|win-scrolled-resized| を参
14581461
照。
14591462

1463+
Note: これは、Vim がメインループに戻ったときに
1464+
通常のコマンドを処理した後でトリガーされるた
1465+
め、`:noautocmd` ではスキップできない。これを
1466+
無効にしたい場合は、代わりに 'eventignore'
1467+
プションを設定することを検討すること。
1468+
14601469
パターンは、スクロールかリサイズされた最初の
14611470
ウィンドウの |window-ID| に対してマッチングさ
14621471
れる。<amatch><afile> 両方が |window-ID|

en/autocmd.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 9.1. Last change: 2025 Mar 12
1+
*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr 04
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -593,7 +593,8 @@ BufWriteCmd Before writing the whole buffer to a file.
593593
The buffer contents should not be changed.
594594
When the command resets 'modified' the undo
595595
information is adjusted to mark older undo
596-
states as 'modified', like |:write| does.
596+
states as 'modified', like |:write| does. Use
597+
the |'[| and |']| marks for the range of lines.
597598
|Cmd-event|
598599
*BufWritePost*
599600
BufWritePost After writing the whole buffer to a file
@@ -886,14 +887,14 @@ FileType When the 'filetype' option has been set. The
886887
FileWriteCmd Before writing to a file, when not writing the
887888
whole buffer. Should do the writing to the
888889
file. Should not change the buffer. Use the
889-
'[ and '] marks for the range of lines.
890+
|'[| and |']| marks for the range of lines.
890891
|Cmd-event|
891892
*FileWritePost*
892893
FileWritePost After writing to a file, when not writing the
893894
whole buffer.
894895
*FileWritePre*
895896
FileWritePre Before writing to a file, when not writing the
896-
whole buffer. Use the '[ and '] marks for the
897+
whole buffer. Use the |'[| and |']| marks for the
897898
range of lines.
898899
*FilterReadPost*
899900
FilterReadPost After reading a file from a filter command.
@@ -1480,6 +1481,13 @@ WinScrolled After any window in the current tab page
14801481
or changed width or height. See
14811482
|win-scrolled-resized|.
14821483

1484+
Note: This can not be skipped with
1485+
`:noautocmd`, because it triggers after
1486+
processing normal commands when Vim is back in
1487+
the main loop. If you want to disable this,
1488+
consider setting the 'eventignore' option
1489+
instead.
1490+
14831491
The pattern is matched against the |window-ID|
14841492
of the first window that scrolled or resized.
14851493
Both <amatch> and <afile> are set to the

0 commit comments

Comments
 (0)