Autoread doesn't automatically read!

648 views
Skip to first unread message

Mikael Puhakka

unread,
Feb 14, 2011, 10:27:21 AM2/14/11
to vim...@vim.org
Hi everyone,
I may be mistaken so here's what I think is wrong:

When set 'autoread', the buffers should update automatically with new
content as they appear in the files. But that isn't the case.
A simple setting via the shell:

~ % while true ;
while> do
while> echo "line " $RANDOM >> flood.txt
while> sleep 1
while> done

and a 'tail -f' confirms flood.txt gets flooded.

Issuing ''vim -u None -U None --noplugin -c "set ar" flood.txt'' only
reads the stuff in the file at that moment, but nothing after it. I
might strongly suspect a distribution specific issue, but aren't sure
what I should check. So suggestions please.

Christian Brabandt

unread,
Feb 14, 2011, 12:13:46 PM2/14/11
to vim...@googlegroups.com

You probably want an autocommand, that forces checking the timestamp
of your file. Something like this:

:au BufEnter,BufWinEnter,CursorHold filename :checktime

Otherwise the check for changing timestamps is only occasionally
triggered (e.g. when running a shell command).

regards,
Christian

Mikael Puhakka

unread,
Feb 14, 2011, 12:28:22 PM2/14/11
to vim...@googlegroups.com
> --
> 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
>


Oh yes, that did the trick indeed! I was completely lost because the
help file wasn't very specific about the conditions. Thanks, and sorry
for stupid question.
--Mikael

Reply all
Reply to author
Forward
0 new messages