[R] Windows editor suggestions - autosave

Gabor Grothendieck ggrothendieck at gmail.com
Wed Dec 29 17:57:25 CET 2010

On Wed, Dec 29, 2010 at 11:32 AM, Michael Conklin
<michael.conklin at markettools.com> wrote:
> I am looking for advice on an editor to use with R (windows) that has an autosave feature.  I typically write scripts using the RGui (and tried TinnR yesterday) but I am having continuing problems with BSODs (non R related) and have in the past have had issues with R crashes and would really like a system that does not require me to remember to hit the save button on my script every 10 minutes so that I can avoid redoing everything.

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

Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

More information about the R-help mailing list