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
45 changes: 44 additions & 1 deletion doc/autocmd.jax
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ Vimは以下のイベントを認識する。イベント名が大文字か小
|TextChangedP| ポップアップメニューが表示されているときに、挿入モード
でテキストが変更された後
|TextChangedT| 端末モードでテキストが変更された後
|TextPutPost| テキストが展開された後
|TextPutPre| テキストが展開される前
|TextYankPost| テキストがヤンクもしくは削除された後

|SafeState| 保留中のものはなく、ユーザーの文字入力を待つとき
Expand Down Expand Up @@ -1338,6 +1340,46 @@ TextChangedP 挿入モードでカレントバッファのテキストが変
TextChangedT 端末モードのカレントバッファのテキストが変更さ
れたとき。
他は TextChanged と同じ。
*TextPutPost*
TextPutPost テキストがカレントバッファに展開された後、
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Expand All @@ -1364,7 +1406,8 @@ TextYankPost カレントバッファでテキストがヤンクもしくは
"autoselect" が設定されているために、Vim がビ
ジュアル選択の所有者になろうとしたときにも間接
的にトリガーされる。
{+eval 機能付きでコンパイルされた場合のみ有効}
{Vim が +eval 機能付きでコンパイルされた場合の
み有効}

*User*
User 自動的に実行されることはない。コマンド
Expand Down
43 changes: 42 additions & 1 deletion en/autocmd.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down