On 9/7/06, Wolfgang Schmidt <[EMAIL PROTECTED]> wrote:
Hi, I want to use vim to watch the output of another program (logfile, compilation output, ...). I want to have something like the functionality of the unix "tail" command, that is, if something new is written to the file, I want the buffer to get updated. I know I can reload the file manually with ":e", but I want it to be done automatically. I tried the autoread option (":set ar"), but I still have to reload the buffer by hand, the buffer does not get updated automatically. Could anybody tell me, how autoread is supposed to work?
Autoread is something different and wont help you. Try this: set nolz | while 1 | e | redraw | $ | sleep 1 | endw which does approximately what you need. Cancel by Ctrl-C. Or bundle this line into mapping and/or custom functions. Yakov