Skip to content

Commit bb3dd90

Browse files
authored
Merge pull request #2307 from h-east/update-options
Update options.{txt,jax}
2 parents de84971 + 6d6d520 commit bb3dd90

File tree

2 files changed

+62
-41
lines changed

2 files changed

+62
-41
lines changed

doc/options.jax

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim バージョン 9.1. Last change: 2025 Sep 02
1+
*options.txt* For Vim バージョン 9.1. Last change: 2025 Sep 11
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -2167,10 +2167,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる
21672167
*'complete'* *'cpt'* *E535*
21682168
'complete' 'cpt' 文字列 (既定では: ".,w,b,u,t,i")
21692169
バッファについてローカル
2170-
コマンド CTRL-PCTRL-N によるキーワード補完 |ins-completion| の動作
2171-
を指定する。このオプションは行全体の補完 |i_CTRL-X_CTRL-L| にも適用さ
2172-
れる。このオプションは補完の方法と、キーワード検索の対象となる場所を示
2173-
す、コンマ区切りのフラグのリストである。
2170+
このオプションは、CTRL-PCTRL-N、または |ins-autocompletion| を使用し
2171+
た場合の補完 |ins-completion| の動作を制御する。また、行全体補完
2172+
|i_CTRL-X_CTRL-L| にも使用される。補完の種類とスキャンする場所を指定す
2173+
る。以下のフラグをコンマ区切りで指定する:
21742174
. カレントバッファから検索 ('wrapscan' の値は無視)
21752175
w 別のウィンドウ内のバッファから検索
21762176
b バッファリスト内の、現在読み込まれている別のバッファから検索
@@ -2206,8 +2206,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる
22062206
に |ins-autocompletion| において重要である。
22072207
F 'completefunc' オプションから取得した関数を使って "F{func}" を
22082208
使用するのと同じである。
2209-
o 'omnifunc' オプションから取得した関数を使って "F{func}" を使用
2210-
するのと同じである。
2209+
o "F{func}" と同等だが、{func} は 'omnifunc' オプションから取得
2210+
される。プラグイン (LSP クライアント等) が 'omnifunc' を定義し
2211+
ている場合は、このフラグを介して使用できる。
22112212

22122213
読み込まれていないバッファでは、何しろ読み込まれていないのだから、
22132214
|:autocmd| は実行されていない。そのため、ある種のファイルからは思いも
@@ -2223,9 +2224,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる
22232224
5. タグ
22242225
6. インクルードされるファイル
22252226

2226-
CTRL-N と CTRL-P は 'iskeyword' を利用した全てのファイル名展開で使用で
2227-
きる (つまり辞書 |i_CTRL-X_CTRL-K|、インクルードされるパターン
2228-
|i_CTRL-X_CTRL-I|、タグ |i_CTRL-X_CTRL-]| および通常の展開)。
2227+
CTRL-N、CTRL-P および |ins-autocompletion| は、'iskeyword' ベースの補完
2228+
(辞書 |i_CTRL-X_CTRL-K|、包含パターン |i_CTRL-X_CTRL-I|、タグ
2229+
|i_CTRL-X_CTRL-]|、および通常の展開) に使用できる。'complete' に "F"
2230+
および "o" フラグを指定すると、キーワード以外の単語も補完できる。
22292231

22302232
補完ソースのフラグにキャレット ("^") と {count} を付加することで、補完
22312233
ソースに任意のマッチ数制限を指定できる。
@@ -2344,17 +2346,24 @@ Note 1番目の形式では、行全体がオプション指定に使われる
23442346
{|+textprop| 機能付きでコンパイルされたときのみ有効}
23452347

23462348
preinsert
2347-
現在の補完リーダーの一部ではない最初の候補単語の部分を事前
2348-
に挿入し、|hl-ComplMatchIns| ハイライトグループを使用する。
2349-
これを機能させるには、"fuzzy" を設定せずに、"menuone" を設
2350-
定する必要がある。
2349+
'autocomplete' がアクティブでない場合、最初の候補単語のう
2350+
ち、|hl-PreInsert| でハイライト表示されている現在の補完リー
2351+
ダーの後ろの部分を挿入する。カーソルは移動しない。'fuzzy'
2352+
が未設定で、'completeopt' に "menuone" が指定されている必
2353+
要がある。
2354+
2355+
'autocomplete' がアクティブな場合、(表示されているすべての
2356+
項目、または現在のバッファ項目から) マッチした単語の中で最
2357+
長の共通プリフィックスを挿入する。これは、メニュー項目が選
2358+
択されていない場合にのみ実行される。確定するには Ctrl-Y を
2359+
押す。
23512360

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

2356-
'autocomplete' が有効な場合、"fuzzy"、"popup"、"popuphidden" および
2357-
"preview" のみ効果がある。
2365+
'autocomplete' が有効な場合、"fuzzy"、"popup"、"popuphidden"
2366+
"preinsert" および "preview" のみ効果がある。
23582367

23592368
このオプションは |cmdline-completion| には適用されない。詳細については
23602369
'wildoptions' を参照。
@@ -3081,8 +3090,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる
30813090
内で設定することはできない。
30823091

30833092
*'dip'* *'diffopt'*
3084-
'diffopt' 'dip' 文字列 (既定では
3085-
"internal,filler,closeoff,inline:simple")
3093+
'diffopt' 'dip' 文字列 (既定では "internal,filler,closeoff,
3094+
indent-heuristic,inline:char")
30863095
グローバル
30873096
{|+diff| 機能付きでコンパイルされたときのみ有効}
30883097
差分モード用のオプション設定。以下の項目で構成できる。すべてオプション
@@ -4687,7 +4696,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
46874696
#:TabLineSel,_:TabLineFill,!:CursorColumn,
46884697
.:CursorLine,o:ColorColumn,q:QuickFixLine,
46894698
z:StatusLineTerm,Z:StatusLineTermNC,
4690-
g:MsgArea,h:ComplMatchIns")
4699+
g:MsgArea,h:ComplMatchIns,I:PreInsert")
46914700
グローバル
46924701
このオプションは、様々な対象に対する強調表示モードを設定する。文字の組
46934702
をコンマ区切りのリストとして指定する。1番目の文字は適用される対象を指
@@ -4752,6 +4761,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる
47524761
|hl-PmenuMatch| k ポップアップメニューのマッチしたテキスト
47534762
|hl-PmenuMatchSel| < ポップアップメニューの選択された行のマッチしたテ
47544763
キスト
4764+
|hl-PreInsert| I "preinsert" が 'completeopt' にあるときに挿入され
4765+
るテキスト
47554766

47564767
表示モードは以下の通りである。
47574768
r 反転 (termcapの項目 "mr" と "me")
@@ -5125,8 +5136,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる
51255136
したい場合、autocmd で 'hlsearch' をオン/オフできる。例: >
51265137
augroup vimrc-incsearch-highlight
51275138
autocmd!
5128-
autocmd CmdlineEnter /,\? :set hlsearch
5129-
autocmd CmdlineLeave /,\? :set nohlsearch
5139+
autocmd CmdlineEnter [\/\?] :set hlsearch
5140+
autocmd CmdlineLeave [\/\?] :set nohlsearch
51305141
augroup END
51315142
<
51325143
CTRL-L を押すと、現在マッチしているテキストの後からコマンドラインへ1文

en/options.txt

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.1. Last change: 2025 Sep 02
1+
*options.txt* For Vim version 9.1. Last change: 2025 Sep 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2124,10 +2124,11 @@ A jump table for the options with a short description can be found at |Q_op|.
21242124
*'complete'* *'cpt'* *E535*
21252125
'complete' 'cpt' string (default: ".,w,b,u,t,i")
21262126
local to buffer
2127-
This option specifies how keyword completion |ins-completion| works
2128-
when CTRL-P or CTRL-N are used. It is also used for whole-line
2129-
completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
2130-
and the places to scan. It is a comma-separated list of flags:
2127+
This option controls how completion |ins-completion| behaves when
2128+
using CTRL-P, CTRL-N, or |ins-autocompletion|. It is also used for
2129+
whole-line completion |i_CTRL-X_CTRL-L|. It indicates the type of
2130+
completion and the places to scan. It is a comma-separated list of
2131+
flags:
21312132
. scan the current buffer ('wrapscan' is ignored)
21322133
w scan buffers from other windows
21332134
b scan other loaded buffers that are in the buffer list
@@ -2163,8 +2164,9 @@ A jump table for the options with a short description can be found at |Q_op|.
21632164
is especially important for |ins-autocompletion|.
21642165
F equivalent to using "F{func}", where the function is taken from
21652166
the 'completefunc' option.
2166-
o equivalent to using "F{func}", where the function is taken from
2167-
the 'omnifunc' option.
2167+
o equivalent to "F{func}", where {func} is taken from the 'omnifunc'
2168+
option. If a plugin (such as an LSP client) defines 'omnifunc', it
2169+
can be used through this flag.
21682170

21692171
Unloaded buffers are not loaded, thus their autocmds |:autocmd| are
21702172
not executed, this may lead to unexpected completions from some files
@@ -2179,9 +2181,11 @@ A jump table for the options with a short description can be found at |Q_op|.
21792181
5. tags
21802182
6. included files
21812183

2182-
As you can see, CTRL-N and CTRL-P can be used to do any 'iskeyword'-
2183-
based expansion (e.g., dictionary |i_CTRL-X_CTRL-K|, included patterns
2184-
|i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]| and normal expansions).
2184+
CTRL-N, CTRL-P, and |ins-autocompletion| can be used for any
2185+
'iskeyword'-based completion (dictionary |i_CTRL-X_CTRL-K|, included
2186+
patterns |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]|, and normal
2187+
expansions). With the "F" and "o" flags in 'complete', non-keywords
2188+
can also be completed.
21852189

