From e74f76c33c4b61dd52ca0ce16649a2e08cea0bac Mon Sep 17 00:00:00 2001 From: h-east Date: Wed, 1 Oct 2025 22:33:43 +0900 Subject: [PATCH] Update options.{txt,jax} --- doc/options.jax | 63 ++++++++++++++++++++++++++++++-------------- en/options.txt | 69 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 90 insertions(+), 42 deletions(-) diff --git a/doc/options.jax b/doc/options.jax index 2849b0925..dc7e56913 100644 --- a/doc/options.jax +++ b/doc/options.jax @@ -1,4 +1,4 @@ -*options.txt* For Vim バージョン 9.1. Last change: 2025 Sep 15 +*options.txt* For Vim バージョン 9.1. Last change: 2025 Sep 29 VIMリファレンスマニュアル by Bram Moolenaar @@ -939,7 +939,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる *'autocomplete'* *'ac'* *'noautocomplete'* *'noac'* 'autocomplete' 'ac' 切替 (既定ではオフ) - グローバル + グローバル/バッファについてローカル |global-local| {Vim がタイミングをサポートするプラットフォームでのみ 有効} オンにすると、Vim は入力時に補完メニューを表示する。これは |i_CTRL-N| @@ -2305,6 +2305,21 @@ Note 1番目の形式では、行全体がオプション指定に使われる 大文字・小文字が同一視されるかどうかは補完の種類による。 バッファのテキストについてはオプション 'ignorecase' が適用 される。 + longest + 'autocomplete' が無効の場合、マッチした単語の最長共通プリ + フィックスのみが挿入される。ポップアップメニューが表示され + ている場合は、CTRL-L で文字を追加できる。大文字小文字が無 + 視されるかどうかは、補完の種類によって異なる。バッファ内の + テキストには、'ignorecase' オプションが適用される。 + + 'autocomplete' が有効で、補完項目が選択されていない場合、 + マッチした候補の中の最長共通プリフィックスがカーソルの後ろ + に挿入される。このプリフィックスは、表示されているすべての + 項目から取得するか、カレントバッファ内の項目のみから取得す + る。挿入されたテキストは |hl-PreInsert| でハイライトされ、 + カーソル位置は変化しない (`"preinsert"` と同様)。挿入する + には CTRL-Y を押下する。 + |preinserted()| も参照。 menu ポップアップメニューで補完候補を表示する。ポップアップメ ニューは、候補が2個以上あり、十分な数の色が使用できるとき @@ -2346,24 +2361,22 @@ Note 1番目の形式では、行全体がオプション指定に使われる {|+textprop| 機能付きでコンパイルされたときのみ有効} preinsert - 'autocomplete' がアクティブでない場合、最初の候補単語のう - ち、|hl-PreInsert| でハイライト表示されている現在の補完リー - ダーの後ろの部分を挿入する。カーソルは移動しない。'fuzzy' - が未設定で、'completeopt' に "menuone" が指定されている必 - 要がある。 - - 'autocomplete' がアクティブな場合、(表示されているすべての - 項目、または現在のバッファ項目から) マッチした単語の中で最 - 長の共通プリフィックスを挿入する。これは、メニュー項目が選 - 択されていない場合にのみ実行される。確定するには Ctrl-Y を - 押す。 + 最初の補完候補のテキストを、現在のリーダーの後ろに挿入す + る。このテキストは |hl-PreInsert| でハイライトされる。 + カーソルは移動しない。 + "fuzzy" を無効にし、さらに 'completeopt' に "menuone" を設 + 定するか、または 'autocomplete' を有効にしておく必要があ + る。'autocomplete' を有効にしている場合、'ignorecase' だけ + が設定されていて 'infercase' が設定されていないと動作しな + い。 + |preinserted()| も参照。 preview 現在選択されている候補についての付加的な情報をプレビュー ウィンドウに表示する。"menu" または "menuone" と組み合わせ たときのみ有効。 - 'autocomplete' が有効な場合、"fuzzy"、"popup"、"popuphidden"、 - "preinsert" および "preview" のみ効果がある。 + 'autocomplete' が有効な場合、"fuzzy"、"longest"、"popup"、 + "popuphidden"、"preinsert" および"preview" のみが効果がある。 このオプションは |cmdline-completion| には適用されない。詳細については 'wildoptions' を参照。 @@ -3813,8 +3826,14 @@ Note 1番目の形式では、行全体がオプション指定に使われる 'fileignorecase' 'fic' 切替 (既定値: ファイル名の大文字と小文字の違いを無 視するシステムではオン) グローバル - このオプションを設定すると、ファイル名とディレクトリ名の大文字と小文字 - の違いが無視される。 + このオプションを設定すると、ファイルおよびディレクトリ名の大文字と小文 + 字の違いが無視される。 + + このオプションは、ファイルシステムが伝統的に大文字と小文字を区別しない + システム (例えば MS-Windows や macOS) ではデフォルトでオンになってい + る。ただし、Vim は実行時に特定のファイルシステムが大文字と小文字を区別 + するか区別しないかを判断できない。 + 補完で大文字と小文字の違いを無視したい場合は 'wildignorecase' を参照。 *'filetype'* *'ft'* @@ -8959,6 +8978,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる も新しいバージョンが必要である。以下のように確認する: > if has('vcon') < これには Vim が |+vtp| 機能付きでビルドされている必要がある。 + |win32-term-colors| も参照。 Note "cterm" の特徴はまだ使われているが、"gui" はそうではないことに注 意。 @@ -10232,8 +10252,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる *'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'* 'wlsteal' 'wst' 切替 (既定ではオフ) グローバル - {|+wayland_clipboard| 機能付きでコンパイルされたときの - み有効} + {|+wayland_focus_steal| 機能付きでコンパイルされたとき + のみ有効} 有効にすると、Vim はクリップボードにアクセスするために一時的なサーフェ スを作成してフォーカスを奪取できるようになる。詳細については |wayland-focus-steal| を参照。 @@ -10268,6 +10288,11 @@ Note 1番目の形式では、行全体がオプション指定に使われる < 'sidescroll'、'listchars' や |wrap-off| を参照。 オプション 'diff' がオンの場合、モードライン |modeline| からこのオプ ションを設定することはできない。 + |modeline| または |sandbox| で 'nowrap' が設定された場合、'list' およ + び 'listchars' オプションの値に関係なく、'>' が |lcs-extends| 文字とし + て使用される。これは、ビューポート外の悪意のあるコードが検知されないこ + とを防ぐためである。この動作を無効にするには、後で手動で + `:setlocal nowrap` を使用する。 *'wrapmargin'* *'wm'* 'wrapmargin' 'wm' 数値 (既定では 0) diff --git a/en/options.txt b/en/options.txt index 9643dd86a..e644fd11d 100644 --- a/en/options.txt +++ b/en/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2025 Sep 15 +*options.txt* For Vim version 9.1. Last change: 2025 Sep 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -913,7 +913,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'autocomplete'* *'ac'* *'noautocomplete'* *'noac'* 'autocomplete' 'ac' boolean (default off) - global + global or local to buffer |global-local| {only available on platforms with timing support} When on, Vim shows a completion menu as you type, similar to using |i_CTRL-N|, but triggered automatically. See |ins-autocompletion|. @@ -2256,11 +2256,22 @@ A jump table for the options with a short description can be found at |Q_op|. to gather more alternatives for your candidate list, see 'completefuzzycollect'. - 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. + 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 active and no completion item is + selected, the longest common prefix of the matches is + inserted after the cursor. The prefix is taken either + from all displayed items or only from items in the current + buffer. The inserted text is highlighted with + |hl-PreInsert|, and the cursor position does not change + (similar to `"preinsert"`). Press CTRL-Y to accept. + See also |preinserted()|. menu Use a popup menu to show the possible completions. The menu is only shown when there is more than one match and @@ -2302,22 +2313,21 @@ 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 - When 'autocomplete' is not active, inserts the part of the - first candidate word beyond the current completion leader, - highlighted with |hl-PreInsert|. The cursor doesn't move. - Requires "fuzzy" unset and "menuone" in 'completeopt'. - - When 'autocomplete' is active, inserts the longest common - prefix of matches (from all shown items or from the - current buffer items). This occurs only when no menu item - is selected. Press CTRL-Y to accept. + 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 + 'autocomplete' is enabled, this does not work if + 'ignorecase' is set without 'infercase'. + See also |preinserted()|. preview Show extra information about the currently selected completion in the preview window. Only works in combination with "menu" or "menuone". - Only "fuzzy", "popup", "popuphidden", "preinsert" and "preview" have - an effect when 'autocomplete' is enabled. + Only "fuzzy", "longest", "popup", "popuphidden", "preinsert" and + "preview" have an effect when 'autocomplete' is enabled. This option does not apply to |cmdline-completion|. See 'wildoptions' for that. @@ -3699,7 +3709,7 @@ A jump table for the options with a short description can be found at |Q_op|. command to find the illegal byte sequence. WRONG VALUES: WHAT'S WRONG: latin1,utf-8 "latin1" will always be used - utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8 + utf-8,ucs-bom,latin1 BOM won't be recognized in a utf-8 file cp1250,latin1 "cp1250" will always be used If 'fileencodings' is empty, 'fileencoding' is not modified. @@ -3791,7 +3801,13 @@ A jump table for the options with a short description can be found at |Q_op|. 'fileignorecase' 'fic' boolean (default on for systems where case in file names is normally ignored) global - When set case is ignored when using file names and directories. + When set, case is ignored when using file and directory names. + + This option is on by default on systems where the filesystem is + traditionally case-insensitive (for example MS-Windows and macOS). + However, Vim cannot determine at runtime whether a particular + filesystem is case-sensitive or case-insensitive. + See 'wildignorecase' for only ignoring case when doing completion. *'filetype'* *'ft'* @@ -8913,14 +8929,15 @@ A jump table for the options with a short description can be found at |Q_op|. When on, uses |highlight-guifg| and |highlight-guibg| attributes in the terminal (thus using 24-bit color). - Requires a ISO-8613-3 compatible terminal. If setting this option + Requires an ISO-8613-3 compatible terminal. If setting this option does not work (produces a colorless UI) reading |xterm-true-color| might help. For Win32 console, Windows 10 version 1703 (Creators Update) or later is required. Use this check to find out: > if has('vcon') -< This requires Vim to be built with the |+vtp| feature. +< This requires Vim to be built with the |+vtp| feature, see also + |win32-term-colors|. Note that the "cterm" attributes are still used, not the "gui" ones. @@ -10204,7 +10221,8 @@ A jump table for the options with a short description can be found at |Q_op|. *'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'* 'wlsteal' 'wst' boolean (default off) global - {only when the |+wayland_clipboard| feature is included} + {only when the |+wayland_focus_steal| feature is + included} When enabled, then allow Vim to steal focus by creating a temporary surface, in order to access the clipboard. For more information see |wayland-focus-steal|. @@ -10241,6 +10259,11 @@ A jump table for the options with a short description can be found at |Q_op|. < See 'sidescroll', 'listchars' and |wrap-off|. This option can't be set from a |modeline| when the 'diff' option is on. + If 'nowrap' was set from a |modeline| or in the |sandbox|, '>' is used + as the |lcs-extends| character regardless of the value of the 'list' + and 'listchars' options. This is to prevent malicious code outside + the viewport from going unnoticed. Use `:setlocal nowrap` manually + afterwards to disable this behavior. *'wrapmargin'* *'wm'* 'wrapmargin' 'wm' number (default 0)