Ⅰ. 插件描述
Syntax Highlight based on tagsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/dotagstuff'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/dotagstuff'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/dotagstuff'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/DoTagStuff
Ⅳ. 文档说明
Extract information from a tags file (exuberant ctags), and generate syntax highlighting scripts for functions, globals, macros, etc.
Somewhat "raw" extraction from my working environment; i.e., not particularly generic; e.g., hard-coded color settings for the various types of tokens identified (functions, macros, etc.). Easily changed, but by editing the c.vim included that is intended to go in your "after/syntax" vim directory.
Not very polished, but perhaps helpful.
For a sample of the results, see: http://castandcrew.com/~gary/DoTagStuff/
NOTE: You must include the --fields option to ctags that includes "language of source file containing tag" (i.e., "--fields=l" ; I use --fields=+Kl). It's needed so that the language type of each tag is included in the tags file. This is needed to properly form syntax groups (e.g., cStaticFunction or perlExternalFunction -- to get the "c" or "perl" parts).