24

如何tags从 Vim 中重新加载文件?

是否需要重新启动?

4

3 回答 3

19

根据:help tag-binary-search,标记文件在每次查找时都是二进制(或线性)搜索的,因此无需重新加载文件:

                                                        *tag-binary-search*
Vim uses binary searching in the tags file to find the desired tag quickly
(when enabled at compile time |+tag_binary|).  But this only works if the
tags file was sorted on ASCII byte value.  Therefore, if no match was found,
another try is done with a linear search.  If you only want the linear search,
reset the 'tagbsearch' option.  Or better: Sort the tags file!

Note that the binary searching is disabled when not looking for a tag with a
specific name.  This happens when ignoring case and when a regular expression
is used that doesn't start with a fixed string.  Tag searching can be a lot
slower then.  The former can be avoided by case-fold sorting the tags file.
See 'tagbsearch' for details.
于 2011-01-29T00:03:34.120 回答
4

据我所知,Vim 7.3 没有必要tags在生成文件后立即使用它。

于 2011-01-28T15:24:07.887 回答
1

我发现将标签文件加载到另一个缓冲区/选项卡中会有所帮助。然后我可以重新加载该缓冲区:e!以获取 vim 以查看我的标签更新。

于 2014-07-02T14:42:03.693 回答