0
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"

我发现,ctags 还是将/usr/include/python2.7/的内容写入了c.tags

请看:
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

1个回答

0

应该不需要双引号

另外一种方法是把要排除的路径放到文件中

$ ctags -R --exclude=@.ctagsignore .

.ctagsignore的内容是

/usr/include/python2.7/
/usr/include/python3.4
/usr/include/php5
/usr/include/ruby-2.1.0

撰写答案

相似问题