Skip to content
Prev 245972 / 398502 Next

Windows editor suggestions - autosave

On Wed, Dec 29, 2010 at 11:32 AM, Michael Conklin
<michael.conklin at markettools.com> wrote:
I would imagine that most of the popular editors support something
along those lines.

I use vim and the way it does this is slightly different than what you
describe but IMHO better.   The problem with auto save is that if you
make some mistakes and then discover them you have already saved the
mistakes.  The way vim works is that rather than auto save the file it
auto saves **changes** to a swap file.  You can easily get back to the
last manual save by just quitting without saving and starting vim
again or you can recover to the last auto-saved point after a crash by
using the recovery flag: vim -r myfile.txt

vim also has the :DiffOrig command which will show you what has
changed since the last manual save.

Its also possible to implement a vim script that does true auto save
and you can find such scripts on the net so you don't have to write it
yourself but I suspect the people who wrote them did not really
understand that vim already has a superior approach to this.  The
functionality of vim is so vast, including not only vim itself but
also 3000+ use contributed scripts, that its quite easy to overlook a
feature.