On 4/30/06, Eddy Zhao <[EMAIL PROTECTED]> wrote:
At some point, I want to permanently save the buffer with out the
possibility of
accidentally undo the changes I've made (this happens sometimes). How
can I clear
the undo stack (without leaving the current buffer). Or any other simpler way of
achieving this?

I believe this sequence clears undo stack:
   :up! | set nohidden | e dummy | bw
It might be useful add save/restore of 'hidden' option:
   :up! | let x=&hidden | set nohid | e dummy |bw | let &hidden=x
If you want to map it , remember to change | to <bar>
  map <f9> :up! <bar> ...etc

Yakov

Reply via email to