On 7/13/06, Robert Ingraham <[EMAIL PROTECTED]> wrote:
What I'd like to do is mimic the VMS file versioning feature wherein if you
edit a file (say, "file.txt") , the original is saved as "file.txt.1".
Subsequent backups of the same file are saved as "file.txt.2", "file.txt.3" and
so forth. In this case, the most recent backup would be "file.txt.3" and second
oldest backup would be "file.txt.2" and the original file would be
"file.txt.1".
Of course, if there are no changes to the file, then no incremental backup file
is created.
I looked into writing a script to do this but, being new to Vim scripting, I
didn't see a way to hook into the internal backup logic, or if that's even the
right way to accomplish this. I'd like it to be automatic, so the user doesn't
have to do anything different when saving a file (like having to run a script
before saving.)
Any pointers would be greatly appreciated.
A quick search on vim.sf.net reveals:
http://vim.sourceforge.net/scripts/script.php?script_id=89
which sounds very much like what you describe.