Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
114 changes: 70 additions & 44 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: 2024 Dec 28
*options.txt* For Vim バージョン 9.1. Last change: 2025 Feb 01


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -1059,7 +1059,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
するために使われる。もしも返された RGB の値が dark/light であり、
'background' が dark/light でなかったなら、'background' が設定されて画
面が再描画される。これは副作用があるかもしれない。問題があると疑わしき
場合は、.vimrc の t_BG を空にしよう。|t_RB| へのレスポンスは
場合は、.vimrc の 't_BG' を空にしよう。|t_RB| へのレスポンスは
|v:termrbgresp| の中に見つけることができる。

GUIを開始したとき、'background' の既定値は "light" である。値がファイ
Expand Down Expand Up @@ -2208,6 +2208,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる
プしたり、正確なシーケンスが入力されていなくてもマッチを見
つけることができる。

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

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

*'completepopup'* *'cpp'*
'completepopup' 'cpp' 字列 (既定では空)
グローバル
Expand Down Expand Up @@ -2900,11 +2908,19 @@ Note 1番目の形式では、行全体がオプション指定に使われる
差分モード用のオプション設定。値は、以下のキーワードのコンマ区切りのリ
ストである。指定しないものがあってもよい。

filler 片方のウィンドウ内のテキストのある位置に行が挿
入されていたときに、ウィンドウのスクロールを同
期させるために、埋め立て用の行を表示する。ウィ
ンドウが隣り合っていて、オプション
'scrollbind' がオンのときには大抵便利である。
algorithm:{text} 指定した差分アルゴリズムを内部diffエンジンで
使用する。現在サポートされているアルゴリズムは:
myers デフォルトのアルゴリズム
minimal 可能な限り小さな差分を生成するため
に余分な時間を費やす
patience patience差分アルゴリズム
histogram histogram差分アルゴリズム

closeoff 'diff' が設定されたウィンドウが閉じられ、同じ
タブページに 'diff' が設定されたウィンドウが
1 つだけ残っているとき、そのウィンドウで
`:diffoff` を実行する。これは `:diffsplit` コ
マンドを取り消す。

context:{n} 変更のあった行の上下を {n} 行だけ折り畳まずに
表示 (コンテキストの表示) する。指定されないと、
Expand All @@ -2915,6 +2931,23 @@ Note 1番目の形式では、行全体がオプション指定に使われる
は、非常に大きな値 (999999) に設定する。
|fold-diff| を参照。

filler 片方のウィンドウ内のテキストのある位置に行が挿
入されていたときに、ウィンドウのスクロールを同
期させるために、埋め立て用の行を表示する。ウィ
ンドウが隣り合っていて、オプション
'scrollbind' がオンのときには大抵便利である。

foldcolumn:{n} 差分モードの開始時にオプション 'foldcolumn' を
{n}に設定する。
Copy link
Member

Choose a reason for hiding this comment

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

原文の "Without this 2 is used." の訳が抜けていそうです。...ただこの文が何を言ってるのかがよくわからない...

Copy link
Contributor

Choose a reason for hiding this comment

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

よくわかりませんね... 2だけ設定できない?

Copy link
Member

Choose a reason for hiding this comment

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

あ、「これが設定されていなければ、デフォルト値として 2 が使用される」という意味ですかね?

Copy link
Member Author

Choose a reason for hiding this comment

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

しっくりきました。


followwrap 'wrap' オプションにそのまま従う。

horizontal (他に明示的に指定されない限り)ウィンドウを水平
分割して差分モードを開始する。

hiddenoff バッファが隠れバッファになるときに差分モードを
使用しない。

iblank 行がすべて空白の場合は変更を無視する。
'diffexpr' が空の場合、"diff" コマンドに "-B"
フラグを追加する。これが正確に何をするかについ
Expand All @@ -2928,6 +2961,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる
'diffexpr' が空なら、コマンド "diff" にフラグ
"-i" を追加する。

indent-heuristic
内部diffライブラリのインデントヒューリスティッ
クを使用する。

internal 内部diffライブラリを使用する。'diffexpr' が設
定されている場合は無視される。 *E960*
バッファを書き込むときにメモリが不足すると、こ
の項目はそのバッファに関連する差分に対して無視
される。これがいつ発生するかを確認するために
'verbose' オプションを設定すること。

iwhite 空白の数の違いを無視する。オプション
'diffexpr' が空なら、コマンド "diff" にフラグ
"-b" を追加する。これが正確には何を指定してい
Expand All @@ -2946,45 +2990,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる
る。これが正確に何をするかについては、"diff"
コマンドのドキュメントをチェックすること。

horizontal (他に明示的に指定されない限り)ウィンドウを水平
分割して差分モードを開始する。
linematch:{n} バッファ間で最も類似している行間の変更を揃えて
マークする。差分ハンクの合計行数が {n} を超え
ると非常に大きな差分ハンクでは顕著な遅延が発生
するため、行は揃えられない。適切な設定
は"linematch:60" である。これによりそれぞれ 30
行の2 バッファ差分ハンク、またはそれぞれ 20 行
の 3 バッファ差分ハンクの揃えが可能になる。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
行の2 バッファ差分ハンク、またはそれぞれ 20
3 バッファ差分ハンクの揃えが可能になる。
行の 2 バッファ差分ハンク、またはそれぞれ 20
行の 3 バッファ差分ハンクの揃えが可能になる。

