我在vim中使用Taglist插件.在taglist窗口中,我可以看到名称空间,类,结构,函数等标签,但不能看到变量.我在Taglist网站上看到了一个截图(附在下面),里面有这个信息.我正在使用Vim 7和Exuberant Ctags 5.8,并且我使用此命令生成了我的ctags
ctags --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++
Run Code Online (Sandbox Code Playgroud)
alt text http://vim-taglist.sourceforge.net/images/taglist_c.gif
小智 8
s:tlist_def_cpp_settingsTaglist插件(.vim/plugin/taglist.vim)中有一个变量,用于定义默认显示哪些元素.
我把它扩展到:
let s:tlist_def_cpp_settings = 'c++;n:namespace;v:variable;d:macro;t:typedef;' .
\ 'c:class;g:enum;s:struct;u:union;f:function;m:member;' .
\ 'p:prototype'
根据标签列表手册,您还可以tlist_cpp_settings在您.vimrc的类似值中定义.
对于其他语言,存在不同的变量