how to auto refresh a file that open by vi command
i would like to monitor a file called fileA. A program will write into this files. how could I auto refresh the fileA that open by vi command?
|
Assuming you are using vim, there are several solutions here.
|
Just thinking aloud; 'tail -f' might work for what you want.
|
i try:
:set autoread it does not work... |
It doesn't work for me either but this does:
Code:
:set nolz | while 1 | e | redraw | $ | sleep 1 | endw |
hi catkin,
it is working! thx btw, could you explain on the command, the command is a bit long |
I found it by netsearching and am not familiar with the vi commands used.
:help nolz explains the first part. The rest is a macro with an infinite loop, with a 1 second delay. Use :help e, :help redraw and and :help $ for the rest. |
thx
|
lz seems to be lazyredraw. So nolz is not to do lazy draw.
I found it in this thread: http://vim.1045645.n5.nabble.com/Fin...td1192575.html post #7 |
All times are GMT -5. The time now is 04:57 PM. |