diff --git a/doc/insert.jax b/doc/insert.jax index ed97200cc..4504a278a 100644 --- a/doc/insert.jax +++ b/doc/insert.jax @@ -1,4 +1,4 @@ -*insert.txt* For Vim バージョン 9.1. Last change: 2025 Jul 21 +*insert.txt* For Vim バージョン 9.1. Last change: 2025 Jul 25 VIMリファレンスマニュアル by Bram Moolenaar @@ -1074,6 +1074,23 @@ CTRL-P CTRL-N と同じだが、前のマッチを検索する。 CTRL-X CTRL-Z テキストを変更せずに補完を停止する。 +☆自動補完 *ins-autocompletion* + +Vim は、|i_CTRL-N| を使うのと同様に、入力中に自動的に補完メニューを表示できる。 +|'autocomplete'| を参照。メニュー項目は、|'complete'| オプションに指定された +ソースから収集される。 + +手動の |i_CTRL-N| 補完とは異なり、このモードでは Vim の応答性を維持するために +徐々に減少するタイムアウトを使用する。|'complete'| リストの上位にあるソースに +は、より多くの時間 (より高い優先度) が与えられるが、すべてのソースには、どんな +に短い時間であっても、一定のタイムスライスが保証される。 + +このモードは他の補完モードと完全に互換性がある。|CTRL-X| を入力することで、い +つでも他の補完モードを呼び出すことができる。これにより、自動補完が一時的に停止 +される。|i_CTRL-N| を使用するには、まず |CTRL-E| を押してポップアップメニュー +を閉じること (|complete_CTRL-E| を参照)。 + + ☆補完候補を検索する関数 *complete-functions* ここでは 'completefunc', 'thesaurusfunc', 'omnifunc' について説明する。 diff --git a/en/insert.txt b/en/insert.txt index 4352388f5..ec896809e 100644 --- a/en/insert.txt +++ b/en/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2025 Jul 21 +*insert.txt* For Vim version 9.1. Last change: 2025 Jul 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1133,6 +1133,22 @@ Stop completion *compl-stop* CTRL-X CTRL-Z Stop completion without changing the text. +AUTOCOMPLETION *ins-autocompletion* + +Vim can display a completion menu as you type, similar to using |i_CTRL-N|, +but triggered automatically. See |'autocomplete'|. The menu items are +collected from the sources listed in the |'complete'| option. + +Unlike manual |i_CTRL-N| completion, this mode uses a decaying timeout to keep +Vim responsive. Sources earlier in the |'complete'| list are given more time +(higher priority), but every source is guaranteed a time slice, however small. + +This mode is fully compatible with other completion modes. You can invoke +any of them at any time by typing |CTRL-X|, which temporarily suspends +autocompletion. To use |i_CTRL-N| specifically, press |CTRL-E| first to +dismiss the popup menu (see |complete_CTRL-E|). + + FUNCTIONS FOR FINDING COMPLETIONS *complete-functions* This applies to 'completefunc', 'thesaurusfunc' and 'omnifunc'.