Skip to content

Commit

Permalink
Merge pull request #1969 from h-east/update-options
Browse files Browse the repository at this point in the history
Update options.{txt,jax}
  • Loading branch information
h-east authored Mar 7, 2025
2 parents 36938ef + c3126b4 commit 7332296
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 63 deletions.
71 changes: 42 additions & 29 deletions doc/options.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*options.txt* For Vim バージョン 9.1. Last change: 2025 Feb 16
*options.txt* For Vim バージョン 9.1. Last change: 2025 Mar 02


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -2156,13 +2156,29 @@ Note 1番目の形式では、行全体がオプション指定に使われる
完項目がポップアップメニューに表示される方法をカスタマイズできる。
Note: どのような順序であっても、常にこれら 3 つの値を含んでいなければ
ならない。
挿入モード補完中にポップアップメニューの項目の配置と表示順序を制御する
文字列のコンマ区切りのリスト。サポートされている値は、"abbr"、"kind"、
および "menu" である。これらの値によりポップアップメニューでの
|complete-items| の表示方法をカスタマイズできる。Note: どのような順序
であっても、常にこれら 3 つの値を含んでいなければならない。

*'completeopt'* *'cot'*
'completeopt' 'cot' 文字列 (既定では "menu,preview")
グローバル/バッファについてローカル |global-local|
入力モードでの補完|ins-completion|についてのオプションのコンマ区切りの
リスト。サポートされている値は次の通り:

fuzzy 補完候補に対して |fuzzy-matching| を有効にする。これによ
り、より柔軟で直感的なマッチングが可能になり、文字をスキッ
プしたり、正確なシーケンスが入力されていなくてもマッチを見
つけることができる。

longest 候補の文字列の最長の共通部分だけを挿入する。メニューが表示
されているならばCTRL-Lでさらに文字を挿入することができる。
大文字・小文字が同一視されるかどうかは補完の種類による。
バッファのテキストについてはオプション 'ignorecase' が適用
される。

menu ポップアップメニューで補完候補を表示する。ポップアップメ
ニューは、候補が2個以上あり、十分な数の色が使用できるとき
だけ表示される。|ins-completion-menu|を参照。
Expand All @@ -2171,15 +2187,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる
ついて付加的な情報があるときに便利である。例えば、それがど
のファイルに含まれているかなど。

longest 候補の文字列の最長の共通部分だけを挿入する。メニューが表示
されているならばCTRL-Lでさらに文字を挿入することができる。
大文字・小文字が同一視されるかどうかは補完の種類による。
バッファのテキストについてはオプション 'ignorecase' が適用
される。
noinsert いかなるマッチしたテキストも、ユーザーがメニューから選択し
ない限り挿入しない。"menu" か "menuone" と組み合わせたとき
にだけ機能する。"longest" が指定された場合には、なんの影響
も発生しない。

preview 現在選択されている候補についての付加的な情報をプレビュー
ウィンドウに表示する。"menu" または "menuone" と組み合わせ
たときのみ有効。
noselect メニュー項目が事前に選択されない点を除いて、"noinsert" と
同じである。"noinsert" と "noselect" の両方が存在する場合
は、"noselect" が優先される。

nosort "fuzzy" が有効になっている場合の、ファジースコアに基づく補
完候補の並べ替えを無効にする。候補は元の順序で表示される。

popup 現在選択されている補完に関する追加情報をポップアップウィン
ドウに表示する。"menu" または "menuone" との組み合わせでの
Expand All @@ -2194,27 +2212,15 @@ Note 1番目の形式では、行全体がオプション指定に使われる
|complete-popuphidden| の例を参照。
{|+textprop| 機能付きでコンパイルされたときのみ有効}

noinsert いかなるマッチしたテキストも、ユーザーがメニューから選択し
ない限り挿入しない。"menu" か "menuone" と組み合わせたとき
にだけ機能する。"longest" が指定された場合には、なんの影響
も発生しない。

noselect メニュー項目が事前に選択されない点を除いて、"noinsert" と
同じである。"noinsert" と "noselect" の両方が存在する場合
は、"noselect" が優先される。

fuzzy 補完候補に対して |fuzzy-matching| を有効にする。これによ
り、より柔軟で直感的なマッチングが可能になり、文字をスキッ
プしたり、正確なシーケンスが入力されていなくてもマッチを見
つけることができる。

nosort "fuzzy" が有効になっている場合の、ファジースコアに基づく補
完候補の並べ替えを無効にする。候補は元の順序で表示される。

preinsert
現在の補完リーダーの一部ではない最初の候補単語の部分を事前
に挿入し、|hl-ComplMatchIns| ハイライトグループを使用する。
"fuzzy" も含まれている場合は機能しない。
これを機能させるには、"fuzzy" が設定されておらず、
"menuone" が設定されている必要がある。

preview 現在選択されている候補についての付加的な情報をプレビュー
ウィンドウに表示する。"menu" または "menuone" と組み合わせ
たときのみ有効。

*'completepopup'* *'cpp'*
'completepopup' 'cpp' 文字列 (既定では空)
Expand Down Expand Up @@ -9592,7 +9598,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる
"list" 複数のマッチがあるときは、全てのマッチを羅列する。
"lastused" バッファ名が補完され1より多くマッチした時、バッファを
最終利用時刻でソートする (カレントバッファ以外)。
マッチが1個しかないときは、どの場合でも完全に補完される。
"noselect" 最初のメニュー項目を事前に選択せず、有効な場合は
'wildmenu' を開始する。
マッチするものが 1 つしかない場合は、"noselect" が存在する場合を除き、
すべてのケースで完全に補完される。

