Перезагрузить файл тегов Vim - PullRequest
21 голосов
/ 28 января 2011

Как перезагрузить файл tags из Vim?

Требуется ли перезагрузка?

Ответы [ 3 ]

17 голосов
/ 29 января 2011

Согласно :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.
4 голосов
/ 28 января 2011

Насколько я знаю, в Vim 7.3 нет необходимости использовать файл tags, как только он будет сгенерирован.

1 голос
/ 02 июля 2014

Я считаю, что это помогает просто загрузить файл тегов в другой буфер / вкладку. Затем я могу перезагрузить этот буфер с помощью :e!, чтобы vim увидел обновления моего тега.

...