On 27-Mar-2010 16:45, Yakov Lerner wrote:
Hello Bram,
Patch 7.2.025 broke periodic execution idiom [1], it seems.
[1] http://vim.wikia.com/wiki/Timer_to_execute_commands_periodically
Can the ability to do perioc execution via CursorHold be restored ?
Periodic execution is possible in GUI-enabled vim via spawning
expernal subprocess that sends remote events to the vim.
In console vim, the idiom [1] is was the only possible means to
do periodic execution. 'updatetime' value served as a guarantee
to not get 100%cpu, so it seemed clean, no ? It was used in several
plugin, notably in "timetable" plugin that highlighted time-based lines of
file based on current time.
The mentioned idiom is a difficult to understand hack, and - when applied more
widely by plugins - will lead to congestion over the 'updatetime' value, among
other things.
There seems to be a real need for single-deferred and periodic scheduling (I
remember multple occasions for a "call me again in 2 seconds to clean something
up" function where I ended up misusing a variety of
CursorHold,WinLeave,InsertLeave events with a self-removing autocmd); how about
adding such functionality and discussing a possible interface for that instead?!
I can think of two alternatives:
a) setTimer({time}, {funcref}) function
b) autocmd with special event 'TimerNNN' where NNN is the timespan
-- regards, ingo
--
-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --
-- http://vim.sourceforge.net/account/profile.php?user_id=9713 --
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
To unsubscribe from this group, send email to vim_dev+unsubscribegooglegroups.com or
reply to this email with the words "REMOVE ME" as the subject.