Skip to content

Update options.{txt,jax} #1764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
52 changes: 44 additions & 8 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 Oct 16
*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 22


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -3422,7 +3422,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる

*'fileformat'* *'ff'*
'fileformat' 'ff' 文字列 (MS-Windows での既定値: "dos",
Unix, macOS での既定値: "unix")
Unix での既定値: "unix")
バッファについてローカル
バッファにファイルを読み込んだり、バッファからファイルに書き込んだりす
るときに使われる <EOL> を、カレントバッファについて設定する。
Expand All @@ -3447,7 +3447,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
*'fileformats'* *'ffs'*
'fileformats' 'ffs' 文字列 (既定値:
Vim+Vi MS-Windows: "dos,unix",
Vim Unix, macOS: "unix,dos",
Vim Unix: "unix,dos",
Vi Cygwin: "unix,dos",
Vi その他: "")
グローバル
Expand Down Expand Up @@ -3575,6 +3575,46 @@ Note 1番目の形式では、行全体がオプション指定に使われる
eob EndOfBuffer |hl-EndOfBuffer|
lastline NonText |hl-NonText|

*'findexpr'* *'fexpr'* *E1514*
'findexpr' 'fexpr' 文字列 (既定では "")
グローバル/バッファについてローカル |global-local|
{|+eval| 機能つきでコンパイルされたときのみ有効}
|:find| コマンドのファイル名を取得するために評価される式。このオプショ
ンが空の場合、内部の |file-searching| メカニズムが使用される。

式の評価中、|v:fname| 変数は |:find| コマンドの引数に設定される。

式は、|:find| コマンドの呼び出しごとに 1 回だけ評価される。
式は、'path' で指定されたすべてのディレクトリを処理できる。

マッチした場合、式は 1 つ以上のファイル名を含む |List| を返す必要があ
る。マッチしない場合、式は空のリストを返す必要がある。

式の評価中にエラーが発生した場合、空のリストが戻り値として使用される。

引数なしの関数呼び出しを使用すると高速になる |expr-option-function|

'findexpr' の評価中にテキストを変更したり、別のウィンドウにジャンプし
たりすることはできない。|textlock|

セキュリティ上の理由から、このオプションを |modeline| または |sandbox|
内で設定することはできない。

例:
>
" glob() を使う
func FindExprGlob()
return glob(v:fname, v:false, v:true)
endfunc
set findexpr=FindExprGlob()

" 'git ls-files' の出力を使う
func FindGitFiles()
let fnames = systemlist('git ls-files')
return fnames->filter('v:val =~? v:fname')
endfunc
set findexpr=FindGitFiles()
<
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
'fixendofline' 'fixeol' 切替 (既定ではオン)
バッファについてローカル
Expand Down Expand Up @@ -4973,7 +5013,7 @@ Note 1番目の形式では、行全体がオプション指定に使われる
'compatible' がオフになるとVimの既定値に設定されるので注意。

*'isprint'* *'isp'*
'isprint' 'isp' 文字列 (Win32とmacOSでの既定値:
'isprint' 'isp' 文字列 (Win32 と VMS での既定値:
"@,~-255"; それ以外では: "@,161-255")
グローバル
このオプションで指定された文字は、画面に直接表示される。またパターン
Expand Down Expand Up @@ -6759,9 +6799,6 @@ Note 1番目の形式では、行全体がオプション指定に使われる
$VIMRUNTIME,
$VIM/vimfiles/after,
$HOME/vimfiles/after"
macOS: "$VIM:vimfiles,
$VIMRUNTIME,
$VIM:vimfiles:after"
Haiku: "$BE_USER_SETTINGS/vim,
$VIM/vimfiles,
$VIMRUNTIME,
Expand Down Expand Up @@ -9104,7 +9141,6 @@ Note 1番目の形式では、行全体がオプション指定に使われる
Win32用: "$HOME/vimfiles/view",
Unix用: "$HOME/.vim/view" または
"$XDG_CONFIG_HOME/vim/view"
macOS用: "$VIM/vimfiles/view",
VMS用: "sys$login:vimfiles/view")
グローバル
{|+mksession| 機能付きでコンパイルされたときのみ有効}
Expand Down
57 changes: 49 additions & 8 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 Oct 16
*options.txt* For Vim version 9.1. Last change: 2024 Oct 22


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -3403,7 +3403,7 @@ A jump table for the options with a short description can be found at |Q_op|.

