Skip to content

Commit 49c1cf6

Browse files
committed
Update autocmd.{txt,jax}
1 parent 43bf779 commit 49c1cf6

File tree

2 files changed

+44
-19
lines changed

2 files changed

+44
-19
lines changed

doc/autocmd.jax

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Jun 19
1+
*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Aug 27
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -550,6 +550,7 @@ BufUnload バッファを解放する前。これは、バッファ内のテ
550550
ときは、"%" で表されるカレントバッファと
551551
"<afile>" で表される解放されるバッファとは異な
552552
るかもしれないことに注意。
553+
*E1546*
553554
他のバッファやウィンドウに切り替えないこと。問
554555
題が発生するだろう。
555556
終了時に v:dying が 2 以上のときはこのイベント
@@ -648,8 +649,9 @@ CmdlineLeave カーソルがコマンドラインを離れる前、非イン
648649
コマンドの結果がエラーとなる場合は、コマンドラ
649650
インは引き続き実行中となる。
650651
<afile> はコマンドラインの種類を示す 1 文字に
651-
設定される。
652-
|cmdwin-char|
652+
設定される。|cmdwin-char|
653+
|v:char| をコマンドラインを終了したキーに設定
654+
する (例: <CR><CTRL-C><Esc>)。
653655
*CmdlineLeavePre*
654656
CmdlineLeavePre コマンドラインを抜ける直前、かつ
655657
|CmdlineLeave| の前に発生する。補完情報は
@@ -662,6 +664,7 @@ CmdlineLeavePre コマンドラインを抜ける直前、かつ
662664
る。<afile> には、コマンドラインの種類を示す 1
663665
文字が設定される。
664666
詳細は |cmdwin-char| を参照。
667+
|CmdlineLeave| と同様に |v:char| を設定する。
665668
*CmdwinEnter*
666669
CmdwinEnter Command-lineウィンドウに入った後。この特殊な
667670
ウィンドウに対してのみオプションを設定するのに
@@ -1287,23 +1290,31 @@ TermResponse |t_RV| に対する応答をターミナルから受け取った
12871290
行されることがある。特に、ファイル入出力、シェ
12881291
ルコマンドの実行、時間の掛かる処理など。
12891292
*TermResponseAll*
1290-
TermResponseAll |t_RV|, |t_RC|, |t_RS|, |t_RB|, |t_RF|, または
1291-
|t_u7| に対する応答をターミナルから受信した後。
1292-
|v:termresponse|, |v:termblinkresp|,
1293-
|v:termstyleresp|, |v:termrbgresp|,
1294-
|v:termrfgresp|, および |v:termu7resp| の値を
1295-
それぞれ使用できる。<amatch> は次のいずれかに
1296-
設定される。
1293+
TermResponseAll ターミナルから |t_RV||t_RC||t_RS||t_u7|
1294+
または任意の OSC コマンドの応答を受信した後。
1295+
|v:termresponse||v:termblinkresp|
1296+
|v:termstyleresp||v:termu7resp|、および
1297+
|v:termosc| の値がそれぞれ使用できる。<amatch>
1298+
は以下のいずれかに設定される:
12971299
"version",
12981300
"cursorblink",
12991301
"cursorshape",
1300-
"background",
1301-
"foreground",
13021302
"ambiguouswidth"
1303+
"osc"
13031304
Note このイベントは、特にファイル I/O、シェル
13041305
コマンド、またはその他の時間の掛かるものが関係
13051306
する場合、別のイベントの実行途中でトリガーされ
13061307
る可能性があることに注意。
1308+
Note: 従来、TermResponseAll は "foreground" お
1309+
よび "background" パターンにも使用されていた。
1310+
これらは現在、"osc" 値の一部として処理される。
1311+
後方互換性のため、
1312+
$VIMRUNTIME/plugin/colorresp.vim プラグインは
1313+
"foreground" および "background" 値に遭遇する
1314+
と、"osc" イベントを処理し、TermResponseAll 自
1315+
動コマンドイベントを発行する。
1316+
1317+
13071318
*TextChanged*
13081319
TextChanged ノーマルモードでカレントバッファのテキストが変
13091320
更されたとき。つまり |b:changedtick| が更新さ

en/autocmd.txt

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 9.1. Last change: 2025 Jun 19
1+
*autocmd.txt* For Vim version 9.1. Last change: 2025 Aug 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -546,6 +546,7 @@ BufUnload Before unloading a buffer. This is when the
546546
NOTE: When this autocommand is executed, the
547547
current buffer "%" may be different from the
548548
buffer being unloaded "<afile>".
549+
*E1546*
549550
Don't change to another buffer or window, it
550551
will cause problems!
551552
When exiting and v:dying is 2 or more this
@@ -644,6 +645,8 @@ CmdlineLeave Before leaving the command line; including
644645
<afile> is set to a single character,
645646
indicating the type of command-line.
646647
|cmdwin-char|
648+
Sets the |v:char| to the key that exited the
649+
command-line (e.g. <CR>, <CTRL-C>, <Esc>).
647650
*CmdlineLeavePre*
648651
CmdlineLeavePre Just before leaving the command line, and
649652
before |CmdlineLeave|. Useful for capturing
@@ -656,6 +659,7 @@ CmdlineLeavePre Just before leaving the command line, and
656659
or <Esc>. <afile> is set to a single
657660
character indicating the command-line type.
658661
See |cmdwin-char| for details.
662+
Sets |v:char| as with |CmdlineLeave|.
659663
*CmdwinEnter*
660664
CmdwinEnter After entering the command-line window.
661665
Useful for setting options specifically for
@@ -1302,22 +1306,32 @@ TermResponse After the response to |t_RV| is received from
13021306
takes time is involved.
13031307
*TermResponseAll*
13041308
TermResponseAll After the response to |t_RV|, |t_RC|, |t_RS|,
1305-
|t_RB|, |t_RF|, or |t_u7| are received from
1309+
|t_u7| or any OSC command are received from
13061310
the terminal. The value of |v:termresponse|,
13071311
|v:termblinkresp|, |v:termstyleresp|,
1308-
|v:termrbgresp|, |v:termrfgresp|, and
1309-
|v:termu7resp|, correspondingly, can be used.
1310-
<amatch> will be set to any of:
1312+
|v:termu7resp|, and |v:termosc|
1313+
correspondingly, can be used. <amatch> will
1314+
be set to any of:
13111315
"version",
13121316
"cursorblink",
13131317
"cursorshape",
1314-
"background",
1315-
"foreground",
13161318
"ambiguouswidth"
1319+
"osc"
13171320
Note that this event may be triggered halfway
13181321
executing another event, especially if file I/O,
13191322
a shell command or anything else that takes time
13201323
is involved.
1324+
Note: Traditionally, TermResponseAll was also
1325+
used for "foreground" and "background"
1326+
patterns. These are now handled as part of
1327+
the "osc" value. For backwards compatibility,
1328+
the $VIMRUNTIME/plugin/colorresp.vim plugin
1329+
will handle "osc" events and emit
1330+
TermResponseAll autocommand events when it
1331+
encounters "foreground" and "background"
1332+
values.
1333+
1334+
13211335
*TextChanged*
13221336
TextChanged After a change was made to the text in the
13231337
current buffer in Normal mode. That is after

0 commit comments

Comments
 (0)