コロン区切りで利用できる例:
"longest:full" "longest" と似ているが、'wildmenu' が有効ならばそれも
Expand All @@ -9614,7 +9623,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる
:set wildmode=list,full
< 補完せずに全てのマッチを羅列し、次からマッチを完全に補完する >
:set wildmode=longest,list
< 共通する最長の文字列を補完し、次から他の候補を羅列する
< 共通する最長の文字列を補完し、次から他の候補を羅列する >
:set wildmode=noselect:full
< 補完せずに 'wildmenu' を表示し、次に各完全マッチを表示する >
:set wildmode=noselect:lastused,full
< 上記と同じだが、バッファを最後に使用した時間でソートする。
より詳しくは |cmdline-completion| を参照。

*'wildoptions'* *'wop'*
Expand Down
75 changes: 41 additions & 34 deletions en/options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Feb 16
*options.txt* For Vim version 9.1. Last change: 2025 Mar 02


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -2107,10 +2107,10 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeitemalign'* *'cia'*
'completeitemalign' 'cia' string (default: "abbr,kind,menu")
global
A comma-separated list of |complete-items| that controls the alignment
and display order of items in the popup menu during Insert mode
completion. The supported values are abbr, kind, and menu. These
options allow to customize how the completion items are shown in the
A comma-separated list of strings that controls the alignment and
display order of items in the popup menu during Insert mode
completion. The supported values are "abbr", "kind", and "menu".
These values allow customizing how |complete-items| are shown in the
popup menu. Note: must always contain those three values in any
order.

Expand All @@ -2120,6 +2120,17 @@ A jump table for the options with a short description can be found at |Q_op|.
A comma-separated list of options for Insert mode completion
|ins-completion|. The supported values are:

fuzzy Enable |fuzzy-matching| for completion candidates. This
allows for more flexible and intuitive matching, where
characters can be skipped and matches can be found even
if the exact sequence is not typed.

longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more
characters. Whether case is ignored depends on the kind
of completion. For buffer text the 'ignorecase' option is
used.

menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
Expand All @@ -2128,15 +2139,17 @@ A jump table for the options with a short description can be found at |Q_op|.
Useful when there is additional information about the
match, e.g., what file it comes from.

longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more
characters. Whether case is ignored depends on the kind
of completion. For buffer text the 'ignorecase' option is
used.
noinsert Do not insert any text for a match until the user selects
a match from the menu. Only works in combination with
"menu" or "menuone". No effect if "longest" is present.

preview Show extra information about the currently selected
completion in the preview window. Only works in
combination with "menu" or "menuone".
noselect Same as "noinsert", except that no menu item is
pre-selected. If both "noinsert" and "noselect" are
present, "noselect" has precedence.

nosort Disable sorting of completion candidates based on fuzzy
scores when "fuzzy" is enabled. Candidates will appear
in their original order.

popup Show extra information about the currently selected
completion in a popup window. Only works in combination
Expand All @@ -2151,28 +2164,15 @@ A jump table for the options with a short description can be found at |Q_op|.
See the example at |complete-popuphidden|.
{only works when compiled with the |+textprop| feature}

noinsert Do not insert any text for a match until the user selects
a match from the menu. Only works in combination with
"menu" or "menuone". No effect if "longest" is present.

noselect Same as "noinsert", except that no menu item is
pre-selected. If both "noinsert" and "noselect" are
present, "noselect" has precedence.

fuzzy Enable |fuzzy-matching| for completion candidates. This
allows for more flexible and intuitive matching, where
characters can be skipped and matches can be found even
if the exact sequence is not typed.

nosort Disable sorting of completion candidates based on fuzzy
scores when "fuzzy" is enabled. Candidates will appear
in their original order.

preinsert
Preinsert the portion of the first candidate word that is
not part of the current completion leader and using the
|hl-ComplMatchIns| highlight group. Does not work when
"fuzzy" is also included.
|hl-ComplMatchIns| highlight group. In order for it to
work, "fuzzy" must not bet set and "menuone" must be set.

preview Show extra information about the currently selected
completion in the preview window. Only works in
combination with "menu" or "menuone".

*'completepopup'* *'cpp'*
'completepopup' 'cpp' string (default empty)
Expand Down Expand Up @@ -9566,7 +9566,10 @@ A jump table for the options with a short description can be found at |Q_op|.
"lastused" When completing buffer names and more than one buffer
matches, sort buffers by time last used (other than
the current buffer).
When there is only a single match, it is fully completed in all cases.
"noselect" Do not pre-select first menu item and start 'wildmenu'
if it is enabled.
When there is only a single match, it is fully completed in all cases
except when "noselect" is present.

Examples of useful colon-separated values:
"longest:full" Like "longest", but also start 'wildmenu' if it is
Expand All @@ -9589,7 +9592,11 @@ A jump table for the options with a short description can be found at |Q_op|.
:set wildmode=list,full
< List all matches without completing, then each full match >
:set wildmode=longest,list
< Complete longest common string, then list alternatives.
< Complete longest common string, then list alternatives >
:set wildmode=noselect:full
< Display 'wildmenu' without completing, then each full match >
:set wildmode=noselect:lastused,full
< Same as above, but sort buffers by time last used.
More info here: |cmdline-completion|.

*'wildoptions'* *'wop'*
Expand Down

0 comments on commit 7332296

Please sign in to comment.