Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions doc/autocmd.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Jun 19
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Aug 29


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -550,6 +550,7 @@ BufUnload バッファを解放する前。これは、バッファ内のテ
ときは、"%" で表されるカレントバッファと
"<afile>" で表される解放されるバッファとは異な
るかもしれないことに注意。
*E1546*
他のバッファやウィンドウに切り替えないこと。問
題が発生するだろう。
終了時に v:dying が 2 以上のときはこのイベント
Expand Down Expand Up @@ -648,8 +649,9 @@ CmdlineLeave カーソルがコマンドラインを離れる前、非イン
コマンドの結果がエラーとなる場合は、コマンドラ
インは引き続き実行中となる。
<afile> はコマンドラインの種類を示す 1 文字に
設定される。
|cmdwin-char|
設定される。|cmdwin-char|
|v:char| をコマンドラインを終了したキーに設定
する (例: <CR>、<CTRL-C>、<Esc>)。
*CmdlineLeavePre*
CmdlineLeavePre コマンドラインを抜ける直前、かつ
|CmdlineLeave| の前に発生する。補完情報は
Expand All @@ -662,6 +664,7 @@ CmdlineLeavePre コマンドラインを抜ける直前、かつ
る。<afile> には、コマンドラインの種類を示す 1
文字が設定される。
詳細は |cmdwin-char| を参照。
|CmdlineLeave| と同様に |v:char| を設定する。
*CmdwinEnter*
CmdwinEnter Command-lineウィンドウに入った後。この特殊な
ウィンドウに対してのみオプションを設定するのに
Expand Down Expand Up @@ -1287,23 +1290,29 @@ TermResponse |t_RV| に対する応答をターミナルから受け取った
行されることがある。特に、ファイル入出力、シェ
ルコマンドの実行、時間の掛かる処理など。
*TermResponseAll*
TermResponseAll |t_RV|, |t_RC|, |t_RS|, |t_RB|, |t_RF|, または
|t_u7| に対する応答をターミナルから受信した後。
|v:termresponse|, |v:termblinkresp|,
|v:termstyleresp|, |v:termrbgresp|,
|v:termrfgresp|, および |v:termu7resp| の値を
それぞれ使用できる。<amatch> は次のいずれかに
設定される。
TermResponseAll ターミナルから |t_RV|、|t_RC|、|t_RS|、|t_u7|
または任意の OSC コマンドの応答を受信した後。
|v:termresponse|、|v:termblinkresp|、
|v:termstyleresp|、|v:termu7resp|、および
|v:termosc| の値がそれぞれ使用できる。<amatch>
は以下のいずれかに設定される:
"version",
"cursorblink",
"cursorshape",
"background",
"foreground",
"ambiguouswidth"
"ambiguouswidth",
"osc"
Note このイベントは、特にファイル I/O、シェル
コマンド、またはその他の時間の掛かるものが関係
する場合、別のイベントの実行途中でトリガーされ
る可能性があることに注意。
Note: 従来、TermResponseAll は "foreground" お
よび "background" パターンにも使用されていた。
これらは現在、"osc" 値の一部として処理される。
後方互換性のため、
$VIMRUNTIME/plugin/colorresp.vim プラグインは
"foreground" および "background" 値に遭遇する
と、"osc" イベントを処理し、TermResponseAll 自
動コマンドイベントを発行する。
*TextChanged*
TextChanged ノーマルモードでカレントバッファのテキストが変
更されたとき。つまり |b:changedtick| が更新さ
Expand Down
28 changes: 20 additions & 8 deletions en/autocmd.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.1. Last change: 2025 Jun 19
*autocmd.txt* For Vim version 9.1. Last change: 2025 Aug 29


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -546,6 +546,7 @@ BufUnload Before unloading a buffer. This is when the
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer being unloaded "<afile>".
*E1546*
Don't change to another buffer or window, it
will cause problems!
When exiting and v:dying is 2 or more this
Expand Down Expand Up @@ -644,6 +645,8 @@ CmdlineLeave Before leaving the command line; including
<afile> is set to a single character,
indicating the type of command-line.
|cmdwin-char|
Sets the |v:char| to the key that exited the
command-line (e.g. <CR>, <CTRL-C>, <Esc>).
*CmdlineLeavePre*
CmdlineLeavePre Just before leaving the command line, and
before |CmdlineLeave|. Useful for capturing
Expand All @@ -656,6 +659,7 @@ CmdlineLeavePre Just before leaving the command line, and
or <Esc>. <afile> is set to a single
character indicating the command-line type.
See |cmdwin-char| for details.
Sets |v:char| as with |CmdlineLeave|.
*CmdwinEnter*
CmdwinEnter After entering the command-line window.
Useful for setting options specifically for
Expand Down Expand Up @@ -1302,22 +1306,30 @@ TermResponse After the response to |t_RV| is received from
takes time is involved.
*TermResponseAll*
TermResponseAll After the response to |t_RV|, |t_RC|, |t_RS|,
|t_RB|, |t_RF|, or |t_u7| are received from
|t_u7| or any OSC command are received from
the terminal. The value of |v:termresponse|,
|v:termblinkresp|, |v:termstyleresp|,
|v:termrbgresp|, |v:termrfgresp|, and
|v:termu7resp|, correspondingly, can be used.
<amatch> will be set to any of:
|v:termu7resp|, and |v:termosc|
correspondingly, can be used. <amatch> will
be set to any of:
"version",
"cursorblink",
"cursorshape",
"background",
"foreground",
"ambiguouswidth"
"ambiguouswidth",
"osc"
Note that this event may be triggered halfway
executing another event, especially if file I/O,
a shell command or anything else that takes time
is involved.
Note: Traditionally, TermResponseAll was also
used for "foreground" and "background"
patterns. These are now handled as part of
the "osc" value. For backwards compatibility,
the $VIMRUNTIME/plugin/colorresp.vim plugin
will handle "osc" events and emit
TermResponseAll autocommand events when it
encounters "foreground" and "background"
values.
*TextChanged*
TextChanged After a change was made to the text in the
current buffer in Normal mode. That is after
Expand Down