Ⅰ. 插件描述
Highlights the line of the cursor only in the current window.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'miyakogi/conoline-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'miyakogi/conoline-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'miyakogi/conoline-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/miyakogi/conoline.vim
Ⅳ. 文档说明
Conoline.vim
This plugin highlights the line of the cursor, only in the current window. The colors change according to the mode (normal/insert). Colors in each mode are independently customizable.
This plugin is inspired by this post:
(http://vimblog.hatenablog.com/entry/vimrc_autocmd_examples)
Screencasts
Dark colorscheme (slateblue)

Light colorscheme (solarized)

Installation
If you are a NeoBundle user, add the following line in your vimrc.
NeoBundle 'miyakogi/conoline.vim'Then reload vim and execute :NeoBundleInstall.
Usage
Enable
:ConoLineEnableDisable
:ConoLineDisableToggle on/off
:ConoLineToggleConfiguration
Autostart
If you want to automatically enable this plugin, add the below line in your vimrc.
let g:conoline_auto_enable = 1Colors
You can define 'four' color-sets, each for dark/light backgrounds.
- Cursorline in the normal mode (overwrite
CursorLine) - Number of the cursorline in the normal mode (overwrite
CursorLineNr) - Cursorline in the insert mode (overwrite
CursorLine) - Number of the cursorline in the insert mode (overwrite
CursorLineNr)
Please see the following examples. You can use the same syntax as used in colorscheme files.
Examples
When you set 'backround=dark'
let g:conoline_color_normal_dark = 'guibg=#333333 guifg=#dddddd'
let g:conoline_color_insert_dark = 'guibg=black guifg=white'
If you set 'background=light', change the suffix from 'dark' to 'light'.Of course, you can set colors used in terminals.
let g:conoline_color_normal_dark = 'guibg=#333333 guifg=#dddddd gui=None '
\. 'ctermbg=grey ctermfg=white'
let g:conoline_color_insert_dark = 'guibg=black guifg=white gui=bold '
\. 'ctermbg=black ctermfg=white'If you are using light theme (set background=light), please change suffix from _dark to _light.
Use colors defined by the colorschemes
You can use colors defined by the colorscheme, for either or both in normal/insert modes.
For example, if you use colorscheme's color in the normal mode, add the following line in your vimrc.
let g:conoline_use_colorscheme_default_normal=1In this case, the options beginning with g:conoline_color_normal_ are ignored, and in the normal mode, color of the cusorline is defined by the colorscheme.
If you want to use the color set by the colorscheme in insert mode, use the following option.
let g:conoline_use_colorscheme_default_insert=1Default values
" For dark colorschemes
let g:conoline_color_normal_dark = 'guibg=#181818'
let g:conoline_color_normal_nr_dark = 'guibg=#181818'
let g:conoline_color_insert_dark = 'guibg=#000000'
let g:conoline_color_insert_nr_dark = 'guibg=#000000'
" For light colorschemes
let g:conoline_color_normal_light = 'guibg=#eaeaea'
let g:conoline_color_normal_nr_light = 'guibg=#eaeaea'
let g:conoline_color_insert_light = 'guibg=#ffffff'
let g:conoline_color_insert_nr_light = 'guibg=#ffffff'
" Use colors defined by colorscheme in normal mode.
" let g:conoline_use_colorscheme_default_normal = 0
" Use colors defined by colorscheme in insert mode.
" let g:conoline_use_colorscheme_default_insert = 0