The system also has a limit on the
path length, usually 256 or 1024 bytes.
- "**" can only be at the end of the path or be followed by a path
separator or by a number and a path separator.
You can combine "*" and "**" in any order: >
/usr/**/sys/*
/usr/*tory/sys/**
/usr/**2/sys/*
2) Upward search:
Here you can give a directory and then search the directory tree upward for
a file. You could give stop-directories to limit the upward search. The
stop-directories are appended to the path (for the 'path' option) or to
the filename (for the 'tags' option) with a ';'. If you want several
stop-directories separate them with ';'. If you want no stop-directory
("search upward till the root directory") just use ';'. >
/usr/include/sys;/usr
< will search in: >
/usr/include/sys
/usr/include
/usr
<
If you use a relative path the upward search is started in Vim's current
directory or in the directory of the current file (if the relative path
starts with './' and 'd' is not included in 'cpoptions').
If Vim's current path is /u/user_x/work/release and you do >
:set path=include;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/include
/u/user_x/work/include
/u/user_x/include
< Note: If your 'path' setting includes a non-existing directory, Vim will
skip the non-existing directory, and also does not search in the parent of
the non-existing directory if upwards searching is used.
3) Combined up/downward search:
If Vim's current path is /u/user_x/work/release and you do >
set path=**;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/**
/u/user_x/work/**
/u/user_x/**
<
BE CAREFUL! This might consume a lot of time, as the search of
'/u/user_x/**' includes '/u/user_x/work/**' and
'/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched
three times and '/u/user_x/work/**' is searched twice.
In the above example you might want to set path to: >
:set path=**,/u/user_x/**
< This searches: >
/u/user_x/work/release/**
/u/user_x/**
< This searches the same directories, but in a different order.
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
currently work with 'path' items that contain a URL or use the double star
with depth limiter (/usr/**2) or upward search (;) notations.
==============================================================================
12. Trusted Files *trust*
Nvim executes arbitrary code found on the filesystem if 'exrc' is enabled. To
prevent executing malicious code, only "trusted files" are executed. You can
mark a file as trusted or untrusted using the |:trust| command or the
|vim.secure.read()| function.
*:trust* *E5570*
:trust [++deny] [++remove] [file]
Manage trusted files. Without ++ options, :trust marks
the current buffer as trusted, keyed on a hash of its
contents. The trust list is stored on disk, Nvim will
re-use it after restarting.
[++deny] marks [file] (or current buffer if no [file]) as
untrusted: it will never be executed, 'exrc' will
ignore it.
[++remove] removes [file] (or current buffer if no
[file]) from the trust list. When the file is
discovered by 'exrc' or |vim.secure.read()|, the user
will be asked whether to trust or deny the file.
vim:tw=78:ts=8:noet:ft=help:norl: