Timer routine


Ⅰ. 插件描述

Does a 'timer' for vimscript like there is on other languages

Ⅱ. 基本信息

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

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Most programming environments give you some sort of a timer callback facility you can attach to one of your functions to do a thing periodically.  This is missing in VIM.  This script 'emulates' one by doing a quick series of un-obstrusive kepresses that cause the key pressed timeout to reset continually.  Normally this happens every for seconds.  This can be changed.  The updatetimer is used to achive this.  A value of 1000 will cause the 'timer' to be called every one second.  When you want to hook something up to this timer, simply create an autocommand for on update wait or something, I forget what it is called.  It looks something similar to: au onUpdateTimeout do something, but this is not right.  More later :)

添加新评论