Skip to content

Update autocmd.{txt,jax} #2051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
15 changes: 14 additions & 1 deletion doc/autocmd.jax
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -404,6 +404,7 @@ Vimは以下のイベントを認識する。イベント名が大文字か小
|CmdlineChanged| コマンドラインのテキストに変更が加えられた後
|CmdlineEnter| カーソルがコマンドラインに移動した後
|CmdlineLeave| カーソルがコマンドラインを離れる前
|CmdlineLeavePre| コマンドラインを離れる前
Copy link
Contributor

Choose a reason for hiding this comment

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

preparing が抜けてしまっている気がするので

Suggested change
|CmdlineLeavePre| コマンドラインを離れる前
|CmdlineLeavePre| コマンドラインを離れる準備の前

とかはどうでしょうか?

|InsertLeave|		挿入モードを抜けるとき
|InsertLeavePre|	挿入モードを抜ける直前

にならったり、合せてもいいかもしれませんが... CmdlineLeave も調整しないとですね


|InsertEnter| 挿入モードを開始したとき
|InsertChange| 挿入や置換モードで<Insert>をタイプしたとき
Expand Down Expand Up @@ -645,6 +646,18 @@ CmdlineLeave カーソルがコマンドラインを離れる前、非イン
<afile> はコマンドラインの種類を示す 1 文字に
設定される。
|cmdwin-char|
*CmdlineLeavePre*
CmdlineLeavePre コマンドラインを抜ける直前、かつ
|CmdlineLeave| の前に発生する。補完情報は
|CmdlineLeave| が呼び出される前にクリアされる
ため、|cmdcomplete_info()| はこの情報を取得す
るのに便利である。マッピングで ":" を非対話的
に使用した場合に発生するが、|<Cmd>| を使用する
場合は発生しない。また、CTRL-C または <Esc> を
入力してコマンドラインを終了した場合にも発生す
る。<afile> には、コマンドラインの種類を示す 1
文字が設定される。
詳細は |cmdwin-char| を参照。
*CmdwinEnter*
CmdwinEnter Command-lineウィンドウに入った後。この特殊な
ウィンドウに対してのみオプションを設定するのに
Expand Down
15 changes: 14 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.1. Last change: 2025 Apr 04
*autocmd.txt* For Vim version 9.1. Last change: 2025 Apr 21


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -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 <Insert> while in Insert or Replace mode
Expand Down Expand Up @@ -639,6 +640,18 @@ CmdlineLeave Before leaving the command line; including
<afile> 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 |<Cmd>|. Also triggered when
abandoning the command line by typing CTRL-C
or <Esc>. <afile> 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
Expand Down