Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 515813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:40:00+00:00 2026-05-13T07:40:00+00:00

I want to be able to start up vim in an arbitrary subdirectory in

  • 0

I want to be able to start up vim in an arbitrary subdirectory in my project and have it search up to the project root for the tags file, and then to search in an unrelated directory outside the project tree.

For example let’s say I have the following:

~/projects/foo/bar/baz.c
~/projects/foo/tags
~/some/arbitrary/path/tags

I want to open baz.c from within the bar subdirectory, have it search up to find foo/tags and then to search some/arbitrary/path/tags if the symbol isn’t found in foo/tags.

Now I know I can do:

set tags=./tags,tags;

to accomplish the first task. It’s apparently the semicolon which tells vim to search up to the root. However neither of the following work:

set tags=./tags,tags,~/some/arbitrary/path/tags;
set tags=./tags,tags;~/some/arbitrary/path/tags

The first one finds only symbols from ~/some/arbitrary/path/tags while the second one only finds symbols in the tags file at the project root.

Anyone know how to do this? I’m on Linux buy the way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:40:01+00:00Added an answer on May 13, 2026 at 7:40 am

    I use:

    set tags=~/.tags
    set tags+=~/.vim/tags/cpp
    set tags+=~/src/git/gitsrc/tags
    " and so on...
    

    For generating tags in a particular project’s root:

    map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
    

    I adapted this setup from the C++ code completion vim tip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to start a process and then be able to
I have a start and stop button. I want to be able to start
I need to be able to start/stop a per-session GUI agent from a root
I want to be able to capture the exception that is thrown when a
I want to be able to do: For Each thing In things End For
I want to be able to play sound files in my program. Where should
I want to be able to make an HTTP call updating some select boxes
I want to be able to view a SQL Server 2005 Reporting Services report
I want to be able to do this. MyInterface interface = new ServiceProxyHelper<ProxyType>(); Here's
I want to be able to generate PDF output from my (native) C++ Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.