I\'m building a custom vimrc to improve my workflow, and I really liked the idea of setting a centralized directory to keep all backup, swap and undo files together, like th
In addition to the answer of Victor Schröder, I suggest using this autocommand instead :
autocmd BufWritePre * if filereadable(@%) | :call SaveBackups() | endif
Unless this, it won't work in the case you are openning a new file directly with vim. And it doesn't make sense to save an empty backup...