Saturday, May 18, 2013

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

On 2013-05-18 08:42, Sam Roberts wrote:
> :e %
>
> e is edit
> % is current file name

The "%" is optional, as that's the default if you don't specify
anything. If you've made unsaved changes to your current buffer,
you'll need to "!" it:

:e!

Note that reloading loses things like the jump-list and undo history
for the buffer, so it might be better to do something like

:%d
:$r %
:0d

which should keep at least preserve the undo history though the
reload.

-tim



--
--
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