21862190
An optional match limit can be specified for a completion source by
21872191
appending a caret ("^") followed by a {count} to the source flag.
@@ -2298,17 +2302,22 @@ A jump table for the options with a short description can be found at |Q_op|.
22982302
{only works when compiled with the |+textprop| feature}
22992303

23002304
preinsert
2301-
Preinsert the portion of the first candidate word that is
2302-
not part of the current completion leader and using the
2303-
|hl-ComplMatchIns| highlight group. In order for it to
2304-
work, "fuzzy" must not be set and "menuone" must be set.
2305+
When 'autocomplete' is not active, inserts the part of the
2306+
first candidate word beyond the current completion leader,
2307+
highlighted with |hl-PreInsert|. The cursor doesn't move.
2308+
Requires "fuzzy" unset and "menuone" in 'completeopt'.
2309+
2310+
When 'autocomplete' is active, inserts the longest common
2311+
prefix of matches (from all shown items or from the
2312+
current buffer items). This occurs only when no menu item
2313+
is selected. Press CTRL-Y to accept.
23052314

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

2310-
Only "fuzzy", "popup", "popuphidden" and "preview" have an effect when
2311-
'autocomplete' is enabled.
2319+
Only "fuzzy", "popup", "popuphidden", "preinsert" and "preview" have
2320+
an effect when 'autocomplete' is enabled.
23122321

23132322
This option does not apply to |cmdline-completion|. See 'wildoptions'
23142323
for that.
@@ -3059,7 +3068,7 @@ A jump table for the options with a short description can be found at |Q_op|.
30593068

30603069
*'dip'* *'diffopt'*
30613070
'diffopt' 'dip' string (default
3062-
"internal,filler,closeoff,inline:simple")
3071+
"internal,filler,closeoff,indent-heuristic,inline:char")
30633072
global
30643073
{not available when compiled without the |+diff|
30653074
feature}
@@ -4654,7 +4663,7 @@ A jump table for the options with a short description can be found at |Q_op|.
46544663
#:TabLineSel,_:TabLineFill,!:CursorColumn,
46554664
.:CursorLine,o:ColorColumn,q:QuickFixLine,
46564665
z:StatusLineTerm,Z:StatusLineTermNC,
4657-
g:MsgArea,h:ComplMatchIns")
4666+
g:MsgArea,h:ComplMatchIns,I:PreInsert")
46584667
global
46594668
This option can be used to set highlighting mode for various
46604669
occasions. It is a comma-separated list of character pairs. The
@@ -4717,6 +4726,7 @@ A jump table for the options with a short description can be found at |Q_op|.
47174726
|hl-PmenuThumb| X popup menu scrollbar thumb
47184727
|hl-PmenuMatch| k popup menu matched text
47194728
|hl-PmenuMatchSel| < popup menu matched text in selected line
4729+
|hl-PreInsert| I text inserted when "preinsert" is in 'completeopt'
47204730

47214731
The display modes are:
47224732
r reverse (termcap entry "mr" and "me")
@@ -5079,8 +5089,8 @@ A jump table for the options with a short description can be found at |Q_op|.
50795089
autocmd. Example: >
50805090
augroup vimrc-incsearch-highlight
50815091
autocmd!
5082-
autocmd CmdlineEnter /,\? :set hlsearch
5083-
autocmd CmdlineLeave /,\? :set nohlsearch
5092+
autocmd CmdlineEnter [\/\?] :set hlsearch
5093+
autocmd CmdlineLeave [\/\?] :set nohlsearch
50845094
augroup END
50855095
<
50865096
CTRL-L can be used to add one character from after the current match

0 commit comments

Comments
 (0)