I need a timer in a vim script I want to improve. Vim does not support the idea of a timer in Vim script. So doing something like:
!fun callBack()
do stuff
endfun
timer( 300, callBack )
Is not possible.
I've tried using Python's threading.Timer and signals, SIGALRM, in Python with little luck. I actually got the Timer object to work, but when the Timer thread would run it would call vim.command( "stuff" ) and it would take seconds for "stuff" to execute. I'm guessing it's a threading issue.
I've looked into using the Vim clientserver feature with Python's Timer. So if the Timer goes off the Timer thread would spawn a call to vim and use the new vim process to send c