Is there a way to set multiple default tag files, to be searched sequentially in my vimrc? My hope was that I would be able to have a local tags file that would be searched first and then, if nothing was found, it would move onto the next given tags file (and so on ideally, but at this point I'm mainly interested in the case of 2).

1 Answer 1


Sure. See help 'tags':

set tags+=./my_local_tags_name
set tags+=other_tags_file_name

The default is "./tags,tags", which would do what you want if you can name your tags files in this way.

The tags option takes a comma-separated list of files to search for when using tags. But the usage of += is preferred to manual comma addition.

  • Don't know how I overlooked that on the help page. Thank you! @D.BenKnoble
    – Tyberius
    Apr 7, 2019 at 1:53
  • 2
    The default is "./tags;,tags", there is a ";", which marks upward search.
    – dedowsdi
    Apr 7, 2019 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.