Ⅰ. 插件描述
Light and dark colorscheme with ambient light detectionⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gcmt/plum-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gcmt/plum-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gcmt/plum-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gcmt/plum.vim
Ⅳ. 文档说明
## Plum colorscheme
Plum is a vim colorscheme that support both light and dark background. If you are using OS X, Plum
can automatically switch between dark and light background as the ambient light changes.
Installation
Install the plugin with Vundle
# this line needs to be added to your .vimrc file
Bundle "gcmt/plum.vim"
or Pathogen
$ cd ~/.vim/bundle
$ git clone git://github.com/gcmt/plum.vim.git
If you're running Mac OS X and want to use ambient light detection you need to move to the plugin
root directory and run
$ cd ~/.vim/bundle/plum.vim
$ ./install.sh
Usage
Set in your .vimrc the default background before setting the colorscheme:
set bg=dark
colorscheme plumIf you are using OS X and a camera is available, Plum will set automatically the background
according to the current ambient light.
Settings
let g:plum_cursorline_style = 1
" With this option you can set different styles for highlighting the current line
" when the 'cursorline' option is turned on:
"
" - 1: Highlight both the current line and the current line number. (default)
" - 2: Highlight only the current line.
" - 3: Highlight only the current line number.
" - 4: Highlight only the background of the current line number.
let g:plum_threshold = 120000
" When the ambient light sensor read a value below this value, the background is
" set to 'dark', otherwise is set to 'light'.
" Note that the default value is somewhat arbitrary: the values read by the
" sensor span the range [0 - 67,092,408] but I've found that indoor the range
" is roughly [0 - 2,000,000]. To me, only below 120,000 (default) it seems
" reasonable to set a dark background but I also know this is just my preference.
" If the default value does not fit for you, to find the right one you can experiment
" directly with the 'light' executable in the 'bin' directory.
let g:plum_force_bg = ""
" Set this option to `light` or `dark` to force a specific background
" regardless of the current ambient light.Screenshots
All screenshots have been taken from MacVim (font: GohuFont 14, language: go).
")
")