@@ -3552,6 +3552,51 @@ A jump table for the options with a short description can be found at |Q_op|.
35523552 eob EndOfBuffer | hl-EndOfBuffer |
35533553 lastline NonText | hl-NonText |
35543554
3555+ *'findexpr'* *'fexpr'*
3556+ 'findexpr' 'fexpr' string (default "")
3557+ global or local to buffer | global-local |
3558+ {not available when compiled without the | +eval |
3559+ feature}
3560+ Expression that is evaluated to obtain the filename(s) for the | :find |
3561+ command. When this option is empty, the internal | file-searching |
3562+ mechanism is used.
3563+
3564+ While evaluating the expression, the | v:fname | variable is set to the
3565+ argument of the | :find | command.
3566+
3567+ The expression is evaluated only once per | :find | command invocation.
3568+ The expression can process all the directories specified in 'path' .
3569+
3570+ If a match is found, the expression should return a | List | containing
3571+ one or more file names. If a match is not found, the expression
3572+ should return an empty List.
3573+
3574+ If any errors are encountered during the expression evaluation, an
3575+ empty List is used as the return value.
3576+
3577+ Using a function call without arguments is faster | expr-option-function |
3578+
3579+ It is not allowed to change text or jump to another window while
3580+ evaluating 'findexpr' | textlock | .
3581+
3582+ This option cannot be set from a | modeline | or in the | sandbox | , for
3583+ security reasons.
3584+
3585+ Examples:
3586+ >
3587+ " Use glob()
3588+ func FindExprGlob()
3589+ return glob(v:fname, v:false, v:true)
3590+ endfunc
3591+ set findexpr=FindExprGlob()
3592+
3593+ " Use the 'git ls-files' output
3594+ func FindGitFiles()
3595+ let fnames = systemlist('git ls-files')
3596+ return fnames->filter('v:val =~? v:fname')
3597+ endfunc
3598+ set findexpr=FindGitFiles()
3599+ <
35553600 *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
35563601'fixendofline' 'fixeol' boolean (default on)
35573602 local to buffer
0 commit comments