Since upgrading to Slackware 12 I’ve noticed vim creates backups of every file I edit by appending the file with a tilde (~).
looks like this is a compilation option for vim 7.1 that comes with Slackware 12. My previous install did not do this, so I’m guessing the compile options were changed for Slackware 12. I confirmed this by running
One of the options that is set is
No problem with vim writing backups, in fact it can be good. Only problem I have with it is when I’m working on one of my web development projects I have to be careful not to ftp all of these extra files up to the server. There are two options.
I could disable the backup for vim by adding this to .vimrc
The other, and better, option is to set a dedicated backup directory
Now all of the backup files get created in a single .backup directory. This isn’t a perfect solution. Files with identical names (index.html) will get overwritten, but I’ve never once used a vim backup file, so this is still better than nothing.
For more informations, you might read this article
Are *.swp and *~ files littering your working directory?