diff --git a/doc/autocmd.jax b/doc/autocmd.jax index 3fdc87c85..2bfb9a26d 100644 --- a/doc/autocmd.jax +++ b/doc/autocmd.jax @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Apr 04 +*autocmd.txt* For Vim バージョン 9.1. Last change: 2025 Apr 21 VIMリファレンスマニュアル by Bram Moolenaar @@ -404,6 +404,7 @@ Vimは以下のイベントを認識する。イベント名が大文字か小 |CmdlineChanged| コマンドラインのテキストに変更が加えられた後 |CmdlineEnter| カーソルがコマンドラインに移動した後 |CmdlineLeave| カーソルがコマンドラインを離れる前 +|CmdlineLeavePre| コマンドラインを離れる前 |InsertEnter| 挿入モードを開始したとき |InsertChange| 挿入や置換モードでをタイプしたとき @@ -645,6 +646,18 @@ CmdlineLeave カーソルがコマンドラインを離れる前、非イン はコマンドラインの種類を示す 1 文字に 設定される。 |cmdwin-char| + *CmdlineLeavePre* +CmdlineLeavePre コマンドラインを抜ける直前、かつ + |CmdlineLeave| の前に発生する。補完情報は + |CmdlineLeave| が呼び出される前にクリアされる + ため、|cmdcomplete_info()| はこの情報を取得す + るのに便利である。マッピングで ":" を非対話的 + に使用した場合に発生するが、|| を使用する + 場合は発生しない。また、CTRL-C または を + 入力してコマンドラインを終了した場合にも発生す + る。 には、コマンドラインの種類を示す 1 + 文字が設定される。 + 詳細は |cmdwin-char| を参照。 *CmdwinEnter* CmdwinEnter Command-lineウィンドウに入った後。この特殊な ウィンドウに対してのみオプションを設定するのに diff --git a/en/autocmd.txt b/en/autocmd.txt index b9b76ffce..204a9117c 100644 --- a/en/autocmd.txt +++ b/en/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr 04 +*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -398,6 +398,7 @@ Name triggered by ~ |CmdlineChanged| after a change was made to the command-line text |CmdlineEnter| after the cursor moves to the command line |CmdlineLeave| before the cursor leaves the command line +|CmdlineLeavePre| before preparing to leave the command line |InsertEnter| starting Insert mode |InsertChange| when typing while in Insert or Replace mode @@ -639,6 +640,18 @@ CmdlineLeave Before leaving the command line; including is set to a single character, indicating the type of command-line. |cmdwin-char| + *CmdlineLeavePre* +CmdlineLeavePre Just before leaving the command line, and + before |CmdlineLeave|. Useful for capturing + completion info with |cmdcomplete_info()|, as + this information is cleared before + |CmdlineLeave| is triggered. Triggered for + non-interactive use of ":" in a mapping, but + not when using ||. Also triggered when + abandoning the command line by typing CTRL-C + or . is set to a single + character indicating the command-line type. + See |cmdwin-char| for details. *CmdwinEnter* CmdwinEnter After entering the command-line window. Useful for setting options specifically for