>> Sorry! The command line to the ctags tool is:
>>
>> ctags -f out_put/path/file --c++-kinds=+p --fields=+iaS --extra=+q
>> --tag-relative=yes sources/path/*
>>
>> I left a '%' sign in the preceding message in the middle of the command line.
>>
>
> Since I launch VIM from my projects root dir I figured I need to set
> the relative paths of the tags to that so I create the tags using this
> command:
> [yi...@yizaq-lnx:Wed Jun 17:/path/projects/root/dir/]$ ctags -R
> --c++-kinds=+p --fields=+iaS --extra=+q --languages=c++ -f tags .
> --tag-relative=yes ./
>
> I then moved the tags to .vim/tags/my_proj/
>
> However the tags still have wrong path, see example:
> # pri kind tag file
> 1 F f ParsedRequest /users/yizaq/.vim/tags/proj/path/to/file.h
> class:ParsedRequest::ParsedRequest access:public signature:()
> ParsedRequest::ParsedRequest()
> 2 F s ParsedRequest /users/yizaq/.vim/tags/proj/path/to/file.h
> struct ParsedRequest
> Choice number (<Enter> cancels): 2
> E429: File "/users/yizaq/.vim/tags/proj/path/to/file" does not exist
>
> Clearly, the path is wrong since it should be only proj/path/to/file.h
>
> I'm probably missing something here. I read in the help that:
> "
> If the 'tagrelative' option is on (which is the default) and using a tag file
> in another directory, file names in that tag file are relative to the
> directory where the tag file is.
> "
> If that is the case then perhaps I should turn that option off. I
> tried that but it didn't change the tag paths.
> I created the tags using:
> ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=c+
> + -f tags . --tag-relative=no
>
> Then moved to the .vim/tags/proj but when searching the tag I get the
> same result as above.
>
Well, the '--tag-relative=yes' means that the ctags tool will create relative
links starting in the current directory. So, in my example, I use the command
at the root of my project, say '/usr/src/something/'.
The source files at the 'something' directory are in a sub-directory called
'src' and I will put the tags file for this project in a public directory to
became visible to others projects. I will put the tags file in
'/usr/share/tags'. So, this is the command line that I would use:
ctags -f /usr/share/tags/something.tags --c++-kinds=+p --fields=+iaS
--extra=+q --tag-relative=yes /usr/source/something/src/*
The paths of source files in the tags file are translated to be relative to the
target file that has been created. So, the ctags tool will map the relative
path starting in the current directory ('something'), to the path of the source
files ('something/src') from the path of the target file ('/usr/share/tags').
(Did I make things more complicated?).
In fact I am using Windows so, I cannot use links as you proposed. Using the
ctags tool the way I mention it works perfectly for me.
Regards!
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---