CTags vim multiple projects Feb 14 2018

If you have to reference multiple directories on your ctags do the following.

Install ctags

Generate CTags for all of your projects, from your project's root

ctags -R .

this will generate a file tags, add it to the git ignore

echo "tags" >> ~/.gitignore_global

Now configure your vimrc to search current dir, then add other the tag files from your other projects

set tags=./tags,$HOME/project1/tags,$DEVPATH/project2/tags

Now you can go to the root of all of your projects open vim and Ctrl-] Ctrl-t all you like

If you would like vim to search on the local directory and then go searching to parent directory onwards until root add / to your tags variable:

set tags=./tags,/

** If you want to check what else I'm currently doing, be sure to follow me on twitter @rderik or subscribe to the newsletter. If you want to send me a direct message, you can send it to derik@rderik.com.