When I have a file open in vim, in this case a log file, I'd like to trigger a refresh and load any file changes into my existing vim session.

I often use tail -f on log files, but as I'm using java and tomcat, the log messages are too much for tail...

Is there a vim command to reload an open file?

link|improve this question

71% accept rate
too much for tail? even as a vim user i dont see how vim can improve the situation ... – akira Feb 17 '11 at 17:40
possible duplicate of Tips for using vim as a log viewer – akira Feb 17 '11 at 17:42
too much for tail in that the number of lines was unpredictable so I couldn't be sure that tail -f n 200 would be enough – mcgyver5 Feb 17 '11 at 17:54
feedback

1 Answer

up vote 3 down vote accepted

Give this a try:

:e

From :h :e:

Edit the current file. This is useful to re-edit the current file, when it has been changed outside of Vim.

link|improve this answer
thanks! I thought at one point :e wasn't working for me but it works now! – mcgyver5 Feb 17 '11 at 17:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.