Ⅰ. 插件描述
Automatically scrolls to keep your cursor at 1/3 of the screenⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dbakker/vim-adjustscroll'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dbakker/vim-adjustscroll'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dbakker/vim-adjustscroll'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dbakker/vim-adjustscroll
Ⅳ. 文档说明
Vim Adjust Scroll
This plugin attempts to automatically adjust your Vim viewport so that about
1/3 of the text you're looking at is above and 2/3 of the text is below your
cursor.
This is achieved by scrolling automatically whenever:
* You open another file
* You jump a large distance in the current buffer
Take a look at the source if you're curious to how it works!
Installing
For NeoBundle_ add the following to your .vimrc::
NeoBundle 'dbakker/vim-adjustscroll'
For Pathogen_, execute::
cd ~/.vim/bundle
git clone https://github.com/dbakker/vim-adjustscroll
vim +Helptags +q
That's pretty much it!
License
Copyright (c) Daan Bakker. Distributed under the same terms as Vim itself. See :help license.
.. _Pathogen: https://github.com/tpope/vim-pathogen
.. _NeoBundle: https://github.com/Shougo/neobundle.vim