Closed CatalinGB closed 6 years ago
Hi!
If you want to do more complex argument passing, you should either:
~/.ctagsrc
(if this is generic enough to apply to all ctags
runs on your machine).gutctags
file at the root of the project (if it's specific to one project, or at least not too many projects at the same time).ctags
options file somewhere and pass --options=/path/to/ctags/options
as the extra args in Gutentags.This way you won't run into shell escaping problems, which can get quite hairy quite fast.
For more info, read the docs on ctags
options files, and on .gutctags
files in Gutentags.
Hi!
Thanks for the reply :)
I've tried with .gutctags and after a bit more struggle I get it to work. The catch is to add options separated by new line and with no double quotes like so:
cat .gutctags
-D FUNC(ret) ret
Cool, good to know, thanks!
Hello,
Autosar uses for C development certain compiler abstraction macros like:
One way to generate a correct tags file is to call ctags with
-D "FUNC(rettype, memclass) memclass rettype"
When I try to use
let g:gutentags_ctags_extra_args += '-D FUNC'
everything is working as expected.More complex macro definitions need to be surrounded by quotes like in the case of
-D "FUNC(rettype, memclass) memclass rettype"
.In ctags.vim:137 when calling
shellescape
the double quotes are escaped ending with-D ""FUNC(rettype, memclass) memclass rettype""
which cannot be interpreted by ctags.The name of the parser: universal-ctags
The content of input file:
The tags output you are not satisfied with(
ctags main.c
):The tags output you expect(
ctags -D "FUNC(rettype) rettype" main.c
):The version of ctags:
How do you get ctags binary: Building it locally and win32 binary taken from Universal-ctags/ctags-win32 project