From 636da172b144dde0099b7c714e466dcdcb3a8810 Mon Sep 17 00:00:00 2001 From: h-east Date: Wed, 13 May 2026 01:56:42 +0900 Subject: [PATCH 1/4] Update autocmd.{txt,jax} --- doc/autocmd.jax | 45 ++++++++++++++++++++++++++++++++++++++++++++- en/autocmd.txt | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/doc/autocmd.jax b/doc/autocmd.jax index 531b19bff..5e601d62f 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -425,6 +425,8 @@ Vimは以下のイベントを認識する。イベント名が大文字か小 |TextChangedP| ポップアップメニューが表示されているときに、挿入モード でテキストが変更された後 |TextChangedT| 端末モードでテキストが変更された後 +|TextPutPost| テキストが展開された後 +|TextPutPre| テキストが展開される前 |TextYankPost| テキストがヤンクもしくは削除された後 |SafeState| 保留中のものはなく、ユーザーの文字入力を待つとき @@ -1338,6 +1340,46 @@ TextChangedP 挿入モードでカレントバッファのテキストが変 TextChangedT 端末モードのカレントバッファのテキストが変更さ れたとき。 他は TextChanged と同じ。 + *TextPutPost* +TextPutPost テキストがカレントバッファに展開された後、 + |v:event| の以下の値は、|TextYankPost| とほぼ + 同じである。 + operator 実行された操作。'p' または 'P' + のいずれか。 + regcontents 展開されたテキスト。|quote_=| + の場合、これは式の結果である。 + regname レジスタ名、または無名レジスタ + の場合は空の文字列。 + regtype レジスタの種類。 + |getregtype()| を参照。 + visual 操作が |Visual| モードで実行さ + れる場合は真となる。 + |quote_| が使用された場合、または再帰的に呼び + 出された場合はトリガーされない。 + バッファのテキストの変更は許可されていない。 + |textlock|を参照。 + Note |quote_.| レジスタの場合、最後に挿入され + たテキストは入力バッファにバッファリングされる + ため (バッファは直接変更されない)、この自動コ + マンドは |TextPutPre| の直後に呼び出されること + に注意。 + {Vim が +eval 機能付きでコンパイルされた場合の + み有効} + *TextPutPre* +TextPutPre テキストがカレントバッファに展開される前。 + |v:event| の |TextPutPost| と同じ値である。こ + の自動コマンドでは |setreg()|を呼び出すことが + でき、テキストが展開される前に "regcontents" + 内のテキストを処理および変更できる。ただし、こ + れは |quote_#|、|quote_=|、|quote_%|、 + |quote_:|、|quote_/|、|quote_.| には適用されな + い。 + |quote_| が使用された場合、または再帰的に呼び + 出された場合はトリガーされない。 + バッファのテキストの変更は許可されていない。 + |textlock|を参照。 + {Vim が +eval 機能付きでコンパイルされた場合の + み有効} *TextYankPost* TextYankPost カレントバッファでテキストがヤンクもしくは削除 された後。|v:event| の以下の値は、この autocmd @@ -1364,7 +1406,8 @@ TextYankPost カレントバッファでテキストがヤンクもしくは "autoselect" が設定されているために、Vim がビ ジュアル選択の所有者になろうとしたときにも間接 的にトリガーされる。 - {+eval 機能付きでコンパイルされた場合のみ有効} + {Vim が +eval 機能付きでコンパイルされた場合の + み有効} *User* User 自動的に実行されることはない。コマンド diff --git a/en/autocmd.txt b/en/autocmd.txt index eba6e4354..62cd761e1 100644 --- a/en/autocmd.txt +++ b/en/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.2. Last change: 2026 Feb 25 +*autocmd.txt* For Vim version 9.2. Last change: 2026 May 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -421,6 +421,8 @@ Name triggered by ~ |TextChangedP| after a change was made to the text in Insert mode when popup menu visible |TextChangedT| after a change was made to the text in Terminal mode +|TextPutPost| after text has been put +|TextPutPre| before text is put |TextYankPost| after text has been yanked or deleted |SafeState| nothing pending, going to wait for the user to type a @@ -1359,6 +1361,45 @@ TextChangedP After a change was made to the text in the TextChangedT After a change was made to the text in the current buffer in Terminal mode. Otherwise the same as TextChanged. + *TextPutPost* +TextPutPost After text has been put in the current buffer. + The following values in |v:event| are mostly + the same as |TextYankPost|: + operator The operation performed, + either 'p' or 'P'. + regcontents Text that was put. For + |quote_=|, this is the result + of the expression. + regname Name of the register or empty + string for the unnamed + register. + regtype Type of the register, see + |getregtype()|. + visual True if the operation is + performed in |Visual| mode. + Not triggered when |quote_| is used nor when + called recursively. + It is not allowed to change the buffer text, + see |textlock|. + Note that for the |quote_.| register, since + the last inserted text is buffered into the + input buffer (buffer isn't modified directly), + this autocommand is called directly after + |TextPutPre|. + {only when compiled with the +eval feature} + *TextPutPre* +TextPutPre Before text has been put in the current buffer. + Same values as |TextPutPost| in |v:event|. It + is valid to call |setreg()| in this + autocommand, allowing you to process and + modify the text in "regcontents" before it is + put. However this does not apply to |quote_#|, + |quote_=|, |quote_%|, |quote_:|, |quote_/| or |quote_.|. + Not triggered when |quote_| is used nor when + called recursively. + It is not allowed to change the buffer text, + see |textlock|. + {only when compiled with the +eval feature} *TextYankPost* TextYankPost After text has been yanked or deleted in the current buffer. The following values of From 5b6f8f1e08e03f05f39b50ac019cba76671e04b2 Mon Sep 17 00:00:00 2001 From: h_east Date: Tue, 19 May 2026 00:06:40 +0900 Subject: [PATCH 2/4] Update doc/autocmd.jax Co-authored-by: mityu --- doc/autocmd.jax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/autocmd.jax b/doc/autocmd.jax index 5e601d62f..bd7ccf608 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1341,7 +1341,7 @@ TextChangedT 端末モードのカレントバッファのテキストが変 れたとき。 他は TextChanged と同じ。 *TextPutPost* -TextPutPost テキストがカレントバッファに展開された後、 +TextPutPost テキストがカレントバッファに展開された後。 |v:event| の以下の値は、|TextYankPost| とほぼ 同じである。 operator 実行された操作。'p' または 'P' From 40daafaeab1663b20b67fff1100fbba3a9a2ae80 Mon Sep 17 00:00:00 2001 From: h-east Date: Tue, 19 May 2026 00:11:47 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Fix=20s/=E5=B1=95=E9=96=8B/=E8=B2=BC?= =?UTF-8?q?=E3=82=8A=E4=BB=98=E3=81=91/=20by=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/autocmd.jax | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/autocmd.jax b/doc/autocmd.jax index bd7ccf608..46876d4f6 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -425,8 +425,8 @@ Vimは以下のイベントを認識する。イベント名が大文字か小 |TextChangedP| ポップアップメニューが表示されているときに、挿入モード でテキストが変更された後 |TextChangedT| 端末モードでテキストが変更された後 -|TextPutPost| テキストが展開された後 -|TextPutPre| テキストが展開される前 +|TextPutPost| テキストが貼り付けされた後 +|TextPutPre| テキストが貼り付けされる前 |TextYankPost| テキストがヤンクもしくは削除された後 |SafeState| 保留中のものはなく、ユーザーの文字入力を待つとき @@ -1341,13 +1341,14 @@ TextChangedT 端末モードのカレントバッファのテキストが変 れたとき。 他は TextChanged と同じ。 *TextPutPost* -TextPutPost テキストがカレントバッファに展開された後。 +TextPutPost テキストがカレントバッファに貼り付けされた後。 |v:event| の以下の値は、|TextYankPost| とほぼ 同じである。 operator 実行された操作。'p' または 'P' のいずれか。 - regcontents 展開されたテキスト。|quote_=| - の場合、これは式の結果である。 + regcontents 貼り付けされたテキスト。 + |quote_=| の場合、これは式の結 + 果である。 regname レジスタ名、または無名レジスタ の場合は空の文字列。 regtype レジスタの種類。 @@ -1366,14 +1367,14 @@ TextPutPost テキストがカレントバッファに展開された後。 {Vim が +eval 機能付きでコンパイルされた場合の み有効} *TextPutPre* -TextPutPre テキストがカレントバッファに展開される前。 +TextPutPre テキストがカレントバッファに貼り付けされる前。 |v:event| の |TextPutPost| と同じ値である。こ の自動コマンドでは |setreg()|を呼び出すことが - でき、テキストが展開される前に "regcontents" - 内のテキストを処理および変更できる。ただし、こ - れは |quote_#|、|quote_=|、|quote_%|、 - |quote_:|、|quote_/|、|quote_.| には適用されな - い。 + でき、テキストが貼り付けされる前に + "regcontents" 内のテキストを処理および変更でき + る。ただし、これは |quote_#|、|quote_=|、 + |quote_%|、|quote_:|、|quote_/|、|quote_.| に + は適用されない。 |quote_| が使用された場合、または再帰的に呼び 出された場合はトリガーされない。 バッファのテキストの変更は許可されていない。 From ff3d5d6a139116521024be19ca6d8afb7a42799e Mon Sep 17 00:00:00 2001 From: h-east Date: Fri, 22 May 2026 02:08:02 +0900 Subject: [PATCH 4/4] Update date --- doc/autocmd.jax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/autocmd.jax b/doc/autocmd.jax index 46876d4f6..348b6479c 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim バージョン 9.2. Last change: 2026 Feb 25 +*autocmd.txt* For Vim バージョン 9.2. Last change: 2026 May 10 VIM リファレンスマニュアル by Bram Moolenaar