Ⅰ. 插件描述
vim plugin for changing background color of linesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'scottupdike/wholelinecolor'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'scottupdike/wholelinecolor'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'scottupdike/wholelinecolor'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/scottupdike/vim-wholelinecolor
Ⅳ. 文档说明
# vim-wholelinecolor
vim plugin for changing background color of lines
Summary
Have you ever wanted to mark lines or groups of lines in a way that is easy
to see and be be able to jump to those markings? The WholeLineColor plugin
lets you do just that. Using Vim's signs feature, the background color of
lines can be changed with convenient mappings. Groups of lines can be
marked in visual mode with the same mappings. There are also mappings to
go to the next and previous group of marked lines.
Functionality
<Space>buRemove set color from current (or selected) lines.
<Space>bnSet background of current or selected lines to green.
<Space>bgSet background of current or selected lines to grey.
<Space>blSet background of current or selected lines to blue.
<Space>bpSet background of current or selected lines to purple.
<Space>brSet background of current or selected lines to red.
<Space>bbSet background of current or selected lines to black.
The above mappings work in both normal and visual mode and take a count just
like built in commands.
If you have the vim-repeat plugin
installed, you can also repeat any of the above mappings with dot, '.'.
<Space>bKDelete all lines that don't have background color set (keep only lines with
background color set).
<Space>bDDelete all lines with background color set.
<Space>bURemove all set background colors.
<c-n>Go to next group of lines with background color set.
<c-p>Go to previous group of lines with background color set.
Options
g:wholelinecolor_leaderThe key used as the leader to the mappings. The default is <Space>.
g:wholeline_sign_numStarting sign id. The default is 373700. Change this if this is conflicting
with other sign ids, e.g. sign ids coming from other plugins.
g:wholelinecolor_nextThe keystroke used to go to the next group of lines with background color set.
The default is <c-n>.
g:wholelinecolor_prevThe keystroke used to go to the previous group of lines with background color
- The default is
<c-p>.
These are the default highlight settings. Change them to suit your preferences.
highlight WLCBlackBackground ctermbg=233 guibg=#121212
highlight WLCRedBackground ctermbg=52 guibg=#882323
highlight WLCBlueBackground ctermbg=17 guibg=#003366
highlight WLCPurpleBackground ctermbg=53 guibg=#732c7b
highlight WLCGreyBackground ctermbg=238 guibg=#464646
highlight WLCGreenBackground ctermbg=22 guibg=#005500Credits
The starting point of this plugin was the numsign plugin created by Jinjing He.
Some of the original code remains.
License
The WholeLineColor plugin is released under Vim's license.