Describe the bug
When the patchmode option is non-empty, patchmode files are not placed into the directory specified by the backupdir option.
With set backup, set backupdir=~/.vim/backups, and set patchmode=.orig, patchmode files are not created in the backupdir, but in the directory of the files edited.
To Reproduce
mkdir -p ~/.vim/backupscd ~ && echo 'Hello' > hello.txtvim --clean hello.txt:set backup backupdir=~/.vim/backups patchmode=.orig:wq)~ (~/hello.txt.orig).Expected behavior
The patchmode file should have been placed in the backupdir instead (~/.vim/backups/hello.txt.orig).
Environment
Additional context
If this is not a bug, then this is a feature request: add a patchmodedir option.
Relevant mailing list threads from many years ago:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
I think this is a duplicate of #5791 (more or less). Note this part in the documentation (:h 'patchmode'):
(Detail: The backup file is renamed to the patchmode file after the new file has been successfully written, that's why it must be possible to write a backup file)
closing as being a duplicate.
Closed #8085.