I like that vim automatically saves backup files, but it is annoying when I use vim to edit a file that is in a svn working copy, since the files are already "backed up", and it creates clutter.
How do I configure vim to only save backups when I am editing a file that is NOT in a svn working copy?
Not an answer to your specific question, but I believe a better solution. Why not backup all your files into a separate directory, regardless of whether they are in source control?
Here's how, from my .vimrc. This creates the backups in the common ~/.vim_backups directory:
" Use a common directory for backups and swp files " Create it if it doesn't exist silent execute '!mkdir -p ~/.vim_backups' set backupdir=~/.vim_backups// set directory=~/.vim_backups//
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With