I currently have a project directory like this
MainProject
|_ProjectA
| |_src
| |_file1.cpp
| |_file2.cpp
| |_.....
| |_tags <---tag file generated here
|_ProjectB
| |_src
| |_file3.cpp
| |_file4.cpp
| |_.....
|_tags <---tag file generated here
Now file4.cpp uses items in file1.cpp however it seems that since its in a different folder I get the message
cstag - tag not found
Currently i went into my ProjectA and ProjectB and did this for each
ctage -R .
as a result of which tags file got generated in each project. My question is how can I specify where to generate the tags file. In that case all the tags file will be next to each other and hopefully that will solve this problem
To create a new folder, click New Folder. To place one or more tags, triggers, or variables into a folder, select their checkboxes in the list and then select a folder from the Move menu to place the items in an existing folder.
Ctags is a tool that will sift through your code, indexing methods, classes, variables, and other identifiers, storing the index in a tags file.
The simplest solution would be to generate a single tags
file:
$ cd MainProject
$ ctags -R .
and tell Vim to recurse upward when looking for tags
files:
set tags=./tags;,tags;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With