*'fileformat'* *'ff'*
'fileformat' 'ff' string (MS-Windows default: "dos",
Unix, macOS default: "unix")
Unix default: "unix")
local to buffer
This gives the <EOL> of the current buffer, which is used for
reading/writing the buffer from/to a file:
Expand All @@ -3426,7 +3426,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fileformats'* *'ffs'*
'fileformats' 'ffs' string (default:
Vim+Vi MS-Windows: "dos,unix",
Vim Unix, macOS: "unix,dos",
Vim Unix: "unix,dos",
Vi Cygwin: "unix,dos",
Vi others: "")
global
Expand Down Expand Up @@ -3552,6 +3552,51 @@ A jump table for the options with a short description can be found at |Q_op|.
eob EndOfBuffer |hl-EndOfBuffer|
lastline NonText |hl-NonText|

*'findexpr'* *'fexpr'* *E1514*
'findexpr' 'fexpr' string (default "")
global or local to buffer |global-local|
{not available when compiled without the |+eval|
feature}
Expression that is evaluated to obtain the filename(s) for the |:find|
command. When this option is empty, the internal |file-searching|
mechanism is used.

While evaluating the expression, the |v:fname| variable is set to the
argument of the |:find| command.

The expression is evaluated only once per |:find| command invocation.
The expression can process all the directories specified in 'path'.

If a match is found, the expression should return a |List| containing
one or more file names. If a match is not found, the expression
should return an empty List.

If any errors are encountered during the expression evaluation, an
empty List is used as the return value.

Using a function call without arguments is faster |expr-option-function|

It is not allowed to change text or jump to another window while
evaluating 'findexpr' |textlock|.

This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

Examples:
>
" Use glob()
func FindExprGlob()
return glob(v:fname, v:false, v:true)
endfunc
set findexpr=FindExprGlob()

" Use the 'git ls-files' output
func FindGitFiles()
let fnames = systemlist('git ls-files')
return fnames->filter('v:val =~? v:fname')
endfunc
set findexpr=FindGitFiles()
<
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
'fixendofline' 'fixeol' boolean (default on)
local to buffer
Expand Down Expand Up @@ -4917,7 +4962,7 @@ A jump table for the options with a short description can be found at |Q_op|.
set and to the Vim default value when 'compatible' is reset.

*'isprint'* *'isp'*
'isprint' 'isp' string (default for Win32 and macOS:
'isprint' 'isp' string (default for Win32 and VMS:
"@,~-255"; otherwise: "@,161-255")
global
The characters given by this option are displayed directly on the
Expand Down Expand Up @@ -6742,9 +6787,6 @@ A jump table for the options with a short description can be found at |Q_op|.
$VIMRUNTIME,
$VIM/vimfiles/after,
$HOME/vimfiles/after"
macOS: "$VIM:vimfiles,
$VIMRUNTIME,
$VIM:vimfiles:after"
Haiku: "$BE_USER_SETTINGS/vim,
$VIM/vimfiles,
$VIMRUNTIME,
Expand Down Expand Up @@ -9057,7 +9099,6 @@ A jump table for the options with a short description can be found at |Q_op|.
for Win32: "$HOME/vimfiles/view",
for Unix: "$HOME/.vim/view" or
"$XDG_CONFIG_HOME/vim/view"
for macOS: "$VIM/vimfiles/view",
for VMS: "sys$login:vimfiles/view")
global
{not available when compiled without the |+mksession|
Expand Down