Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 7 additions & 2 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 22
*options.txt* For Vim バージョン 9.1. Last change: 2024 Oct 28


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -3587,6 +3587,10 @@ Note 1番目の形式では、行全体がオプション指定に使われる
式は、|:find| コマンドの呼び出しごとに 1 回だけ評価される。
式は、'path' で指定されたすべてのディレクトリを処理できる。

式はコマンドライン補完のためにも評価される可能性があり、その場合、
|v:cmdcomplete| 変数は |v:true| に設定され、それ以外の場合は |v:false|
に設定される。

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

Expand All @@ -3604,7 +3608,8 @@ Note 1番目の形式では、行全体がオプション指定に使われる
>
" glob() を使う
func FindExprGlob()
return glob(v:fname, v:false, v:true)
let pat = v:cmdcomplete ? $'{v:fname}*' : v:fname
return glob(pat, v:false, v:true)
endfunc
set findexpr=FindExprGlob()

Expand Down
9 changes: 7 additions & 2 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 22
*options.txt* For Vim version 9.1. Last change: 2024 Oct 28


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -3567,6 +3567,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression is evaluated only once per |:find| command invocation.
The expression can process all the directories specified in 'path'.

The expression may be evaluated for command-line completion as well,
in which case the |v:cmdcomplete| variable will be set to |v:true|,
otherwise it will be set to |v:false|.

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.
Expand All @@ -3586,7 +3590,8 @@ A jump table for the options with a short description can be found at |Q_op|.
>
" Use glob()
func FindExprGlob()
return glob(v:fname, v:false, v:true)
let pat = v:cmdcomplete ? $'{v:fname}*' : v:fname
return glob(pat, v:false, v:true)
endfunc
set findexpr=FindExprGlob()

Expand Down