Re: automatically recover from swap file
- On Tuesday 04 July 2006 22:44, John Orr wrote:
> On Wednesday 05 July 2006 12:32, you wrote:Your script is a life saver! Thank you very much for posting it.
> > Let's say I have a .filename.swp as the swap file. Is it possible to
> > automatically recover and store the recovered file as filename.recovered?
> > I would like to do this non-interactively and for multiple files. Any
> > ideas?
> A great question I think - maybe vim has a way to handle these files
> simply, but I don't know of it.
> If it helps, below is the perl script I use to find .*.sw* files, open them
> with -r, save them with a "new_" prefix, compare the new to the original
> file they came from, and delete the new if they are the same. If not the
> same, open them both with gvimdiff (hence the "new_" prefix rather than
> extension - so syntax highlighting still works).
This email account uses challenge-response system.
Contact me only if you are comfortable with it.