Ⅰ. 插件描述
Vim plugin to (toggle) highlight colors in any sourceⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'marcelbeumer/color-color-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'marcelbeumer/color-color-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'marcelbeumer/color-color-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/marcelbeumer/color-color.vim
Ⅳ. 文档说明
color-color.vim
Vim plugin to (toggle) highlight colors in any source. Use:
:ColorColorToggle
To go from this (in any file):

To this:

Toggle again to go back to normal. I map ColorColorToggle to Leader,Leader-c using:
map <Leader><leader>c :ColorColorToggle<cr>
Install
Either:
- Drop plugin/color-color.vim in ~/.vim/plugin/
- Or use pathogen.vim
- Or use the awesome vundle plugin manager (recommended)
Credits
This script is basically a hack on Max Vasiliev's vim-css-color, applying his code to any filetype, basing it on a VIM toggling command rather than a after/syntax, and adding a few tweaks to get the visuals right.