Monday, August 8, 2011

Re: emacs-style file backups

On Aug 07, 2011 at 02:15 AM -0400, Alan wrote:
>I want a new backup file only when I first open up a file in a buffer and
>save it the first time. But after I close the buffer and reopen it again
>later, I want it to write another backup.

I wrote a crummy vim script that makes a back up copy of a file, with
the date and time in the name every time you save, but only if there
have been changes to the file. So I'm sure what you ask could easily be
done. Just set a flag when you open a file, and when you save it, check
for the flag. If the flag is set, make your backup and unset it.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: