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

61332Re: Diffmode - 'Diffupdate on Save'

Expand Messages
  • Bram Moolenaar
    Sep 1, 2005
    • 0 Attachment
      Dominic Evans wrote:

      > Is there an easy addition to my .vimrc to make Vim do a 'diffupdate'
      > automatically every time I save one of the buffers being diffed?

      I didn't try it, but this should work:

      :au BufWritePost * diffupdate

      > Should this not be the default thing to do anyway?

      Why? Mostly the diff is updated when making changes. When it gets out
      of sync you need to invoke ":diffupdate", but that is not directly
      related to writing the file. One might as well want this for ":!ls" or
      ":help". At least I wouldn't want a user to write the file to get the
      diffs updated.

      You are not really successful until someone claims he sat
      beside you in school.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
    • Show all 3 messages in this topic