If you are editing a file that has been modified by some external program, it can be refreshed with the command :edit without any parameters, or simply :e. If you have modified the file locally, you may lose modifications after refreshing the file using :e!.
It is not obvious and convenient for those who use cvs, svn, git, etc.
On-topic options
1 | :help autoread # refresh the file automatically when it is modified |
1 | :help noconfirm # turn the warning about the loss of unsaved data on/off |
1 | :setlocal autoread # set the option of auto-reading for local buffer |
1 | :setl ar # the same thing (shortened version) |
Note that auto-reading occurs only in the case of user-defined events, i.e. the user is working with the editor. Although, if you want to convert VIM into the analogue of tail -f, you can do the following:
:set nolz | while 1 | e | redraw | $ | 1 sleep | endw
You can break this endless cycle by pressing ctrl-c