空白抜けです

Copy link
Member Author

Choose a reason for hiding this comment

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

L2997の " の前に空白がないのも発見したのでローカルで修正しました。


vertical (他に明示的に指定されない限り)ウィンドウを垂直
分割して差分モードを開始する。

closeoff 'diff' が設定されたウィンドウが閉じられ、同じ
タブページに 'diff' が設定されたウィンドウが
1 つだけ残っているとき、そのウィンドウで
`:diffoff` を実行する。これは `:diffsplit` コ
マンドを取り消す。

hiddenoff バッファが隠れバッファになるときに差分モードを
使用しない。

foldcolumn:{n} 差分モードの開始時にオプション 'foldcolumn' を
{n}に設定する。

followwrap 'wrap' オプションにそのまま従う。

internal 内部diffライブラリを使用する。'diffexpr' が設
定されている場合は無視される。 *E960*
バッファを書き込むときにメモリが不足すると、こ
の項目はそのバッファに関連する差分に対して無視
される。これがいつ発生するかを確認するために
'verbose' オプションを設定すること。

indent-heuristic
内部diffライブラリのインデントヒューリスティッ
クを使用する。

algorithm:{text} 指定した差分アルゴリズムを内部diffエンジンで
使用する。現在サポートされているアルゴリズムは:
myers デフォルトのアルゴリズム
minimal 可能な限り小さな差分を生成するため
に余分な時間を費やす
patience patience差分アルゴリズム
histogram histogram差分アルゴリズム

例: >
:set diffopt=internal,filler,context:4
:set diffopt=
Expand Down Expand Up @@ -4379,7 +4395,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
#:TabLineSel,_:TabLineFill,!:CursorColumn,
.:CursorLine,o:ColorColumn,q:QuickFixLine,
z:StatusLineTerm,Z:StatusLineTermNC,
g:MsgArea")
g:MsgArea,h:ComplMatchIns")
グローバル
このオプションは、様々な対象に対する強調表示モードを設定する。文字の組
をコンマ区切りのリストとして指定する。1番目の文字は適用される対象を指
Expand All @@ -4399,6 +4415,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
|hl-MoreMsg| m 「継続」プロンプト |more-prompt|
|hl-ModeMsg| M モード表示 (例えば "-- INSERT --")
|hl-MsgArea| g |Command-line| とメッセージエリア
|hl-ComplMatchIns| h 現在挿入されている補完にマッチするテキスト
|hl-LineNr| n ":number" と ":#" コマンドでの行番号と、'number'
か 'relativenumber' がオンに設定されているときの行
番号。
Expand Down Expand Up @@ -8522,13 +8539,22 @@ Note 1番目の形式では、行全体がオプション指定に使われる
がこのように設定する必要がある。

*'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954*
'termguicolors' 'tgc' 切替 (既定ではオフ)
'termguicolors' 'tgc' 切替 (Vim が対応端末で実行されていることを検出しな
い限り、既定ではオフ)
グローバル
{|+termguicolors| 機能付きでコンパイルされたときのみ有
効}
オンのとき、|highlight-guifg| と |highlight-guibg| がターミナル内で使
われる(24ビットカラー)。

Vim が対応端末で実行されていることを検出すると自動的に有効になる (端末
が RGB terminfo 機能をサポートしている場合、または端末でサポートされて
いる色数 |t_Co| が 0x1000000 の場合、例: $TERM=xterm-direct)。端末のク
エリが非同期でおこなわれる性質上、これを自動的に有効にすると目立つこと
がある。明示的に無効にするには、 >
set notermguicolors
< を使用する。

ISO-8613-3 互換なターミナルが必要。このオプションを設定しても機能しな
い (色が UI に付かない) 場合は、|xterm-true-color| を読むと助けになる
かもしれない。
Expand Down
123 changes: 77 additions & 46 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: 2024 Dec 28
*options.txt* For Vim version 9.1. Last change: 2025 Feb 01


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1033,7 +1033,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When the |t_RB| option is set, Vim will use it to request the background
color from the terminal. If the returned RGB value is dark/light and
'background' is not dark/light, 'background' will be set and the
screen is redrawn. This may have side effects, make t_BG empty in
screen is redrawn. This may have side effects, make |t_RB| empty in
your .vimrc if you suspect this problem. The response to |t_RB| can
be found in |v:termrbgresp|.

Expand Down Expand Up @@ -2164,6 +2164,16 @@ A jump table for the options with a short description can be found at |Q_op|.
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.

*'completepopup'* *'cpp'*
'completepopup' 'cpp' string (default empty)
global
Expand Down Expand Up @@ -2880,11 +2890,20 @@ A jump table for the options with a short description can be found at |Q_op|.
Option settings for diff mode. It can consist of the following items.
All are optional. Items must be separated by a comma.

