Artificial intelligent assistant

Undoing C syntax mangling macros to make exctags able to create prototype tags I can successfully create a `tags` file for vim with exctags ( _Exuberant Ctags_ ). However, creating tags allowing to **jump to the prototype** of a function does not work, due the system headers using a syntax-mangling macro of the form #define _EXFUN(name, proto) name proto and in, e.g. `string.h` using char *_EXFUN(strchr,(const char *, int)); which creates a tag for `_EXFUN` instead of `strchr`: _EXFUN /somedir/include/string.h /^char *_EXFUN(strchr,(const char *, int));$/;" p I create tags with this command: exctags -f tags.p --language-force=c --c-kinds=p file1 file2 ... I've read the exctags man page up and down, tried various `-I` options to affect macro expansions but to no avail. Has anyone solved this?

To handle that particular macro, you could use the `--regex-` option:


ctags --regex-c='/^[^#]*_EXFUN *\( *([^ ,]+),.*/\1/p/' ...


Which generates a `tags` file with:


_EXFUN test.c 1;" d file:
strchr test.c /^char *_EXFUN(strchr,(const char *, int));$/;" p

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy edbd98be5f7cbdfcfe7d387daee26dd1