简体   繁体   English

重新加载标签文件Vim

[英]Reload tags file Vim

How do i reload the tags file from within Vim? 如何从Vim中重新加载tags文件?

Is a restart necessary? 是否需要重启?

According to :help tag-binary-search , the tags file is binary (or linear) searched on each lookup, so there's no need to reload the file: 根据: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.

据我所知,Vim 7.3一旦生成就不会使用tags文件。

I find it helps to just load the tags file in another buffer/tab. 我发现将标签文件加载到另一个缓冲区/选项卡中会有所帮助。 Then I can re-load that buffer with :e! 然后我可以用以下内容重新加载缓冲区:e! to get vim to see my tag updates. 让vim看到我的标签更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM