vim-gutentags
vim-gutentags copied to clipboard
Question on special project folder structure
Hi All,
I am already very happy using vim-gutentags. However, in my current software team we do have a special structure of the C source code. The structure of the SVN repository looks like this:
- folder <project 1> -- folder ".svn" -- folder "src" -- folder "include"
- folder <project 2> -- folder ".svn" -- folder "src" -- folder "include" ... further project folders
vim-gutentags works well in each and every project. Nonetheless some projects use other projects and I have not yet found any configuration being able to jump to a function definition that is defined in a different project. I make also use of the plugins: vim-localvimrc, YCM and others. Within each and every project I do have a specific '.lvimrc', '.gutctags' and '.ycm_extra_conf.py'. I would be happy if somebody could give me a hint how it is possible to have a overall tags file or how tags file of other projects can automatically be used by this great plugin. Let me know if you need further details.
Hi! I actually have the same problem at work but haven't found any good solution besides custom vimrc code or vim plugins to glue everything together.
In my case, the cheap (but sub-optimal) solution was to add a new project root marker that I place in the parent folder of both project folders, and have Gutentags generate one unique big tags file that contains both projects (and disable the standard root markers like .svn
so it doesn't generates the other tags files for each project). Of course this can get problematic if codebase is huge, and ctags takes several minutes to run (which is the case for me at work).
I've been meaning to improve my work setup by writing some wrapper plugin that would keep each project separate with its own tags file, but add all of them to Vim (with set tags ...
) when I'm in that specific dev environment... but I haven't gotten around to do this, and I don't know if this is generalizable.
I'm curious to hear what others are doing too! :)
@ludovicchabant I do the same. Using .gutctags file in the parent directory.
I use vim-rooter to cd into the project dir, so I tried this:
set tags+=../*/tags
To my surprise, it seems to work (if tags files for other projects are already generated).
Hi! I actually have the same problem at work but haven't found any good solution besides custom vimrc code or vim plugins to glue everything together.
In my case, the cheap (but sub-optimal) solution was to add a new project root marker that I place in the parent folder of both project folders, and have Gutentags generate one unique big tags file that contains both projects (and disable the standard root markers like
.svn
so it doesn't generates the other tags files for each project). Of course this can get problematic if codebase is huge, and ctags takes several minutes to run (which is the case for me at work).I've been meaning to improve my work setup by writing some wrapper plugin that would keep each project separate with its own tags file, but add all of them to Vim (with
set tags ...
) when I'm in that specific dev environment... but I haven't gotten around to do this, and I don't know if this is generalizable.I'm curious to hear what others are doing too! :)
Is there a way to load all the tags files from g:gutentags_cache_dir altogether?