sexyscroll.vim


Ⅰ. 插件描述

To scroll buffer with *sexy* scrolling animation (aka, smooth scrolling :-)

Ⅱ. 基本信息

创建日期:  2012-03-18
使用用户:  4
Github星:  4
插件作者:  daylilyfield

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/daylilyfield/sexyscroll.vim

Ⅳ. 文档说明

sexyscroll.vim

To use this plugin, you can scroll your vim with smooth animation. You never
get lost if you press <C-u> or <C-d> many times.

How to Install

Place this plugin into vimfiles or .vim directory. I recommend pakcage
manager; pathogen or
NeoBundle or something like that.

How to Use

At first, please press C-d. As you see, a buffer scroll down with smooth scroll. Key maps that sexyscroll.vim asigns by default are described below.

  • <C-u>: scroll up as much as scroll option value in 500 milliseconds.
  • <C-d>: scroll down as much as scroll option value in 500 milliseconds.
  • <C-b>: scroll up as much as double scroll option value in 500 milliseconds.
  • <C-f>: scroll down as much as double scroll option value in 500 milliseconds.

Of course, you can set your own mappings.

How to Customize

sexyscroll.vim provides some global variables to customize its behavior.

  • g:sexyscroll_update_display_per_milliseconds

To use this variable, you canspecify display refresh rate.By default, this
variable set to 33 milliseconds. So display refreshes approximately 30
frames per secons.

  • g:sexyscroll_map_recommended_settings

To use this variable, you can omit default key mappings described above. If
you want to do so, you set this variable to 0.

Public APIs

sexyscroll.vim provides a public api.

  • g:sexyscroll(direction, lines, duration)

Start scroll up or down.

direction: scroll direction. specify either up or down.
lines: scroll amount.
duration: scroll duration. specify it as milliseconds.

Caution

This plugin uses and changes updatetime option to use animation for a limited

  1. By default, plugin changes updatetime to 33 milliseconds for 500
  2. This settings required to run plugin on MacVim. If you are
  3. about it, I recomend not to use this plugin.

VerifiedEnvironment

  • MacVim 7.3 (Kaoriya)
  • Vim 7.3 (Kaoriya)

vim: tw=78

添加新评论