diff --git a/doc/autocmd.jax b/doc/autocmd.jax index cca750982..fd1fd480c 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Jun 19 +*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Sep 01 VIMリファレンスマニュアル by Bram Moolenaar @@ -550,6 +550,7 @@ BufUnload バッファを解放する前。これは、バッファ内のテ ときは、"%" で表されるカレントバッファと "" で表される解放されるバッファとは異な るかもしれないことに注意。 + *E1546* 他のバッファやウィンドウに切り替えないこと。問 題が発生するだろう。 終了時に v:dying が 2 以上のときはこのイベント @@ -648,8 +649,9 @@ CmdlineLeave カーソルがコマンドラインを離れる前、非イン コマンドの結果がエラーとなる場合は、コマンドラ インは引き続き実行中となる。 はコマンドラインの種類を示す 1 文字に - 設定される。 - |cmdwin-char| + 設定される。|cmdwin-char| + |v:char| をコマンドラインを終了したキーに設定 + する (例: )。 *CmdlineLeavePre* CmdlineLeavePre コマンドラインを抜ける直前、かつ |CmdlineLeave| の前に発生する。補完情報は @@ -662,6 +664,7 @@ CmdlineLeavePre コマンドラインを抜ける直前、かつ る。 には、コマンドラインの種類を示す 1 文字が設定される。 詳細は |cmdwin-char| を参照。 + |CmdlineLeave| と同様に |v:char| を設定する。 *CmdwinEnter* CmdwinEnter Command-lineウィンドウに入った後。この特殊な ウィンドウに対してのみオプションを設定するのに @@ -1287,23 +1290,30 @@ 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| の値を - それぞれ使用できる。 は次のいずれかに - 設定される。 - "version", - "cursorblink", - "cursorshape", - "background", - "foreground", - "ambiguouswidth" +TermResponseAll ターミナルから |t_RV|、|t_RC|、|t_RS|、|t_u7| + または任意の OSC コマンドの応答を受信した後。 + |v:termresponse|、|v:termblinkresp|、 + |v:termstyleresp|、|v:termu7resp|、および + |v:termosc| の値がそれぞれ使用できる。 + は以下のいずれかに設定される: + "ambiguouswidth" (|t_u7|), + "cursorblink" (|t_RC|), + "cursorshape" (|t_RS|), + "da1" (|t_Ms|), + "osc", + "version" (|t_RV|) Note このイベントは、特にファイル I/O、シェル コマンド、またはその他の時間の掛かるものが関係 する場合、別のイベントの実行途中でトリガーされ る可能性があることに注意。 + Note: 従来、TermResponseAll は "foreground" お + よび "background" パターンにも使用されていた。 + これらは現在、"osc" 値の一部として処理される。 + 後方互換性のため、 + $VIMRUNTIME/plugin/colorresp.vim プラグインは + "foreground" および "background" 値に遭遇する + と、"osc" イベントを処理し、TermResponseAll 自 + 動コマンドイベントを発行する。 *TextChanged* TextChanged ノーマルモードでカレントバッファのテキストが変 更されたとき。つまり |b:changedtick| が更新さ diff --git a/en/autocmd.txt b/en/autocmd.txt index d11cb1f18..6a3ab93de 100644 --- a/en/autocmd.txt +++ b/en/autocmd.txt @@ -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 Sep 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -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 "". + *E1546* Don't change to another buffer or window, it will cause problems! When exiting and v:dying is 2 or more this @@ -644,6 +645,8 @@ CmdlineLeave Before leaving the command line; including 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. , , ). *CmdlineLeavePre* CmdlineLeavePre Just before leaving the command line, and before |CmdlineLeave|. Useful for capturing @@ -656,6 +659,7 @@ CmdlineLeavePre Just before leaving the command line, and or . 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 @@ -1302,22 +1306,31 @@ 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. - will be set to any of: - "version", - "cursorblink", - "cursorshape", - "background", - "foreground", - "ambiguouswidth" + |v:termu7resp|, and |v:termosc| + correspondingly, can be used. will + be set to any of: + "ambiguouswidth" (|t_u7|), + "cursorblink" (|t_RC|), + "cursorshape" (|t_RS|), + "da1" (|t_Ms|), + "osc", + "version" (|t_RV|) 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