Ⅰ. 插件描述
Vim color picker script for OS XⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'iandoe/vim-osx-colorpicker'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'iandoe/vim-osx-colorpicker'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'iandoe/vim-osx-colorpicker'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/iandoe/vim-osx-colorpicker
Ⅳ. 文档说明
Vim color picker script for OS X
The Support OS X’s Color picker thread on the MacVim mailinglist made me hack on a little vim script that lets you select a color in OS X’s color picker and automatically insert it at the current postition in the buffer.
This can for example be useful for web developers who are editing their CSS files with Vim or similar tasks.

- Author : Maximilian Nickel
- License: BSD
- Original link: 2manyvariables
PS: For those of you wondering, the css color highlight in vim is the vim-css-color plugin
Usage
"to insert hex values at the current position
:ColorHEX
"to insert RGB values at the current position
:ColorRGBThe plugin detects if you're running MacVim and falls back to Terminal.app. If you want to use iTerm, do this:
let g:colorpicker_app = 'iTerm.app'Changelog
Update (2012-06-03)
Hosting to github so it's not lost.
Update (2010-10-01)
Updated to version 0.3. New feature: pick up the hex color code under the cursor.
Update (2010-03-13)
Uploaded new version 0.2 that keeps the focus on MacVim or the Terminal and checks for OS X. Also renamed the script to colorx.vim
The script is now also hosted at Vim scripts