I have set :set tags=./tags;$HOME
to do an "upward search" for a tags file. How do I find out what file has actually been loaded?
2 Answers
Reading :help 'tags'
and scrolling a little bit down finds the following sentence:
The tagfiles() function can be used to get a list of the file names
actually used.
Accordingly, :echo tagfiles()
will show the name(s) of found tagfile(s).
An easy way to test this is in any of Vim's help files.
It will pick up the helptags in <whatever>/doc/tags
.
-
Ok, thanks. To be fair, this is mentioned nowhere in the reference page for tags.– clarkepCommented Jul 22 at 7:13
-
-
1
-
... and that's where I found it... after looking everywhere else :-D Commented Jul 22 at 16:26
echo findfile("tags", "./;$HOME")
appears to work, but it is slightly different syntax and redoes the search.