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 of.
Perhaps it is something to do with my vimrc; I am pretty keen on keeping things around for as long as possible (:set hidden, :set history=1000, etc) Max > -----Original Message----- > From: Tim Chase [mailto:[EMAIL PROTECTED] > Sent: Monday, February 05, 2007 10:04 AM > To: Phil Edwards > Cc: Max Dyckhoff; [email protected] > Subject: Re: Clearing undo history after a file write > > >> 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 some other side effects that go with that > method...particularly marks and your jumplist for the given file > will also go up in smoke in the same way as your undo history. > > You may or may not want that effect. But every alternative way > of clearing the undo history that I've thought of has also > cleared these items as well so it's just tough luck. :) > > -tim > > > > > > >
