Loading ...
Sorry, an error occurred while loading the content.

57213Re: [vim73] easy way to purge 'persistence undo'?

Expand Messages
  • Christian Brabandt
    Jun 5, 2010
    • 0 Attachment
      Hi Ingo!

      On Fr, 04 Jun 2010, Ingo Karkat wrote:

      > I like the idea of a command to purge the undo information, if only for
      > security/privacy reasons. (Imagine you've accidentally pasted your credit
      > card info into a Vim buffer; you don't want to have that persisted to
      > disk.)

      How about something like this:

      if has('persistent_undo')
      com! DeleteUndoFile :call delete(undofile(expand("%")))|echohl WarningMsg|echo "Undofile " . undofile(expand("%")) . " deleted!" | echohl Normal

      BTW: if I set ul=-1 and write the file, I also loose my undo history.
      But as this is a global option, it will also affect all open buffers.


      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 10 messages in this topic