Using multiple tags files in Vim 5.7
I am using Vim 5.7.
I want to use multiple tags files. When I edit a file in a
particular source tree, I want Vim to use one tags file.
When I am editing a file in another source tree, I want
Vim to use another tags file.
I can't put all the tags files in the 'tags' option, because
the functions with the same name are present in multiple source
trees. Also note that each tags file covers a entire
directory tree structure, not a single directory.
I also want Vim to use the particular tags file irrespective
of the current directory, from where I am editing the file.
How do I do this? I know in Vim 6.0, I can set the 'tags'
option to recursively search for a tags file. How do I achieve
the same behavior in Vim 5.7.
- On Fri, Mar 30, 2001 at 01:55:54PM -0800, Yegappan Lakshmanan wrote:
> I am using Vim 5.7.
> I want to use multiple tags files. When I edit a file in a
> particular source tree, I want Vim to use one tags file.
> When I am editing a file in another source tree, I want
> Vim to use another tags file.
I remember using autocommands for doing that. Types I was using were
BufEnter and BufLeave. I was setting tags and current directory, as
well as 'path' option. Actually, I was adding stuff to path in BufEnter
event and subtracting it in BufLeave.