Ⅰ. 插件描述
scrolloff as a fraction of window heightⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'drzel/vim-scroll-off-fraction'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'drzel/vim-scroll-off-fraction'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'drzel/vim-scroll-off-fraction'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/drzel/vim-scroll-off-fraction
Ⅳ. 文档说明
# vim-scrolloff-fraction
scrolloff as a fraction of window height.
Why?
I don't like my cursor line getting too close to the top or the bottom of the
- But I also don't like it being an absolutely fixed number of lines,
- varying window heights, especially when splitting horizontally. This
plugin allows you to set scrolloff to a fraction of the total window height.
Installation
Install with a plugin manager.
Usage
By default scrolloff will be set to 25% of the active window height. You can
change it with:
let g:scrolloff_fraction = 0.25By default quickfix windows use an absolute scrolloff value of 0. You can set
an absolute scrolloff value for certain filetypes:
let g:scrolloff_absolute_filetypes = ['qf']
let g:scrolloff_absolute_value = 0See :help 'scrolloff' for more information.