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

95710Re: BUG: foo.c~ of 0 len should be reserved for previous "foo.c" of 0 len....(was Telling VIM not to create 'null' files...)

Expand Messages
  • Linda W
    Sep 9, 2008
    • 0 Attachment
      Ben Schmidt wrote:
      >> Well that's sorta the "rub"...I'm not modifying a ***pre-existing***
      >> file -- I am creating a new file. I don't want an *empty* file
      >> created if there was no file that existed before. If there *is* an
      >> empty file "foo.c", THEN I would expect, "foo.c~", to be created as a
      >> backup. But if there IS no file "foo.c", then when I save "foo.c",
      >> it's a **BUG** to create a "foo.c~".
      >
      > Yeah, I agree.
      >
      > The thing is, my Vim doesn't do this.
      ---
      set "patchmode=.orig"

      Are you saying if you set this, then it doesn't create a 0-byte patch file
      to indicate that the previous version (before you edited) was a 0-byte file?

      It does on mine -- but unfortunately, it creates the "file.orig"
      whether there was a file with 0 bytes pre-existing and also creates
      the file when there was no file. Thus if you try to go through and
      to determine what files you have edited you won't absolutely know if
      there was a 0-byte file there, or if there was a null file there.

      somewhat unrelated:

      my backups generally stay out of the way with the settings:
      set backupdir=./.backups, ~/.backups
      set backup
      set backupext=.bak
      ---
      so with dirs where I want to keep backups with the dir, I can create
      a .backups dir in any directory where I want to keep them separate,
      else they goto a generic, "hidden" home dir. (Using /tmp or c:/temp would
      leave my backups in a public tmp-dir which might not be desirable),
      Whereas ".backups" dirs (in home or a subdir) are usually r/w only for me.



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 16 messages in this topic