我看到两个答案提到了设置Vim的tags
选项,使其从当前目录开始查找tags
文件,并一直向上查找,直到找到为止。该命令如下所示。
set tags=./tags;/
这里是谈论它的帖子。
这个语法使用分号来建立一些范围,以搜索目录(即从当前目录开始,到根目录结束)。实际上,在第一个链接的答案评论中,有一个评论说:
“如果你去到根目录,甚至不需要 /。只用 ; 就足够了。”
所有这些东西都在哪里记录?我查找了 :help 'tags,并没有发现任何相关内容。
*'tags'* *'tag'* *E433*
'tags' 'tag' string (default "./tags,tags", when compiled with
|+emacs_tags|: "./tags,./TAGS,tags,TAGS")
global or local to buffer |global-local|
Filenames for the tag command, separated by spaces or commas. To
include a space or comma in a file name, precede it with a backslash
(see |option-backslash| about including spaces and backslashes).
When a file name starts with "./", the '.' is replaced with the path
of the current file. But only when the 'd' flag is not included in
'cpoptions'. Environment variables are expanded |:set_env|. Also see
|tags-option|.
"*", "**" and other wildcards can be used to search for tags files in
a directory tree. See |file-searching|. E.g., "/lib/**/tags" will
find all files named "tags" below "/lib". The filename itself cannot
contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find
files called "tags?". {not available when compiled without the
|+path_extra| feature}
The |tagfiles()| function can be used to get a list of the file names
actually used.
If Vim was compiled with the |+emacs_tags| feature, Emacs-style tag
files are also supported. They are automatically recognized. The
default value becomes "./tags,./TAGS,tags,TAGS", unless case
differences are ignored (MS-Windows). |emacs-tags|
The use of |:set+=| and |:set-=| is preferred when adding or removing
file names from the list. This avoids problems when a future version
uses another default.
{Vi: default is "tags /usr/lib/tags"}
我应该在哪里找到有关Vim
tags
选项中可以使用的所有技巧的完整参考资料?