I recently started using ctags for my projects. I currently have the following setup:
root/tags [contains all non-static tags] root/foo/tags [contains static tags for the foo directory] root/bar/tags [static] root/something/else/tags [etc.] ...
I can set tags=./tags,tags,/path/to/root/tags , and everything works fine.
However, my problem is that I work on several projects at once, so I have, for example, /path/to/root1 , /path/to/root2 and /path/to/root3 all at once. I would not manually set tags every time I open a file; is there any way i can have tags for /path/to/rootX based on the file i am editing? (i.e. if I edit /path/to/root3/foo/xc , use tags in root3/tags ?
In my case, all my projects have a common parent directory; I really want something like:
set tags=./tags,tags,substitute("%:p:h", "\(^\/path\/to\/.*/\).*$", "\1", "")
but i cant get the right vimfu to get it working.
EDIT: I just realized that this would not work; I can not write to root* . Instead, I would like to save my main ctags file to ~/ctags/root*/tags , where there is a 1: 1 mapping between the ~/ctags/ and /path/to/ subdirectories [For those who may be interested, these are dynamic views ClearCase UCM; neither /view/XXX/ nor /view/XXX/vobs/ can be overwritten)
source share