sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 5/7, Downloaded by 469    Comments, bugs, improvements  Vim wiki

created by
Paul Contreras
 
script type
utility
 
description
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 :)
 
install details
Paste it in your _vimrc somewhere.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
Timer.vim 1.0 2010-09-19 7.0 Paul Contreras Just modified the tail 'END TIMER' comment to make it dead obvious to you when you read it where this script ends.
Timer.vim 1.0 2010-09-19 7.0 Paul Contreras Initial upload
ip used for rating: 54.166.15.127

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo