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

25645making changes without triggering undo

Expand Messages
  • HALIM,SALMAN (HP-NewJersey,ex2)
    Jan 31, 2002
    • 0 Attachment
      hi,

      is it possible to make a change to a buffer (say within a function) that
      doesn't affect the undo buffer? basically, i'm using the header.vim plugin
      which places a timestamp at the top of certain filetypes and updates it
      every time the file is saved. it works well, except that it affects the
      undo buffer so if i save something and then hit undo, it undoes the
      timestamp, requiring a second undo to take me back to the original change
      which prompted me to save the document.

      it also moves the cursor, which is inconvenient.

      it would be nice if there was some way to trigger that timestamp update in a
      way that doesn't modify the undo buffer. can anybody think of a way that
      that might be accomplished? (it sounds like it may be a new feature
      request: a command modifier called 'noundo' that works just like 'silent'
      except that it doesn't affect the undo buffer. although this seems like a
      bit of a potential security risk.)

      please advise and comment.

      thank you,

      salman.
    • Show all 6 messages in this topic