David Thompson wrote:
Hi,I'm using 'patchmode=.orig' in my ~/.vimrc, when I edit a new file such as xxx that does not exist, then save that file, I also get a 0-byte file called xxx.orig. This 0-byte file seems rather pointless. To recreate, vim -u NONE xxx :set patchmode=.orig iHello World<Esc> :wq then 'ls -l' and it shows, -rw-r--r-- 1 davidt core 12 Nov 14 22:47 xxx -rw-r--r-- 1 davidt core 0 Nov 14 22:47 xxx.orig I don't understand why vim cannot avoid creation of the 0-byte xxx.orig upon first creation of xxx. IMHO, this is a bug. Anyone agree?
[...] It's not a bug, it's a feature -- at least, it's documented: under 'patchmode' [...] If there was no file to be backed up, an empty file is created. Best regards, Tony.
