Reputation: 101
I'm a newbie using vim as an IDE for C. I have installed c-vim, omnicppcompletion, ctags and other useful plugins.
However omnicppcompetion is based on the ctags database, but it seems that ctags can't deal with functions like read/write/socket well.
I built my tags using the following command in my Arch box:
$ pacman -Qql glibc | grep \.h$ > /tmp/filelist_c ; ctags -L /tmp/filelist_c --c-kinds=+px --fields=+iaS --extra=+q
However functions like write,socket are not in the tags. I know these functions are extern functions in the header files, but only the argument list and function are needed to do the completion and even extern functions have enough info for me.
Any idea about making tags which also include extern functions?
Upvotes: 2
Views: 1383
Reputation: 10747
Header files *.h
is known by ctags
as C++
files, so, the easiest way to achieve what you need is to add the following option to ctags command line:
--c++-kinds=+p+l
And, well, why not to use plugin Indexer that was made especially for managing the ctags in Vim?
Upvotes: 4