whatiwant:想要在vim中用omnicompletion或者omnicppcompletion的功能,實現對glibc函數的自動補齊,比如在C源文件中輸入pri,然后按C-xC-o能夠彈出列表補齊printf,諸如此類?,F在的問題是,我用ctags對glibc-headers-2.15-57.fc17.i686安裝的標準C頭文件進行處理,生成tags_glibc文件。但是在C源文件中輸入pri,然后C-xC-o,彈出的菜單里面,只有stdio2.h中的printf的定義和原型聲明,而沒有stdio.h的printf聲明。令人奇怪的是,我用vim查看生成的tags文件,搜索printf,發現有如下三條entry:printf /usr/include/bits/stdio2.h /^printf(__constchar*__restrict__fmt,...)$/;" fprintf /usr/include/bits/stdio2.h 108;" dprintf /usr/include/stdio.h /^externintprintf(__constchar*__restrict__format,...);$/;" p最后一條表明ctags的確生成stdio.h中的printf的原型聲明(類型為p),但是為什么我在insert模式下,輸入pri,卻看不見第三條呢?我錯在哪里了??fprintf(stdio.h,stdio2.h中都有該符號),memcpy(string.h,string3.h中都有)等函數也出現了同樣的現象。環境我的系統是fedora17(3.6.3-1.fc17.i686),ctags是最新版,5.8的用的ctags命令如下:ctags--langmap=c:.c.h--language-force=c-h.h--c-kinds=+pxl--exclude='tags*'--exclude='*swp'--exclude='*~'--exclude='*[!ch]'-I_THROW-I__attribute__+-I__wur-ftags_glibc-Lglibc-headers-filelist.txt其中,glibc-headers-filelist.txt的生成是如下命令:rpm-qlglibc-headers|grep'\.h'>glibc-headers-filelist.txt問題各位vim高手,請問有沒有辦法能夠比較好地生成glibc頭文件的tags文件
怎樣用ctags為glibc的頭文件生成tags?
慕田峪9158850
2019-04-23 15:35:27