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

Re: 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
  • Ben Schmidt
    ... My apologies. I thought we were discussing the backup option. I didn t even know of the patchmode option. That said, the behaviour of patchmode
    Message 1 of 16 , Sep 9, 2008
      Linda W wrote:
      > 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"

      My apologies. I thought we were discussing the 'backup' option. I didn't
      even know of the 'patchmode' option.

      That said, the behaviour of patchmode creating an empty file when none
      existed previously is consistent with its namesake, the patch utility
      (and diff) which have similar ambiguity between empty and nonexistent

      I would still probably prefer the behaviour you mention, but I don't
      think it's so wrong as if 'backup' (and 'backupext') behaved this way,
      and the behaviour you are experiencing is documented.

      On my man pages for diff/patch it's listed under 'CAVEATS' not 'BUGS',
      too, but I reckon that's pretty open to interpretation!



      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.