Ⅰ. 插件描述
A Vim plugin to colorize all text in the form #rrggbb or #rgb.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'lilydjwg/colorizer-sparks-fly'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'lilydjwg/colorizer-sparks-fly'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'lilydjwg/colorizer-sparks-fly'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/lilydjwg/colorizer
Ⅳ. 文档说明
# Colorizer
A Vim plugin to colorize all text in the form #rgb, #rgba, #rrggbb, #rrgbbaa,
rgb(...), rgba(...). See the comment at the beginning of the
plugin
for more options.
Screenshots:
The left screen shows colortest.txt
in Vim in xfce4-terminal.
The right screen shows colortest.txt
in gVim.
Installation
Pathogen, Vundle, etc.
cd ~/.vim/bundle
git clone https://github.com/lilydjwg/colorizer
Manually
Use make install
and make uninstall
to quickly install/uninstall the
script, or simply copy plugin/colorizer.vim
and autoload/colorizer.vim
to
your .vim
dir.
Origin
This version is based on https://github.com/lilydjwg/colorizer, also found as
colorizer.vim on vim.org
Known issues
This plugin is still inefficient for large files. I strongly sugguest you
enable it only when you need it, or set the g:colorizer_maxlines
variable,
e.g. to 1000
. There seems to be no way to get current displaying lines and do
work with them in Vim.