Topic: Reactivation of .BAK files (a sort of UNDO) (1 of 3), Read 32 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Friday, June 15, 2001 04:53 AM

The normal UNDO is great, but sometimes I would like to have a UNDO on the basis of .BAK files.

So I wrote REBAK.VDM.

It reactivates the .BAK file (if existing) of the currently open file.

Example:
There is a FILE1.TXT opened in the current buffer. Invoking REBAK checks if there is a FILE1.BAK.
If yes it closes FILE1.TXT, deletes it from harddisk, renames FILE1.BAK to FILE1.TXT and reopens FILE1.TXT.


Christian

 
REBAK.VDM (1KB)

 


Topic: Reactivation of .BAK files (a sort of UNDO) (2 of 3), Read 32 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Tuesday, June 26, 2001 11:55 AM

Wouldn't it be better to swap the .TXT and .BAK files (i.e. .TXT would become .BAK and wise versa)? This way, you could undo the operation by calling the macro again.
However, for unlimited backups, may I recommend using RCS, the freeware revision control system.
By using my RCS event macros, the check-in and check-out operations are performed automatically.
You can download the macros from my Vedit homepage here.
-- Pauli

 


Topic: Re: Reactivation of .BAK files (a sort of UNDO) (3 of 3), Read 34 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, June 26, 2001 03:46 PM

And here is the new version which is swapping the two files.

Christian

 
REBAK(1).VDM (1KB)