Re: Clearing undo history after a file write

2007-02-05 Thread A.J.Mechelynck
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 side-e

Re: Clearing undo history after a file write

2007-02-05 Thread Tim Chase
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 o

RE: Clearing undo history after a file write

2007-02-05 Thread Max Dyckhoff
> To: Phil Edwards > Cc: Max Dyckhoff; vim@vim.org > 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&

Re: Clearing undo history after a file write

2007-02-05 Thread Tim Chase
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 so

Re: Clearing undo history after a file write

2007-02-05 Thread Phil Edwards
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

RE: Clearing undo history after a file write

2007-02-05 Thread Max Dyckhoff
ng undo history after a file write > > 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 an

Clearing undo history after a file write

2007-02-05 Thread Phil Edwards
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 trivia