Peter Hodge wrote:
Sorry, it seems I was a little naive with that autocommand I showed you, it
doesn't work because CursorHold won't trigger again until you press a key.
After a little experimentation, I think you would best add something like this
CursorHold will fire (once) some time has elapsed after a key has been
pressed. Of course, if one wishes
to simply watch the file change and isn't pressing keys, this method
won't work well. So, may I suggest
that one use two vims -- one a "tickler" and one your actual display.
This approach your vims have the
+clientserver option compiled in.
Here's the idea for the tickler in rough:
1. the "actual display" vim is also started up as a server
2. the tickler is running
while 1
sleep 1
endwhile
3. inside the tickler's while loop it also does a
remote_send(server,":e")
Ideally commands would only be sent when the "actual display" vim is in
normal mode.
Perhaps something tricky with RemoteReply autocmds, etc could be used to
insure this.
Regards,
Chip Campbell