Saving backup files automatically in (g)Vim after saving a file.
- by Somebody still uses you MS-DOS
I had a problem with my gVim. I lost some important modifications after I plugged on my machine after a hibernating process.
To avoid this kind of problem, I would like to know if it's possible to add something in my .vimrc (or a plugin) that automatically backups all saving made to my files. Disk space is not an issue, I can delete these files after.
I'm already using
set backup
set backupdir=~/.backup/vim
set directory=~/.swap/vim
This creates a myfile.extension~ in my .backup/vim.
...but I would like this configuration to add ~ to first save, ~0 to second, ~1 to third, ~2 to fourth, and so on - something that keeps copies from all modifications I made to a file.
Is this possible? Do you know if there's a plugin for this?