Tuesday, February 26, 2013

Re: How to refresh (reload) an opened file?

On 2013-02-26, Tim Chase wrote:
> On 2013-02-26 10:53, Andy Richer wrote:
> > I opened a report file that is changed once I correct some code and
> > re-generate report.
> > Is there a way that I can do "refresh" or "reload" without quit the
> > re-open the file to see updated contents?
>
> Depends on what behavior you want, and whether you want to preserve
> any changes you made in the first version of the output. To re-read
> the file from disk, you can use
>
> :e
>
> (note: no filename) If you've made changes in the current buffer,
> you can abandon those with
>
> :e!
>
> If you want to keep the current version in Vim and read the existing
> file into another buffer, ...

An easy way to compare the current buffer contents with the version
on-disk is to use the DiffOrig command. See

:help DiffOrig

Regards,
Gary

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment