diff --git a/doc/builtin.jax b/doc/builtin.jax index d9794aee0..b98a550c2 100644 --- a/doc/builtin.jax +++ b/doc/builtin.jax @@ -1,4 +1,4 @@ -*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Jul 17 +*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Jul 21 VIMリファレンスマニュアル by Bram Moolenaar @@ -825,6 +825,7 @@ virtcol2col({winid}, {lnum}, {col}) 数値 スクリーン上の文字のバイトインデックス visualmode([{expr}]) 文字列 最後に使われたビジュアルモード wildmenumode() 数値 'wildmenu' モードが有効かどうか +wildtrigger() 数値 ワイルドカード展開を開始する win_execute({id}, {command} [, {silent}]) 文字列 ウィンドウ{id}で{command}を実行する win_findbuf({bufnr}) リスト {bufnr}を含むウィンドウを見つける @@ -12069,6 +12070,33 @@ wildmenumode() *wildmenumode()* 戻り値の型: |Number| +wildtrigger() *wildtrigger()* + コマンドラインでワイルドカードの展開を開始する。'wildmode' お + よび 'wildoptions' の設定で定義された動作に従う。 + |cmdline-completion| を参照。 + + この関数は、|/|、|?|、|:s|、|:g|、|:v|、|:vimgrep| などの検索 + パターンの補完も有効にする。 + + 手動で 'wildchar' を押す場合とは異なり、この関数はマッチするも + のが見つからない場合でもビープ音を鳴らさず、全体的に静かに動作 + する。そのため、|:autocmd| などから自動的に補完を開始するのに + 適している。 + *cmdline-autocompletion* + 例: コマンドラインで入力中に補完メニューを自動的に表示させるに + は、以下を使用する: > + autocmd CmdlineChanged [:/?] call wildtrigger() + set wildmode=noselect:lastused,full wildoptions=pum +< + 通常の履歴ナビゲーションを維持するには (上/下キー): > + cnoremap + cnoremap +< + 戻り値は常に 0 である。 + + 戻り値の型: |Number| + + win_execute({id}, {command} [, {silent}]) *win_execute()* `execute()` と似ているが、ウィンドウ {id} のコンテキスト内で実 行する。 diff --git a/en/builtin.txt b/en/builtin.txt index e1847b1d3..c7d3b401f 100644 --- a/en/builtin.txt +++ b/en/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 17 +*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -757,6 +757,7 @@ virtcol2col({winid}, {lnum}, {col}) Number byte index of a character on screen visualmode([{expr}]) String last visual mode used wildmenumode() Number whether 'wildmenu' mode is active +wildtrigger() Number start wildcard expansion win_execute({id}, {command} [, {silent}]) String execute {command} in window {id} win_findbuf({bufnr}) List find windows containing {bufnr} @@ -12331,6 +12332,33 @@ wildmenumode() *wildmenumode()* Return type: |Number| +wildtrigger() *wildtrigger()* + Start wildcard expansion in the command-line, using the + behavior defined by the 'wildmode' and 'wildoptions' settings. + See |cmdline-completion|. + + This function also enables completion in search patterns such + as |/|, |?|, |:s|, |:g|, |:v| and |:vimgrep|. + + Unlike pressing 'wildchar' manually, this function does not + produce a beep when no matches are found and generally + operates more quietly. This makes it suitable for triggering + completion automatically, such as from an |:autocmd|. + *cmdline-autocompletion* + Example: To make the completion menu pop up automatically as + you type on the command line, use: > + autocmd CmdlineChanged [:/?] call wildtrigger() + set wildmode=noselect:lastused,full wildoptions=pum +< + To retain normal history navigation (up/down keys): > + cnoremap + cnoremap +< + Return value is always 0. + + Return type: |Number| + + win_execute({id}, {command} [, {silent}]) *win_execute()* Like `execute()` but in the context of window {id}. The window will temporarily be made the current window,