file.txt → file.txt~
So you have access to the last version of your edited file, without the hassle of additional versioning software like RCS, SCCS, subversion or Git.
The drawback is the "pollution" of your directory with all these files~
With vv you will have not only the last version,
but up to 100 (default are 10) versions and there is no more files~
mess in your working directory, because all version files are stored in a
.versions/ subdirectory.
autocmd BufWritePre * execute '! vv -s ' . shellescape(@%) autocmd BufWritePost * execute '! vv -s ' . shellescape(@%)ATTENTION: this will not work with vim.tiny, you need the full version of vim (vim.basic)
(add-hook 'before-save-hook (lambda () (shell-command (concat "vv -qs " (shell-quote-argument (buffer-file-name)))))) (add-hook 'after-save-hook (lambda () (shell-command (concat "vv -qs " (shell-quote-argument (buffer-file-name)))))) (setq make-backup-files nil)
jed -batch).
export EDITOR=your_favourite_editor # example: export EDITOR=nano alias ve='vv -e'Then you can edit your files (with automatic versioning) with:
ve fileLimitation of ve: you can edit only one file within one run.
If you inadvertently delete your file, you can recover it with:
vv file
vv does not break symbolic or hard links (like many other programs).
vv comes with zz and del in one package.
To install it, call: perl -I vv
vv [-l] [FILE] # list vv -s [-f] FILE [COMMENT] # save vv -r [VERSION_NUMBER] FILE [NEW_FILE] # recover vv -d [VERSION_NUMBER[:VERSION_NUMBER]] [FILE] # show diff vv -D [VERSION_NUMBER[-VERSION_NUMBER]] FILE # delete vv -D [-R] . # delete all vv -v VERSION_NUMBER FILE [VIEWER_COMMAND] # view vv -c [VERSION_NUMBER] FILE [COMMENT] # comment vv -e FILE # edit vv -N [NUMBER] FILE # set or show number vv -m [-R] # migrate vv -p # purge vv -M FILE DIRECTORY # move vv SHELL_COMMAND FILE~ # execute vv -H # help
framstag@fex:/sw/share/jedlib-0.99-19/lib: vv 8 defaults.sl 9 jed.rc 3 keys.sl 1 misc.sl 9 versions.sl framstag@fex:/sw/share/jedlib-0.99-19/lib: vv keys.sl version bytes time . 6003 2013-04-13 13:32:58 1 6001 2013-04-11 09:39:59 2 5963 2012-07-29 13:01:45 3 5793 2011-07-25 13:46:39 framstag@fex:/sw/share/jedlib-0.99-19/lib: ll keys.sl .versions/keys.sl* -rw-r--r-- framstag users 6,003 2013-04-13 13:32:58 keys.sl -rw-r--r-- framstag users 6,001 2013-04-11 09:39:59 .versions/keys.sl~01~ -rw-r--r-- framstag users 5,963 2012-07-29 13:01:45 .versions/keys.sl~02~ -rw-r--r-- framstag users 5,793 2011-07-25 13:46:39 .versions/keys.sl~03~