On Nov 14, 7:46 am, Tim Chase <[email protected]> wrote:
> > Sometimes even after I save my changes to a file using :w, I
> > can undo these changes (using u). But sometimes I cannot undo
> > after I have saved the file with :w. In both cases, I don't
> > close the file or exit vim.
>

> - something (possibly a plugin) is reloading the buffer after
> it's been saved which would make vim treat it as a "new" file
> with no undo history.  I'm not quite so sure how to check if this
> is happening, other than to scan through scripts (check the
> output of ":scriptnames"
>

I think this is it. I didn't know that if we reload the buffer say
using :e, it loses all undo history. Sometimes I might do a :e! to
abandon all the latest changes and revert back to the last saved copy
of the file, and then when I go back to that last saved copy, I
realize that I still need to do a few more undos. But now undo doesn't
work since I have already reloaded the buffer using :e!. Is it
possible to keep the undo history across several loads of the same
file (especially when I'm not explicitly closing the buffer with a :q
like in this case)? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to