Ⅰ. 插件描述
Show syntax highlighting attributes of character under cursor.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/syntaxattr-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/syntaxattr-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/syntaxattr-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/SyntaxAttr.vim
Ⅳ. 文档说明
Displays the syntax highlighting attributes of the character under the cursor; including syntax group (and what it's linked to, if linked), foreground/background colors (name and numeric equivallent), bold, underline, etc.
Example output:
[WIth cursor on a function name in a vim script]
group: vimUserFuncName guifg=DarkCyan(#008b8b) gui=bold
[With cursor on "function" keyword in vim script]
group: vimFuncKey->Statement guifg=Brown(#a52a2a) gui=bold
[WIth cursor on "let" keyword in vim script]
group: vimLet->Statement guifg=Brown(#a52a2a) gui=bold
This can be helpfull both developing syntax files, and for determining what something is (according to the syntax rules), since the group names used in syntax files are usually well-named.
Recommended use with a mapping such as:
map -a :call SyntaxAttr()<CR>