Im just curious if im viewing a file e.g. x.log which is currently being updated ie a log file. Is there a way to effectively refresh it rather than :q and vim x.log it again ?
A:
:e reloads the current file. Use :e! if you made any changes. You can assign a key to it like this:
nmap <F1> :e^M
Where ^M is a literal control-M (use control-V in vi).
Walter H
2010-01-21 11:26:25
A:
:edit with no other parameters will reload the current file.
:edit! to discard changes first.
Also gvim will prompt you to reload a file if you switch to another program and back, and it detects that the file has changed.
Dave Kirby
2010-01-21 11:26:41
+1
A:
Also you can do :set autoread if you are just viewing the file without changing it.
skeept
2010-01-21 15:48:27