Ⅰ. 插件描述
Deprecated. Do not use.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'junegunn/vim-scroll-position'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'junegunn/vim-scroll-position'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'junegunn/vim-scroll-position'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/junegunn/vim-scroll-position
Ⅳ. 文档说明
# vim-scroll-position
This plugin displays the relative position of the cursor within the buffer
on the left side of the screen using the sign feature.

>Current position-Latest jump positionxLatest change position
Disclaimer
Unfortunately on the current version of Vim, updating signs slows down
the rendering of the screen, both on Vim and GVim.
It is the limitation of Vim itself, and there's not much we can do about it.
If you observe a significant slowdown, I'm sorry but you may have to disable this plugin.
Installation
With Vundle
Add this line to your .vimrc
Bundle 'junegunn/vim-scroll-position'Then,
:BundleInstallHelp
:help vim-scroll-positionCustomization
" Default markers
let g:scroll_position_marker = '>'
let g:scroll_position_visual_begin = '^'
let g:scroll_position_visual_middle = ':'
let g:scroll_position_visual_end = 'v'
let g:scroll_position_visual_overlap = '<>'
" Additional markers disabled by default due to slow rendering
" let g:scroll_position_jump = '-'
" let g:scroll_position_change = 'x'
" Not to enable plugin by default
" let g:scroll_position_auto_enable = 0
set t_Co=256
hi SignColumn ctermbg=232
hi ScrollPositionMarker ctermfg=208 ctermbg=232
hi ScrollPositionVisualBegin ctermfg=196 ctermbg=232
hi ScrollPositionVisualMiddle ctermfg=196 ctermbg=232
hi ScrollPositionVisualEnd ctermfg=196 ctermbg=232
hi ScrollPositionVisualOverlap ctermfg=196 ctermbg=232
hi ScrollPositionChange ctermfg=124 ctermbg=232
hi ScrollPositionJump ctermfg=131 ctermbg=232Display of visual range
You can configure how to display visual range on the gutter using g:scroll_position_visual variable.
let g:scroll_position_visual = 1

let g:scroll_position_visual = 2
This looks better, but considerably slower than mode 1.