filler Show filler lines, to keep the text
synchronized with a window that has inserted
lines at the same position. Mostly useful
when windows are side-by-side and 'scrollbind'
is set.
algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
smallest possible diff
patience patience diff algorithm
histogram histogram diff algorithm

closeoff When a window is closed where 'diff' is set
and there is only one window remaining in the
same tab page with 'diff' set, execute
`:diffoff` in that window. This undoes a
`:diffsplit` command.

context:{n} Use a context of {n} lines between a change
and a fold that contains unchanged lines.
Expand All @@ -2895,6 +2914,23 @@ A jump table for the options with a short description can be found at |Q_op|.
value (999999) to disable folding completely.
See |fold-diff|.

filler Show filler lines, to keep the text
synchronized with a window that has inserted
lines at the same position. Mostly useful
when windows are side-by-side and 'scrollbind'
is set.

foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.

followwrap Follow the 'wrap' option and leave as it is.

horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise).

hiddenoff Do not use diff mode for a buffer when it
becomes hidden.

iblank Ignore changes where lines are all blank. Adds
the "-B" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
Expand All @@ -2908,6 +2944,17 @@ A jump table for the options with a short description can be found at |Q_op|.
are considered the same. Adds the "-i" flag
to the "diff" command if 'diffexpr' is empty.

indent-heuristic
Use the indent heuristic for the internal
diff library.

internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.

iwhite Ignore changes in amount of white space. Adds
the "-b" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
Expand All @@ -2927,46 +2974,19 @@ A jump table for the options with a short description can be found at |Q_op|.
of the "diff" command for what this does
exactly.

horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise).
linematch:{n} Align and mark changes between the most
similar lines between the buffers. When the
total number of lines in the diff hunk exceeds
{n}, the lines will not be aligned because for
very large diff hunks there will be a
noticeable lag. A reasonable setting is
"linematch:60", as this will enable alignment
for a 2 buffer diff hunk of 30 lines each,
or a 3 buffer diff hunk of 20 lines each.

vertical Start diff mode with vertical splits (unless
explicitly specified otherwise).

closeoff When a window is closed where 'diff' is set
and there is only one window remaining in the
same tab page with 'diff' set, execute
`:diffoff` in that window. This undoes a
`:diffsplit` command.

hiddenoff Do not use diff mode for a buffer when it
becomes hidden.

foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.

followwrap Follow the 'wrap' option and leave as it is.

internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.

indent-heuristic
Use the indent heuristic for the internal
diff library.

algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
smallest possible diff
patience patience diff algorithm
histogram histogram diff algorithm

Examples: >
:set diffopt=internal,filler,context:4
:set diffopt=
Expand Down Expand Up @@ -4348,7 +4368,7 @@ A jump table for the options with a short description can be found at |Q_op|.
#:TabLineSel,_:TabLineFill,!:CursorColumn,
.:CursorLine,o:ColorColumn,q:QuickFixLine,
z:StatusLineTerm,Z:StatusLineTermNC,
g:MsgArea")
g:MsgArea,h:ComplMatchIns")
global
This option can be used to set highlighting mode for various
occasions. It is a comma-separated list of character pairs. The
Expand All @@ -4368,6 +4388,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-MoreMsg| m |more-prompt|
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|hl-MsgArea| g |Command-line| and message area
|hl-ComplMatchIns| h matched text of currently inserted completion
|hl-LineNr| n line number for ":number" and ":#" commands, and
when 'number' or 'relativenumber' option is set.
|hl-LineNrAbove| a line number above the cursor for when the
Expand Down Expand Up @@ -5075,7 +5096,7 @@ A jump table for the options with a short description can be found at |Q_op|.
set keyprotocol=kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty
set keyprotocol+=xterm:mok2

< This means that when 'term' contains "kitty, "foot", "ghostty" or
< This means that when 'term' contains "kitty, "foot", "ghostty" or
"wezterm" somewhere, then the "kitty" protocol is used. When 'term'
contains "xterm" somewhere, then the "mok2" protocol is used.

Expand Down Expand Up @@ -8479,13 +8500,23 @@ A jump table for the options with a short description can be found at |Q_op|.
< You need to do this when your system has no locale support for UTF-8.

*'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954*
'termguicolors' 'tgc' boolean (default off)
'termguicolors' 'tgc' boolean (default off unless Vim detects that it runs
in a capable terminal)
global
{not available when compiled without the
|+termguicolors| feature}
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
the terminal (thus using 24-bit color).

Will automatically be enabled, if Vim detects that it runs in a
capable terminal (when the terminal supports the RGB terminfo
capability or when the number of colors |t_Co| supported by the
terminal is 0x1000000, e.g. with $TERM=xterm-direct). Due to the async
nature of querying the terminal, enabling this automatically is
noticable. Use >
set notermguicolors
< to explicitly disable.

Requires a ISO-8613-3 compatible terminal. If setting this option
does not work (produces a colorless UI) reading |xterm-true-color|
might help.
Expand Down