sponsor Vim development Vim logo Vim Book Ad

plugin/backup.vim : Numbered Backups.

 script karma  Rating 119/38, Downloaded by 3894  Comments, bugs, improvements  Vim wiki

created by
Martin Krischik
 
script type
utility
 
description
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1537

Holds numbered backups inside a separate directory.

Automatically purges old backups. Standard is to hold the last 10 versions.

Tested with Linux, MS-Windows and OpenVMS.

IMPORTANT: Creating this plugin was only possible because vim 7 offers new file management functions - namely :mkdir, finddir() delete() and the new List datatype. This plugin won'g work with vim 6.x.

| Vim-Script  || https://www.vim.org/scripts/script.php?script_id=1537
| Source      || https://github.com/krischik/vim-backup
| Wiki        || https://github.com/krischik/vim-backup/wiki
| Releases    || https://github.com/krischik/vim-backup/releases
| Issues      || https://github.com/krischik/vim-backup/issues
| Discussions || https://github.com/krischik/vim-backup/discussions
 
install details
Install from https://github.com/krischik/vim-backup using dein (https://github.com/Shougo/dein.vim) or similar:

{{code|lang=vim|
call dein#begin('$HOME/vimfiles/bundles')
call dein#add('krischik/vim-backup')
call dein#end()
call dein#install()
}}

set the following global variables:

g:backup_directory name of backup directory local to edited file
used for non VMS only. Since non VMS operating-
systems don't know about version we would get
ugly directory listings. So all backups are
moved into a hidden directory.

g:backup_purge count of backups to hold - purge older once.
On VMS PURGE is used to delete older version
0 switched the feature off
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-plugin-backup-v_3.0.zip 3.0 2022-09-22 7.0 Martin Krischik See: https://github.com/krischik/vim-plugin-backup/releases/tag/v_3.0
backup.vim 2.2 2007-07-20 7.0 Martin Krischik There was a bug for windows in conjunction with spaces in file names. It did not affect Unix like OS. And it's fixed now.
backup.vim 2.1 2006-11-18 7.0 Martin Krischik bug fixes.
backup.vim 2.0 2006-05-25 7.0 Martin Krischik New coordinated release for all Ada plugins. Binary releases which are patched with all Ada plugins is available from the GNU Ada project [1]

[1] http://gnuada.sourceforge.net
backup.vim 1.1 2006-05-17 7.0 Martin Krischik Fixed two bugs:

VMS: "press key to continue" is gone.
non VMS: set of backup directory to user defined variable fixed.
backup.vim 1.0 2006-05-10 7.0 Martin Krischik Initial upload
ip used for rating: 3.22.181.81

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github