Loading ...
Sorry, an error occurred while loading the content.

Using multiple tags files in Vim 5.7

Expand Messages
  • Yegappan Lakshmanan
    Hi, 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
    Message 1 of 2 , Mar 30 1:55 PM
    • 0 Attachment
      Hi,

      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.

      Thanks,
      Yegappan
    • Alexey Marinichev
      ... [...] 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
      Message 2 of 2 , Mar 30 2:59 PM
      • 0 Attachment
        On Fri, Mar 30, 2001 at 01:55:54PM -0800, Yegappan Lakshmanan wrote:
        > Hi,
        >
        > 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.

        --Lyosha
      Your message has been successfully submitted and would be delivered to recipients shortly.