Ctags Command¶
ctags --c++-kinds=+p --extra=+f -R .
ctags --c++-kinds=+p --extra=+fq -R --languages=c,c++,c# --fields=+S -I @ctag_ignore_sal.txt .
--c++-kinds=+p
: for C++ language, identify the "function prototype" symbols (allowing jumps to the "declaration" in addition to the "definition").
--extra=+f
: generate tags for base file names. (allowing jumps to the include file names)
-R
: recursive over subdirectories
-I <Special Token>
- Useful to instruct ctags to properly handle some customized macros such as Microsoft SAL
--languages
: specify the languages of interest so that only the files of those languages are parsed.
- Useful to skip json and javascript files in the C++ project folder.
- Running "
ctags --languages=c++ myheader.h
" won't get MYMACRO in the tags file - Running "
ctags --languages=c++,CPreProcessor myheader.h
" will get MYMACRO in the tags file