ctags -R -I __THROW -I __attribute_pure__ -I __nonnull -I __attribute__ --file-scope=yes --langmap=c:+.h --languages=c,c++ --links=yes --c-kinds=+p --c++-kinds=+p --fields=+iaS --extra=+q \
-f .vim/tags/c.tag /usr/include/* --exclude="/usr/include/python2.7/" --exclude="/usr/include/python3.4" --exclude="/usr/include/php5" --exclude="/usr/include/ruby-2.1.0"
I found that ctags still wrote the contents of /usr/include/python2.7/ into c.tags
Please see:
grep “python*” /home/debian8/.vim/tags/c.tag
yoff /usr/include/python2.7/Imaging.h /^ int xsize, ysize, xoff, yoff; $/; ” m struct:ImagingCodecStateInstance access:public
ysize /usr/include/python2.7/ImDib.h /^ int xsize, ysize; $/; ” m struct:ImagingDIBInstance access:public
ysize /usr/include/python2.7/Imaging.h /^ int xsize, ysize, xoff, yoff; $/; ” m struct:ImagingCodecStateInstance access:public
ysize /usr/include/python2.7/Imaging.h /^ int ysize; $/; ” m struct:ImagingMemoryInstance access:public
ystep /usr/include/python2.7/Imaging.h /^ int ystep; $/; ” m struct:ImagingCodecStateInstance access:public
Double quotes should not be required
Another method is to put the path to be excluded into the file.
$ ctags -R --exclude=@.ctagsignore .
Ctagsignore’s content is
/usr/include/python2.7/ /usr/include/python3.4 /usr/include/php5 /usr/include/ruby-2.1.0