After writing out a file, I would (sometimes, not always) like to
prevent 'u' from undoing past the :w into old changes, e.g.,
- change #1
- change #2
- :w
- change #3
- change #4
- 'u' undoes #4 and then #3, but then stops
This seems like such a simple thing, but to my surprise it's less
The easiest thing to do would probably just to do :e after your :w. :e will
re-read the file, wiping the undo buffer.
Max
-Original Message-
From: Phil Edwards [mailto:[EMAIL PROTECTED]
Sent: Monday, February 05, 2007 9:26 AM
To: vim@vim.org
Subject: Clearing undo history after
On 2/5/07, Max Dyckhoff [EMAIL PROTECTED] wrote:
The easiest thing to do would probably just to do :e after your :w. :e will
re-read the file, wiping the undo buffer.
Ah, didn't know about that side effect. I knew there had to be an
easier solution. :-) Thanks!
phil
The easiest thing to do would probably just to do :e after
your :w. :e will re-read the file, wiping the undo buffer.
Ah, didn't know about that side effect. I knew there had to
be an easier solution. :-) Thanks!
Max is correct (and it is quite easy), though just be aware that
there are
That's strange, my marks are maintained when I do an reload
the buffer with :e, and the jumplist seems to be preserved,
too. I never use either mechanism, but a little experiment
shows they are still there. Perhaps there are other things
that are erased too though, a side-effect I hadn't thought
Max Dyckhoff wrote:
That's strange, my marks are maintained when I do an reload the buffer with :e,
and the jumplist seems to be preserved, too. I never use either mechanism, but
a little experiment shows they are still there. Perhaps there are other things
that are erased too though, a