diff --git a/doc/options.jax b/doc/options.jax index dc7e56913..3975bc80a 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -1,4 +1,4 @@ -*options.txt* For Vim バージョン 9.1. Last change: 2025 Sep 29 +*options.txt* For Vim バージョン 9.1. Last change: 2025 Oct 25 VIMリファレンスマニュアル by Bram Moolenaar @@ -50,11 +50,11 @@ Vimには、特別な働きをさせるための多くの内部変数とスイ [!] がある場合、それぞれのオプションは独立した行に表示 される。 -:se[t] termcap ターミナルオプションを全て表示する。Note GUIバージョン - では、キーコードは表示されないので注意。なぜなら、キー - コードは内部的に生成され、変更が不可能だからだ。それに、 - GUIバージョンでターミナルコードを変更するのは便利とは - 言えない... +:se[t] termcap ターミナルオプションを全て表示する。Note GUI バージョ + ンでは、キーコードは表示されないので注意。なぜなら、 + キーコードは内部的に生成され、変更が不可能だからだ。そ + れに、GUI バージョンでターミナルコードを変更するのは便 + 利とは言えない... オプションの形式は t_AB である。|terminal-options| を 参照。 @@ -96,8 +96,9 @@ Vimには、特別な働きをさせるための多くの内部変数とスイ :se[t] {option}={value} または :se[t] {option}:{value} 数値および文字列オプションの値を {value} に設定する。 - 数値オプションの値は、10進数、(0x を頭に付けて) 16進数、 - または ('0' か '0o' を頭に付けて) 8進数で指定できる。 + 数値オプションの値は、10進数、(0x を頭に付けて) 16進 + 数、または ('0' か '0o' を頭に付けて) 8進数で指定でき + る。 オプション 'wildchar' で指定された文字 (既定では 、オプション 'compatible' がオンならば CTRL-E) を打ち込むと、古い値を挿入できる。固定された構文と名前 @@ -301,10 +302,11 @@ opt+=値" でオプションに文字列を追加したりするときには、 Note: 以下は |global-local| オプションにも適用される。 いくつかのオプションは、1つのウィンドウや1つのバッファのみに適用される。それぞ -れのウィンドウやバッファは、そうしたオプションの独自のコピーを保持しているため、 -独自の値を持つことができる。これにより、あるウィンドウ内では 'list' オプション -をオンにするが、他のウィンドウではオフにする、ということが可能になる。またオプ -ション 'shiftwidth' を、あるバッファ内では 3 にし、他では 4 にすることもできる。 +れのウィンドウやバッファは、そうしたオプションの独自のコピーを保持しているた +め、独自の値を持つことができる。これにより、あるウィンドウ内では 'list' オプ +ションをオンにするが、他のウィンドウではオフにする、ということが可能になる。ま +たオプション 'shiftwidth' を、あるバッファ内では 3 にし、他では 4 にすることも +できる。 以降では、特定の状況下でそれらのローカルオプションがどうなるかを説明する。実際 には、それらを全て知る必要はない。なぜなら、Vimはおそらくユーザーが予想する通 @@ -317,11 +319,11 @@ Note: 以下は |global-local| オプションにも適用される。 新しいバッファを編集するとき、そのバッファのローカルオプションは初期化されなけ ればならない。その以前のカレントバッファのローカルオプションは、そのバッファの -みに適用すべきものかもしれないので、新しいバッファには適用されない。その代わり、 -バッファについてローカルなオプションにはそれぞれグローバルな値があり、新しいバッ -ファにはそれが適用される。コマンド ":set" によって、ローカルな値とグローバルな -値の両方が変更される。コマンド "setlocal" はローカルな値のみを変更するので、そ -れで指定した値は新しいバッファには適用されない。 +みに適用すべきものかもしれないので、新しいバッファには適用されない。その代わ +り、バッファについてローカルなオプションにはそれぞれグローバルな値があり、新し +いバッファにはそれが適用される。コマンド ":set" によって、ローカルな値とグロー +バルな値の両方が変更される。コマンド "setlocal" はローカルな値のみを変更するの +で、それで指定した値は新しいバッファには適用されない。 すでに編集されているバッファを編集するときは、最後に閉じられたウィンドウ内のロ ーカルオプションが再び使われる。このバッファがこのウィンドウ内ですでに編集され @@ -329,13 +331,13 @@ Note: 以下は |global-local| オプションにも適用される。 編集されて閉じられたウィンドウ内の値が用いられる。 特定のバッファの種類についてウィンドウ内のローカルオプションを設定することも可 -能である。同じウィンドウ内で別のバッファを編集するときは、ウィンドウについてロー -カルなオプションを使い続けたくはないだろう。そのためVimはウィンドウについてロー -カルなオプションのグローバルな値を記憶しており、別のバッファの編集時にはそれを -用いる。ウィンドウはそれぞれ、それらの値の独自のコピーを持っている。そのため、 -それらのオプションはウィンドウについてはローカルであるが、そのウィンドウ内の全 -てのバッファについてグローバルである。それらを用いて、次のようなことが可能であ -る: > +能である。同じウィンドウ内で別のバッファを編集するときは、ウィンドウについて +ローカルなオプションを使い続けたくはないだろう。そのためVimはウィンドウについ +てローカルなオプションのグローバルな値を記憶しており、別のバッファの編集時には +それを用いる。ウィンドウはそれぞれ、それらの値の独自のコピーを持っている。その +ため、それらのオプションはウィンドウについてはローカルであるが、そのウィンドウ +内の全てのバッファについてグローバルである。それらを用いて、次のようなことが可 +能である: > :e 一つ目 :set list :e 二つ目 @@ -412,8 +414,8 @@ Note |global-local| オプションの挙動は、文字列ベースのオプシ オプションでは若干異なることに注意。 *:setg* *:setglobal* -:setg[lobal][!] ... コマンド ":set" と似ているが、ローカルオプションのグロー - バルな値のみを設定し、ローカルな値は変更しない。 +:setg[lobal][!] ... コマンド ":set" と似ているが、ローカルオプションのグ + ローバルな値のみを設定し、ローカルな値は変更しない。 オプションの値を表示するときは、グローバルな値が表示さ れる。 引数が "all" のとき: 全てのローカルオプションのグロー @@ -534,8 +536,9 @@ Vim9 script において、コンパイル済み関数内では、ラムダを 打ち込むと、新しい値を設定できる。ウィンドウやバッファ 固有のオプションについては、変更した値は最後に使用した ウィンドウに適用される。そのウィンドウがヘルプウィンド - ウだったときは、変更した値はヘルプウィンドウの (オプショ - ンウィンドウを抜かして) 1つ下のウィンドウに適用される。 + ウだったときは、変更した値はヘルプウィンドウの (オプ + ションウィンドウを抜かして) 1 つ下のウィンドウに適用さ + れる。 {|+eval| 機能付きでコンパイルされたときのみ有効} *$HOME* @@ -580,9 +583,9 @@ Note 展開されるオプションの値の長さ制限に注意。システム (CTRL-? は8進数で 0o177、16進数で 0x7f) - ターミナルのデリートキーのキーコードが違っているが、バッ - クスペースのキーコードは正しいときは、次のコマンドをファ - イル .vimrc に加えればよい: > + ターミナルのデリートキーのキーコードが違っているが、 + バックスペースのキーコードは正しいときは、次のコマンド + をファイル .vimrc に加えればよい: > :fixdel < これはバックスペースのキーコードが実際に何であっても有 効である。 @@ -624,8 +627,8 @@ Note 展開されるオプションの値の長さ制限に注意。システム ============================================================================== 2. オプションの自動設定 *auto-setting* -コマンド ":set" によるオプションの設定の他に、3通りの方法で、1つまたは複数のファ -イルに自動的にオプションを設定できる。 +コマンド ":set" によるオプションの設定の他に、3通りの方法で、1つまたは複数の +ファイルに自動的にオプションを設定できる。 1. Vimを起動したとき、様々な場所から初期化設定を読み込ませることができる。 |initialization| を参照。多くの設定は編集セッション全てに適用されるが、いく @@ -647,7 +650,8 @@ Note 展開されるオプションの値の長さ制限に注意。システム {vi:|vim:|ex:} "vi:" か "vim:" か "ex:" という文字列 [white] 空白、なくても良い {options} オプション設定が、空白か ':' で区切られて並んだもので、 - ':' の間の部分はコマンド ":set" の引数である(空でもよい) + ':' の間の部分はコマンド ":set" の引数である (空でもよ + い) 例: vi:noai:sw=3 ts=6 ~ @@ -758,19 +762,19 @@ Note 1番目の形式では、行全体がオプション指定に使われる 実行することを表す。切り替えオプションを「オフに」するというのは ":set noオプション" を実行することを表す。 -いくつかのオプションには、既定値が2種類あるものがある: 1つ目は "Vim default" -つまりVimの既定値で、オプション 'compatible' がオフになっているときに使われる。 -2つ目は "Vi default" つまりViの既定値で、オプション 'compatible' がオンになっ -ているときに使われる。 +いくつかのオプションには、既定値が 2 種類あるものがある: 1 つ目は "Vim default" +つまり Vim の既定値で、オプション 'compatible' がオフになっているときに使われ +る。2 つ目は "Vi default" つまり Vi の既定値で、オプション 'compatible' がオン +になっているときに使われる。 ほとんどのオプションは全てのウィンドウやバッファで共通である。さてその中には、 テキストがウィンドウ内でどのように表示されるかを定めるものもある。そういったオ -プションは、ウィンドウごとに違う値にできる。例えばオプション 'list' は、あるウィ -ンドウ内でオンにしても、同じテキストを編集している別のウィンドウ内ではオフに -することができる。すると同時に違った表示方法が使える。また、ファイルごとに特定 -の値にできるオプションもある。そういったオプションは、ファイルごとまたはバッファ -ごとに違う値にできる。例えばオプション 'textwidth' は、通常のテキストファイル -には78にし、Cプログラムのファイルには0にするようにできる。 +プションは、ウィンドウごとに違う値にできる。例えばオプション 'list' は、ある +ウィンドウ内でオンにしても、同じテキストを編集している別のウィンドウ内ではオフ +にすることができる。すると同時に違った表示方法が使える。また、ファイルごとに特 +定の値にできるオプションもある。そういったオプションは、ファイルごとまたはバッ +ファごとに違う値にできる。例えばオプション 'textwidth' は、通常のテキストファ +イルには 78 にし、C プログラムのファイルには 0 にするようにできる。 グローバル: 一つのオプションが全てのバッファやウィンドウに対して適用される @@ -786,16 +790,17 @@ Note 1番目の形式では、行全体がオプション指定に使われる ていると (既定ではこうなっている)、新しいバッファが最初にアクティブになったと きに、その前にアクティブだったバッファでの値がコピーされる。フラグ 'S' が含ま れていると、バッファがアクティブになる度に値がコピーされる。これはグローバルオ -プションであるようなものである。フラグ 's' もフラグ 'S' も含まれていないときは、 -バッファが作られるときに、その前にアクティブだったバッファでの値がコピーされる。 +プションであるようなものである。フラグ 's' もフラグ 'S' も含まれていないとき +は、バッファが作られるときに、その前にアクティブだったバッファでの値がコピーさ +れる。 隠しオプション *hidden-options* 全てのオプションが全てのバージョンでサポートされているわけではない。これは有効 -にされている機能とシステムにもよる。これに関しての注意は以下の波括弧の中にある。 -もしあるオプションがサポートされていなくても、そのオプションへの設定はエラーに -ならず成功する。これを隠しオプションと呼ぶ。しかし隠しオプションの値は保持され -ていないため、取得することはできない。 +にされている機能とシステムにもよる。これに関しての注意は以下の波括弧の中にあ +る。もしあるオプションがサポートされていなくても、そのオプションへの設定はエ +ラーにならず成功する。これを隠しオプションと呼ぶ。しかし隠しオプションの値は保 +持されていないため、取得することはできない。 オプション "foo" が ":set" で設定できるかどうか判定するにはこのようにする: > if exists('&foo') @@ -863,8 +868,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる ションを "double" にして、Vimが認識する幅をフォントのグリフの幅に合わ せなければならない。CJKのMS-WindowsでもシステムのロケールがCJKロケール のどれかに設定されている場合は多分 "double" にしなければならないだろ - う。 - Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11)を参照。 + う。Unicode Standard Annex #11 (http://www.unicode.org/reports/tr11) + を参照。 Vim が |+termresponse| 機能付きでコンパイルされ、|t_u7| にカーソル位置 取得のためのエスケープシーケンスが設定されているとき、このオプションの @@ -929,10 +934,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル {Vimのコンパイル時に有効にされたときのみ有効。使用で きるかどうかは exists("+autochdir") で確認できる} - これがオンであるとファイルを開くとき、バッファを切り替えるとき、バッファ - を削除するとき、ウィンドウを開閉するときに毎回作業ディレクトリが変更さ - れる。開かれた/選択されたファイルを含んでいるディレクトリがカレント - ディレクトリになる。 + これがオンであるとファイルを開くとき、バッファを切り替えるとき、バッ + ファを削除するとき、ウィンドウを開閉するときに毎回作業ディレクトリが変 + 更される。開かれた/選択されたファイルを含んでいるディレクトリがカレン + トディレクトリになる。 無名バッファの場合、ディレクトリもないため、そのバッファに移動してもカ レントディレクトリは変更されない。 Note: このオプションがオンになっていると動かないプラグインがある。 @@ -1620,9 +1625,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる オンのときは、バッファはバッファリストに表示される。オフのときは、その バッファはコマンド ":bnext" や ":ls" およびバッファメニュー等の対象に ならない。 - ファイル名やマークを思い出したりするためだけのバッファでは、このオプショ - ンはオフになる。バッファの編集を始めたときは、このオプションはオンにな - る。しかし ":buffer" でバッファに移動したときはオンにはならない。 + ファイル名やマークを思い出したりするためだけのバッファでは、このオプ + ションはオフになる。バッファの編集を始めたときは、このオプションはオン + になる。しかし ":buffer" でバッファに移動したときはオンにはならない。 *'buftype'* *'bt'* *E382* 'buftype' 'bt' 文字列 (既定では "") @@ -1744,8 +1749,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル {|+eval| 機能付きでコンパイルされたときのみ有効} 文字エンコーディングの変換に使われる expression を定める。これは読み込 - まれようとしているファイルや書き込みをしたファイルのエンコーディングが、 - 望むものと違うときに評価される。 + まれようとしているファイルや書き込みをしたファイルのエンコーディング + が望むものと違うときに評価される。 オプション 'charconvert' の値は、内部関数 iconv() がサポートされ、それ による変換が可能ならば使われることはない。ずっと高速なため、iconv() の 使用を推奨する。 @@ -1966,10 +1971,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる x11 X11 セレクション gui GUI 固有のメソッド other その他のメソッド + * クリップボードプロバイダのメソッド Note: "other" は GUI なしで Vim を実行している場合の、MS-Windows や MacOS など、X11/Wayland がないシステム使用される。 + Note クリップボードプロバイダを使用する場合は、そのプロバイダの名前を + 使用する必要がある。詳細については、|clipboard-providers| を参照。 + オプションの値は、コンマ区切りの項目のリストである。リストは左から右へ と順に解析され、Vim が最初に利用可能または動作していると判断するメソッ ドが、クリップボードへのアクセスに実際に使用される。このオプションを空 @@ -2341,8 +2350,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる も発生しない。 noselect メニュー項目が事前に選択されない点を除いて、"noinsert" と - 同じである。"noinsert" と "noselect" の両方が存在する場合 - は、"noselect" が優先される。 + 同じである。"noinsert" と "noselect" の両方が指定されてい + る場合、"noselect" が優先される。'autocomplete' がオンの場 + 合、"preinsert" も有効になっていない限り、これは自動的に有 + 効になる。 nosort "fuzzy" が有効になっている場合の、ファジースコアに基づく補 完候補の並べ替えを無効にする。候補は元の順序で表示される。 @@ -2386,13 +2397,54 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル {|+textprop| または |+quickfix| 機能付きでコンパイルさ れたときのみ有効} - 'completeopt' に "popup" が含まれている場合、このオプションは、作成時 - に情報ポップアップのプロパティに使用される。すでに情報ポップアップウィ - ンドウが有る場合は閉じられ、再生成されるときにオプションの値が適用され + 'completeopt' に "popup" が含まれている場合、このオプションは情報ポッ + プアップの作成時にそのプロパティを指定する。情報ポップアップウィンドウ + が既に存在する場合は閉じられ、再度作成された際にオプション値が適用され る。 - また、|popup_findinfo()| を使用して、|popup_setoptions()| で既存の情報 - ポップアップのプロパティを設定することもできる。|complete-popup| を参 - 照。 + + オプションはコンマで区切られた値のリストである: + align "item" (デフォルト) または "menu" + border 境界線のスタイル: + "single" 細い罫線文字 + "double" 2重線 + "round" 丸い角 + "ascii" ASCII 文字 (-, |, +) + "custom:X;X;X;X;X;X;X;X" + セミコロンで区切られた 8 文字。 + 順序は、上、右、下、左、左上、 + 右上、右下、左下 + "on" 'encoding' が "utf-8" かつ + 'ambiwidth' が "single" の場合 + は "double" と同じ、それ以外の + 場合は "ascii" (デフォルト) + "off" 境界線なし + borderhighlight ポップアップの境界文字のハイライトグループ + close 閉じるボタンを表示: "on" (デフォルト) または + "off" + height ポップアップの最大高さ + highlight ポップアップのハイライトグループ (default: + PmenuSel) + resize サイズ変更ハンドルを表示: "on" (デフォルト) ま + たは "off" + shadow |hl-PmenuShadow| を使用する。"off" (デフォルト) + または "on" + width ポップアップの最大幅 + + 例: > + :set completepopup=height:10,border:single,highlight:InfoPopup + :set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└ +< + "align" を "item" に設定すると、ポップアップは選択された項目の近くに配 + 置され、選択内容の変更に応じて移動する。 + "menu" に設定すると、ポップアップはメニューの上部 (メニューがテキスト + の下に表示される場合) または下部 (メニューがテキストの上に表示される場 + 合) に揃えられる。 + + 閉じるボタンとサイズ変更ハンドルは、'mouse' が有効な場合にのみポップ + アップのボーダーに表示される。 + + 作成後、情報ポップアップは |popup_findinfo()| で位置を特定し、 + |popup_setoptions()| で変更できる。|complete-popup| も参照。 *'completeslash'* *'csl'* 'completeslash' 'csl' 文字列 (既定では "") @@ -3879,6 +3931,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる foldopen '-' 折り畳みの先頭のマーク foldclose '+' 閉じられた折り畳みのマーク foldsep '|' 開いた折り畳みの中間文字 + foldinner なし 狭い 'foldcolumn' 内で繰り返される場合 + に、数値の折り畳みレベルの代わりに表示 + する文字 diff '-' 'diff' での削除された行 eob '~' バッファ終端以降の空行 lastline '@' 'display' が含む最終行/切り捨て @@ -4511,6 +4566,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる *'go-c'* 'c' 単純な選択にはポップアップダイアログでなくコンソールダイアログ を使う。 + *'go-C'* + 'C' 使用可能な場合は |hl-TitleBar| と |hl-TitleBarNC| を使用する。 + 現在は MS-Window GUI でのみ動作する。 + 詳細は |gui-w32-title-bar| を参照。 *'go-d'* 'd' 可能であれば、ダークテーマの亜種を使用する。現在、GTK+ GUIでの み機能する。 @@ -4710,7 +4769,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる =:PmenuSel, k:PmenuMatch,<:PmenuMatchSel, [:PmenuKind,]:PmenuKindSel, {:PmenuExtra,}:PmenuExtraSel, - x:PmenuSbar,X:PmenuThumb,*:TabLine, + x:PmenuSbar,X:PmenuThumb,j:PmenuBorder, + H:PmenuShadow,*:TabLine, #:TabLineSel,_:TabLineFill,!:CursorColumn, .:CursorLine,o:ColorColumn,q:QuickFixLine, z:StatusLineTerm,Z:StatusLineTermNC, @@ -4779,6 +4839,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる |hl-PmenuMatch| k ポップアップメニューのマッチしたテキスト |hl-PmenuMatchSel| < ポップアップメニューの選択された行のマッチしたテ キスト + |hl-PmenuBorder| j ポップアップメニューのボーダー文字 + |hl-PmenuShadow| H ポップアップメニューの影 |hl-PreInsert| I "preinsert" が 'completeopt' にあるときに挿入され るテキスト @@ -5122,11 +5184,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル {|+extra_search| 機能付きでコンパイルされたときのみ有 効} - 検索コマンドを打ち込んでいる間にも、打ち込んだところまでのパターンがマッ - チするテキストを、すぐに表示する。マッチした文字列は強調表示される。パ - ターンが不適切であったり見つからなければ、何も表示されない。画面は次々 - 更新されることになるので、このオプションは表示の速いターミナルでのみ有 - 用である。 + 検索コマンドを打ち込んでいる間にも、打ち込んだところまでのパターンが + マッチするテキストを、すぐに表示する。マッチした文字列は強調表示され + る。パターンが不適切であったり見つからなければ、何も表示されない。画面 + は次々更新されることになるので、このオプションは表示の速いターミナルで + のみ有用である。 コマンドのパターンにも適用される: > :global :lvimgrep @@ -5257,9 +5319,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる 以下の挿入モードのコマンドが便利だろう。 - カーソル移動に矢印キーを使う - 1個のノーマルモードコマンドを実行するためにはコマンド CTRL-O を使う - |i_CTRL-O|。コマンドが別のキー列にマッピングされていたときは、オプショ - ン 'insertmode' がオフであるときのように実行される。つまりマッピング - の内容が終了するまでノーマルモードが続く。 + |i_CTRL-O|。コマンドが別のキー列にマッピングされていたときは、オプ + ション 'insertmode' がオフであるときのように実行される。つまりマッピ + ングの内容が終了するまでノーマルモードが続く。 - 数個のノーマルモードコマンドを使うためには先に CTRL-L を使い、その後 挿入モードに戻るために を使う。Note CTRL-L を使うと、 'insertmode' をオフにして を押したときと同様にカーソルが左へ移 @@ -5430,7 +5492,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる |encryption| と 'cryptmethod' を参照。 注意: このキーの値を手動で {訳注: コマンド ":set" を使って、ということ} 設定しないこと。誰かが入力された文字を盗み見るかもしれない。代わりにコ - マンド |:X| を使うこと。しかし次のようにして、'key' を空にするのはよい。 > + マンド |:X| を使うこと。しかし次のようにして、'key' を空にするのはよ + い。 > :set key= < このオプションの値は、":set key" や "echo &key" 等で得ることはできない。 これは、値を知るべきでない人に知られないようにするためである。このこと @@ -6053,9 +6116,9 @@ Note 1番目の形式では、行全体がオプション指定に使われる 'menuitems' 'mis' 数値 (既定では 25) グローバル {|+menu| 機能付きでコンパイルされたときのみ有効} - メニューの項目数の最大値。自動生成されるメニュー、例えばバッファメニュー - に対して使われる。このオプションを変更しても直接の効果はなく、メニュー - を更新しなければならない。 + メニューの項目数の最大値。自動生成されるメニュー、例えばバッファメ + ニューに対して使われる。このオプションを変更しても直接の効果はなく、メ + ニューを更新しなければならない。 *'messagesopt'* *'mopt'* 'messagesopt' 'mopt' 文字列 (既定では "hit-enter,history:500") @@ -6815,6 +6878,39 @@ Note 1番目の形式では、行全体がオプション指定に使われる グローバル オンならば、Ex モードでプロンプト ":" が表示される。 + *'pumborder'* *'pb'* +'pumborder' 'pb' 文字列 (既定では "") + グローバル + 補完時のポップアップメニューのボーダーとオプションの装飾を定義する。値 + はコンマ区切りのキーワードリストである。 + + ボーダーのスタイル (最大 1 つ): + "single" 細い罫線文字を使用する + "double" 2 重の罫線文字を使用する + "round" 角を丸くする + "ascii" ASCII 文字を使う (-, |, +) + "custom:X;X;X;X;X;X;X;X" + セミコロンで区切られた 8 文字を次の順序で使用する: + 上、右、下、左、左上、右上、右下、左下 + + 追加のフラグ: + "margin" 左右のボーダーの内側に 1 セル分のスペースを追加する + "shadow" 右端と下端に影を描く + + ハイライトグループ: + |hl-PmenuBorder| 枠線文字に使用される + |hl-PmenuShadow| 影に使用される + + 例: > + :set pumborder=single + :set pumborder=double,margin,shadow + :set pumborder=custom:─;│;─;│;┌;┐;┘;└,shadow +< + 罫線文字 ("single", "double", "round") を使用したボーダースタイルは、 + 'encoding' が "utf-8" かつ 'ambiwidth' が "single" の場合にのみ使用で + きる。"margin" にはボーダースタイルが必要である。 + 以下も参照: |ins-completion-menu|。 + *'pumheight'* *'ph'* 'pumheight' 'ph' 数値 (既定では 0) グローバル @@ -7268,8 +7364,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる 3. Vim付属のファイルを読み込むため、環境変数 $VIMRUNTIME 内を検索する。 *after-directory* 4. システム管理者が付属ファイルによる設定を上書きしたり、それに追加設 - 定をしたりできるようにするため、システム共通のVimディレクトリ内のディ - レクトリ "after" を検索する (これは滅多に使われない)。 + 定をしたりできるようにするため、システム共通のVimディレクトリ内の + ディレクトリ "after" を検索する (これは滅多に使われない)。 5. ユーザーが付属ファイルやシステム管理者による設定を上書きしたり、そ れに追加設定をしたりできるようにするため、ユーザーのホームディレク トリ内のディレクトリ "after" を検索する。 @@ -7477,7 +7573,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる *'sessionoptions'* *'ssop'* 'sessionoptions' 'ssop' 文字列 (既定では "blank,buffers,curdir,folds, - help,options,tabpages,winsize,terminal") + help,options,tabpages,winsize,terminal") グローバル {|+mksession| 機能付きでコンパイルされたときのみ有効} コマンド |:mksession| の効果を変更する。値はキーワードのコンマ区切りの @@ -7504,8 +7600,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる テムからアクセスを受けるプロジェクトでは便利である) slash ファイル名内の '\' がスラッシュに置換される tabpages 全タブページ。これが含まれていないと、カレントタブペー - ジのみが復元される。そのため、タブページごとに別々のセッ - ションを保存することができる。 + ジのみが復元される。そのため、タブページごとに別々の + セッションを保存することができる。 terminal コマンドが復元できる端末ウィンドウを含む unix WindowsやDOS上でも、Unix形式の end-of-line (1個の ) を使う @@ -7564,8 +7660,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる "-Command"、あるいは "sh" が含まれないとき: "/c") グローバル - "!" や ":!" 等のコマンドを実行するためにシェルに渡されるフラグ。例えば、 - "bash.exe -c ls", "powershell.exe -Command dir" または + "!" や ":!" 等のコマンドを実行するためにシェルに渡されるフラグ。例え + ば、"bash.exe -c ls", "powershell.exe -Command dir" または "cmd.exe /c dir" である。MS-Windowsでは、ユーザーがこのオプションを設 定する必要がないように、既定値は 'shell' に適した値が設定される。 Unix では一つ以上のフラグを指定できる。空白で区切られた各部は shell @@ -10278,10 +10374,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる このオプションは、テキストの表示方法を変える。これはバッファ内のテキス トには変更を与えない。それについてはオプション 'textwidth' を参照。 オンのときは、ウィンドウの幅より長い行は折り返され、次の行に続けて表示 - される。オフのときは、折り返しは行われず、長い行は一部のみが表示される。 - カーソルが表示されていない部分に移動すると、画面は水平スクロールする。 - 行の分割は、必要であれば単語の中ででも行われる。折り返しを単語の境界で - 行うには、'linebreak' を参照。 + される。オフのときは、折り返しは行われず、長い行は一部のみが表示され + る。カーソルが表示されていない部分に移動すると、画面は水平スクロールす + る。行の分割は、必要であれば単語の中ででも行われる。折り返しを単語の境 + 界で行うには、'linebreak' を参照。 水平スクロールをもっと便利にするには、次のようにしてみるとよい。 > :set sidescroll=5 :set listchars+=precedes:<,extends:> diff --git a/en/options.txt b/en/options.txt index e644fd11d..837edfe81 100644 --- a/en/options.txt +++ b/en/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2025 Sep 29 +*options.txt* For Vim version 9.1. Last change: 2025 Oct 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -32,8 +32,8 @@ achieve special effects. These options come in three forms: :se[t] termcap Show all terminal options. Note that in the GUI the key codes are not shown, because they are generated - internally and can't be changed. Changing the terminal - codes in the GUI is not useful either... + internally and can't be changed. Changing the + terminal codes in the GUI is not useful either... The options have the form t_AB, see |terminal-options|. @@ -1493,8 +1493,8 @@ A jump table for the options with a short description can be found at |Q_op|. {not available when compiled without the |+linebreak| feature} Every wrapped line will continue visually indented (same amount of - space as the beginning of that line), thus preserving horizontal blocks - of text. + space as the beginning of that line), thus preserving horizontal + blocks of text. NOTE: This option is reset when 'compatible' is set. *'breakindentopt'* *'briopt'* @@ -1839,13 +1839,14 @@ A jump table for the options with a short description can be found at |Q_op|. register '*' for all yank, delete, change and put operations which would normally go to the unnamed register. When "unnamed" is also included to the - option, yank operations (but not delete, change or put) - will additionally copy the text into register '*'. If - Wayland is being used and the compositor does not - support the primary-selection-unstable-v1 protocol, - then the regular selection is used in its place. Only - available with the |+X11| or |+wayland_clipboard| - feature. Availability can be checked with: > + option, yank operations (but not delete, change or + put) will additionally copy the text into register + '*'. If Wayland is being used and the compositor does + not support the primary-selection-unstable-v1 + protocol, then the regular selection is used in its + place. Only available with the |+X11| or + |+wayland_clipboard| feature. Availability can be + checked with: > if has('unnamedplus') < *clipboard-autoselect* @@ -1918,10 +1919,15 @@ A jump table for the options with a short description can be found at |Q_op|. x11 X11 selections gui GUI specific method other Some other method + * Clipboard provider method Note: "other" is used on systems without X11/Wayland, such as MS-Windows or MacOS, when running Vim without the GUI. + Note that the name of the clipboard provider should be used when you + want to use a clipboard provider. See |clipboard-providers| for more + information. + The option value is a list of comma separated items. The list is parsed left to right in order, and the first method that Vim determines is available or is working is used as the actual method for @@ -2147,12 +2153,12 @@ A jump table for the options with a short description can be found at |Q_op|. |i_CTRL-X_CTRL-D| ] tag completion t same as "]" - F{func} call the function {func}. Multiple "F" flags may be specified. - Refer to |complete-functions| for details on how the function - is invoked and what it should return. The value can be the - name of a function or a |Funcref|. For |Funcref| values, - spaces must be escaped with a backslash ('\'), and commas with - double backslashes ('\\') (see |option-backslash|). + F{func} call the function {func}. Multiple "F" flags may be + specified. Refer to |complete-functions| for details on how + the function is invoked and what it should return. The value + can be the name of a function or a |Funcref|. For |Funcref| + values, spaces must be escaped with a backslash ('\'), and + commas with double backslashes ('\\') (see |option-backslash|). Unlike other sources, functions can provide completions starting from a non-keyword character before the cursor, and their start position for replacing text may differ from other @@ -2257,12 +2263,11 @@ A jump table for the options with a short description can be found at |Q_op|. see 'completefuzzycollect'. longest - When 'autocomplete' is not active, only the longest - common prefix of the matches is inserted. If the popup - menu is displayed, you can use CTRL-L to add more - characters. Whether case is ignored depends on the type - of completion. For buffer text the 'ignorecase' option - applies. + When 'autocomplete' is not active, only the longest common + prefix of the matches is inserted. If the popup menu is + displayed, you can use CTRL-L to add more characters. + Whether case is ignored depends on the type of completion. + For buffer text the 'ignorecase' option applies. When 'autocomplete' is active and no completion item is selected, the longest common prefix of the matches is @@ -2293,7 +2298,9 @@ A jump table for the options with a short description can be found at |Q_op|. noselect Same as "noinsert", except that no menu item is pre-selected. If both "noinsert" and "noselect" are - present, "noselect" has precedence. + present, "noselect" takes precedence. This is enabled + automatically when 'autocomplete' is on, unless + "preinsert" is also enabled. nosort Disable sorting of completion candidates based on fuzzy scores when "fuzzy" is enabled. Candidates will appear @@ -2313,8 +2320,8 @@ A jump table for the options with a short description can be found at |Q_op|. {only works when compiled with the |+textprop| feature} preinsert - Inserts the text of the first completion candidate - beyond the current leader, highlighted with |hl-PreInsert|. + Inserts the text of the first completion candidate beyond + the current leader, highlighted with |hl-PreInsert|. The cursor does not move. Requires "fuzzy" to be unset, and either "menuone" in 'completeopt' or 'autocomplete' enabled. When @@ -2337,12 +2344,50 @@ A jump table for the options with a short description can be found at |Q_op|. global {not available when compiled without the |+textprop| or |+quickfix| feature} - When 'completeopt' contains "popup" then this option is used for the + When 'completeopt' contains "popup", this option specifies the properties of the info popup when it is created. If an info popup window already exists it is closed, so that the option value is applied when it is created again. - You can also use |popup_findinfo()| and then set properties for an - existing info popup with |popup_setoptions()|. See |complete-popup|. + + The option is a comma-separated list of values: + align "item" (default) or "menu" + border border style: + "single" thin box-drawing characters + "double" double-line + "round" rounded corners + "ascii" ASCII characters (-, |, +) + "custom:X;X;X;X;X;X;X;X" + eight characters separated by + semicolons, in the order: top, + right, bottom, left, topleft, + topright, botright, botleft + "on" same as "double" when + 'encoding' is "utf-8" and + 'ambiwidth' is "single", else + "ascii" (default) + "off" no border + borderhighlight highlight group for the popup border characters + close show close button: "on" (default) or "off" + height maximum height of the popup + highlight popup highlight group (default: PmenuSel) + resize show resize handle: "on" (default) or "off" + shadow "off" (default) or "on" using |hl-PmenuShadow| + width maximum width of the popup + + Example: > + :set completepopup=height:10,border:single,highlight:InfoPopup + :set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└ +< + When "align" is set to "item", the popup is positioned near the + selected item and moves as the selection changes. + When set to "menu", the popup aligns with the top of the menu (if the + menu appears below the text) or with the bottom (if it appears above). + + The close button and resize handle are shown on the popup border only + when 'mouse' is enabled. + + After creation, the info popup can be located with |popup_findinfo()| + and modified using |popup_setoptions()|. See also: |complete-popup|. *'completeslash'* *'csl'* 'completeslash' 'csl' string (default: "") @@ -2353,7 +2398,8 @@ A jump table for the options with a short description can be found at |Q_op|. completion in insert mode. This is useful when editing HTML tag, or Makefile with 'noshellslash' on MS-Windows. - When this option is set to "backslash", backslash is used. This is - useful when editing a batch file with 'shellslash' set on MS-Windows. + useful when editing a batch file with 'shellslash' set on + MS-Windows. - When this option is empty, same character is used as for 'shellslash'. For Insert mode completion the buffer-local value is used. For @@ -3852,6 +3898,9 @@ A jump table for the options with a short description can be found at |Q_op|. foldopen '-' mark the beginning of a fold foldclose '+' show a closed fold foldsep '|' open fold middle character + foldinner none character to show instead of the + numeric foldlevel when it would be + repeated in a narrow 'foldcolumn' diff '-' deleted lines of the 'diff' option eob '~' empty lines below the end of a buffer lastline '@' 'display' contains lastline/truncate @@ -4483,6 +4532,10 @@ A jump table for the options with a short description can be found at |Q_op|. *'go-c'* 'c' Use console dialogs instead of popup dialogs for simple choices. + *'go-C'* + 'C' Use |hl-TitleBar| and |hl-TitleBarNC| if available. + Currently only works for MS-Window GUI. + See |gui-w32-title-bar| for details. *'go-d'* 'd' Use dark theme variant if available. Currently only works for GTK+ GUI. @@ -4675,7 +4728,8 @@ A jump table for the options with a short description can be found at |Q_op|. =:PmenuSel, k:PmenuMatch,<:PmenuMatchSel, [:PmenuKind,]:PmenuKindSel, {:PmenuExtra,}:PmenuExtraSel, - x:PmenuSbar,X:PmenuThumb,*:TabLine, + x:PmenuSbar,X:PmenuThumb,j:PmenuBorder, + H:PmenuShadow,*:TabLine, #:TabLineSel,_:TabLineFill,!:CursorColumn, .:CursorLine,o:ColorColumn,q:QuickFixLine, z:StatusLineTerm,Z:StatusLineTermNC, @@ -4742,6 +4796,8 @@ A jump table for the options with a short description can be found at |Q_op|. |hl-PmenuThumb| X popup menu scrollbar thumb |hl-PmenuMatch| k popup menu matched text |hl-PmenuMatchSel| < popup menu matched text in selected line + |hl-PmenuBorder| j popup menu border characters + |hl-PmenuShadow| H popup menu shadow |hl-PreInsert| I text inserted when "preinsert" is in 'completeopt' The display modes are: @@ -5564,8 +5620,8 @@ A jump table for the options with a short description can be found at |Q_op|. global {only available when compiled with the |+langmap| feature} - When off, setting 'langmap' does not apply to characters resulting from - a mapping. This basically means, if you noticed that setting + When off, setting 'langmap' does not apply to characters resulting + from a mapping. This basically means, if you noticed that setting 'langmap' disables some of your mappings, try resetting this option. This option defaults to on for backwards compatibility. Set it off if that works for you to avoid mappings to break. @@ -5588,8 +5644,8 @@ A jump table for the options with a short description can be found at |Q_op|. executing macros, registers and other commands that have not been typed. Also, updating the window title is postponed. To force an update use |:redraw|. - This may occasionally cause display errors. It is only meant to be set - temporarily when performing an operation where redrawing may cause + This may occasionally cause display errors. It is only meant to be + set temporarily when performing an operation where redrawing may cause flickering or cause a slowdown. *'lhistory'* *'lhi'* @@ -6506,10 +6562,10 @@ A jump table for the options with a short description can be found at |Q_op|. some text from one window and paste it in Vim. This will avoid unexpected effects. Setting this option is useful when using Vim in a terminal, where Vim - cannot distinguish between typed text and pasted text. In the GUI, Vim - knows about pasting and will mostly do the right thing without 'paste' - being set. The same is true for a terminal where Vim handles the - mouse clicks itself. + cannot distinguish between typed text and pasted text. In the GUI, + Vim knows about pasting and will mostly do the right thing without + 'paste' being set. The same is true for a terminal where Vim handles + the mouse clicks itself. This option is reset when starting the GUI. Thus if you set it in your .vimrc it will work in a terminal, but not in the GUI. Setting 'paste' in the GUI has side effects: e.g., the Paste toolbar button @@ -6555,8 +6611,8 @@ A jump table for the options with a short description can be found at |Q_op|. 'pastetoggle' works in Insert mode and Normal mode, but not in Command-line mode. Mappings are checked first, thus overrule 'pastetoggle'. However, - when 'paste' is on mappings are ignored in Insert mode, thus you can do - this: > + when 'paste' is on mappings are ignored in Insert mode, thus you can + do this: > :map :set paste :map :set nopaste :imap :set paste @@ -6779,6 +6835,40 @@ A jump table for the options with a short description can be found at |Q_op|. global When on a ":" prompt is used in Ex mode. + *'pumborder'* *'pb'* +'pumborder' 'pb' string (default "") + global + Defines a border and optional decorations for the popup menu in + completion. The value is a comma-separated list of keywords. + + Border styles (at most one): + "single" use thin box-drawing characters + "double" use double-line box-drawing characters + "round" use rounded corners + "ascii" use ASCII characters (-, |, +) + "custom:X;X;X;X;X;X;X;X" + use eight characters separated by semicolons, in the + order: top, right, bottom, left, + topleft, topright, botright, botleft + + Additional flags: + "margin" adds one-cell spacing inside the left and right border + "shadow" draws a shadow at the right and bottom edges + + Highlight groups: + |hl-PmenuBorder| used for the border characters + |hl-PmenuShadow| used for the shadow + + Examples: > + :set pumborder=single + :set pumborder=double,margin,shadow + :set pumborder=custom:─;│;─;│;┌;┐;┘;└,shadow +< + Border styles using box-drawing characters ("single", "double", + "round") are only available when 'encoding' is "utf-8" and 'ambiwidth' + is "single". "margin" requires a border style. + See also: |ins-completion-menu|. + *'pumheight'* *'ph'* 'pumheight' 'ph' number (default 0) global