Smooth Center


Ⅰ. 插件描述

Smoothly centres display when you press Esc like zz, zt and zb

Ⅱ. 基本信息

创建日期:  2010-07-14
使用用户:  1
Github星:  1
插件作者:  Paul Contreras

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/smooth-center'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/smooth-center'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/smooth-center'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Smooth-Center

Ⅳ. 文档说明

Normal VIM lets you center the file based on the current cursor position when you press zz, zt and zb.  This is nice but wouldn't it be nicer if this centering took place smoothly, like panning across a scene of a movie.  This script gives you this: Esc, SHIFT-Esc and SHIFT-F1 in Normal mode work like for zz, zt and zb respectively.  You can cancel by re-pressing Esc.   Script correctly accounts for 'scrolloff' setting.  Note: the default updatetime should be lowered to see this or else it will not appear to do anything.  The default is 4000 but I use 650.  There are some glitches in the Center (Normal mode / ESC) like the scrolling keeps going back in on itself when there are folds present, and the scrolling tries to continue if you are at the bottom of the buffer.  These do not affect S-Esc / S-F1, (zb and zt equivs. respectively) and works ok if there are no folds or you are not at the bottom of the script.  Working on these!! :)

添加新评论