Can I set directory for 'patchmode' ?

31 views
Skip to first unread message

Timothy Madden

unread,
Nov 23, 2011, 7:19:55 AM11/23/11
to vim...@googlegroups.com
Hello

Is there a way to have the .orig files, created with 'patchmode' in
effect, be created in some other directory ?

Not everyone in my team at work is using vim, and all those backup, swap
and original files that vim creates when I use it are nothing but
annoying to them. And to me, too, actually.

Now I can move the .swp and ~ files away with 'directory' and 'backup'
options, but is there a way to also have the .orig files away from my
source tree directory ?

Thank you,
Timothy Madden

Ben Fritz

unread,
Nov 23, 2011, 11:57:20 AM11/23/11
to vim_use

From :help 'patchmode', it looks like the files created by patchmode
use the 'backupdir' option.

And, don't forget the 'undodir' option for Vim 7.3's persistent undo!
Try it, you'll like it :-) (especially if you also use a plugin to
visualize your undo tree).

http://vim.wikia.com/wiki/Using_undo_branches

Timothy Madden

unread,
Nov 25, 2011, 1:49:19 PM11/25/11
to vim...@googlegroups.com
On 23.11.2011 18:57, Ben Fritz wrote:
>
>
> On Nov 23, 6:19 am, Timothy Madden<terminato...@gmail.com> wrote:
>> Hello
>>
>> Is there a way to have the .orig files, created with 'patchmode' in
>> effect, be created in some other directory ?
>>
[...]

> From :help 'patchmode', it looks like the files created by patchmode
> use the 'backupdir' option.
>
> And, don't forget the 'undodir' option for Vim 7.3's persistent undo!
> Try it, you'll like it :-) (especially if you also use a plugin to
> visualize your undo tree).
>
> http://vim.wikia.com/wiki/Using_undo_branches

:help 'patchmode' says 'backupdir' must not be empty, and the backup
copy is "renamed" into the .orig file. However it does not say the .orig
file is created in the 'backupdir'. I guess "rename" here also implies
"move" ...

I have vim 7.3 and the backup files are indeed created in the
'backupdir', but .orig files are still in the file directory.

Reply all
Reply to author
Forward
0 new messages