Disabling autosave

I develop with meteor, which is an awesome web framework that supports live hot code pushes - that is, when a file in the project is updated, the meteor server updates the client, live - you don't even have to tell your users to refresh the page. This is awesome for rapid prototyping.

The problem is that with Webstorm's auto-saving, meteor would push changes way too often, frequently causing compile errors on the server side Node.JS, and sometimes breaking the server. I had to find a way to disable autosave. Here's how to do it.

1. In Settings -> IDE Settings -> General,

  • uncheck "Synchronize files on frame activation"
  • uncheck "Save files on frame deactivation"
  • if you can, uncheck "Save files if application is idle for". If it's greyed out, set it to 6442450 seconds (about 74 days). This is the maximum number of seconds that the autosave function can be disabled for, and I have absolutely no idea whatsoever why JetBrains picked this weird number.

Autosave is retarded.png
2. In IDE Settings -> Editor -> Editor tabs, check "Mark modified tabs with asterisk".
Mark modified tabs.png
Hope this helps,
Dan

"In communist Russia, the IDE saves the file for you"

15 comments

You could just untick "Save files automatically" instead of entering such big number -- will have the same effect.

In any case --- the autosave you were referring to in other posts is a bit different thing -- it is about automatically saving the file when it is gets closed (when you close the tab or exit the app completely .. or when making changes to the app settings) and not about autosave on time interval or some basic event.

1

Strange, the checkbox looked disabled here (grayed out) for some reason, but unchecking it actually worked.

Good to be able to disable that option.

As for saving on exit, the Principle Of Least Surprise suggsts the IDE should ask whether to save the file or not.

0

The autosave feature of Jetbrains' IDE's are among my favorite features about them. The autosave feature is unobtrusive and intuitive I simply don't have to worry about it. In the 9 years I have been using IntelliJ I have never had it save a file when I wish it hadn't. Why wouldn't you want changes to be saved?

0

... maybe because quite a lot of people have some habits influenced by no-auto-save-available software (in this particular case), e.g.

  • editing wrong files (by mistake or on purpose) -- instead of creating new file which is similar to already existing one (via copy .. or new file and then copy-paste) they just editing existing file with idea of using "Save As" later or just cancel/undo all changes on close.
  • quickly testing/checking something in real/working code (instead of using separate file)
  • etc


You have to keep in mind that when almost all software will give you an option/warning you in such cases, such different approach (auto save) is definitely goes against already established routine (not every person is quick to adopt to the changes, whatever it may be (good or bad changes, forced or voluntarily etc) -- some people will fight to the end because in their mind the original approach is the only correct one) -- you can see it everywhere in real life not just in software only.

Habits is such a thing that requires some time in order to be changed, to get used to the new workflow/functionality/routine. I also was making such mistakes when I just started using PhpStorm .. but after few weeks -- no regrets -- it feels very natural now (I extremely rarely need to undo something after save (maybe once in a month or two), and Local History is the right tool in my situation).

0

My dislike of autosave for meteor work has nothing to do with habits.

It simply breaks code. Please see my original post in this thread.

2

It appears that IDEA v12 (Ultimate, at least) has introduced a regression in this support.

I had autosave disabled in v11 and it was working the way we want but, ever since I started using v12 (I'm actually on v12.1 at the moment), IDEA appears to totally disregard the settings.  After just a few seconds, IDEA saves the file!
idea_save_settings.gif
IDEA behaves identically whether I have "Save files automatically" checked or not.

Is anyone else seeing this regression in v12?

Thanks,
Seth

1

Hi Seth,

1) What kind of files are getting auto saved? All of them .. or specific (currently edited) files only?

2) What plugins do you have installed? I mean -- do you use Live Edit and/or File Watchers plugins?

0

Hi Andriy.  Thanks for replying.

1) Every file that I edit and change in IDEA is getting autosaved.  .sql files, .java files, ... all types.

2) I don't have either of those plugins installed; in fact, every plugin that I have installed is listed as "Bundled."

0

Well .. I'm not IDEA user ( PhpStorm only ), so I do not know what plugins are actually bundled. But those 2 are official JetBrains plugins (File Watcher is bundled with PhpStorm/WebStorm while Live Edit only with WebStorm)

My suggestion is (if you do not mind checking this out, actually):

  1. Backup and delete (or just rename) all IDEA config/cache folders: http://devnet.jetbrains.com/docs/DOC-181
  2. Launch IDE -- it will recreate all defaults
  3. Do the basic (very minimal) configuration and try to work on your files -- see if it will behave the same or will it be any different.
  4. You can always restore your current settings from backups


Other than that -- no other real ideas from me right now.

0

Here's what I did:

  1. Renamed my C:\Users\seilbott\.IntelliJIdea12\system\caches directory
  2. Started IDEA
  3. Checked the configuration and saw that the settings that I showed above were still in effect.
  4. Played around with the settings, especially the "Save files automatically" values and checked state, to no avail.


I really appreciate the suggestion; however, it unfortunately does not seem to have made a difference.

(Now... I actually only just noticed from your reply that I was posting in the "PhpStorm / WebStorm" area of this community.  I guess I should I look in the "IntelliJ IDEA" area, instead? )

0

You should have renamed this folder C:\Users\seilbott\.IntelliJIdea12  instead. Right now you just got rid of caches only but the actual settings were left as is.

Now... I actually only just noticed from your reply that I was posting in the "PhpStorm / WebStorm" area of this community.  I guess I should I look in the "IntelliJ IDEA" area, instead? )

May help :D. But since they all share the same codebase, I would expect similar behaviour as well.

0

Bazzik wrote:

You should have renamed this folder C:\Users\seilbott\.IntelliJIdea12  instead. Right now you just got rid of caches only but the actual settings were left as is.

Now... I actually only just noticed from your reply that I was posting in the "PhpStorm / WebStorm" area of this community.  I guess I should I look in the "IntelliJ IDEA" area, instead? )

May help :D. But since they all share the same codebase, I would expect similar behaviour as well.


Ohhh....  ?:|  I definitely misinterpreted the scope of what you meant.  I did what you really said and renamed the .InelliJIdea12 folder, went through the setup and all and... still no joy.  IDEA was misbehaving just as before.

BUT, one of my coworkers sent me this:

One of the new features of version 12 is an auto-build compiler somewhat like eclipse has.

I wonder if the "Make project automatically" also forces the file saves, so I turned that off. My quick test didn't get an autosave.

I just turned this off as well... and now IDEA is behaving again!

idea_compiler_settings.gif

0

Mystery solved. Case closed. Lesson learned (IDEA is not PhpStorm and may behavse differently as it has other/more/different features).

0

JetBrains does this wrong.

  • IntelliJ saves every edit directly on to the actual file itself. This is quite terrible if:
  • I'm not using a VCS. Just blank a file in the editor and close it. You can say goodbye to whatever was there.
  • Or I have a tool that is set up with a trigger to compile code upon saving changes. The tool would work extra hard unnecessarily and bother me with compile errors while I'm trying to code the next big thing.

Atom does this right.

  • Files are never saved automatically. Instead, all changes are saved in Atom Editor's internal buffer.
  • The entire workspace can be closed and opened any time with all the modifications saved in internal buffer kept and restored. Atom doesn't ask "Would you like to save changes?" when exiting - it just dumps it in the buffer and gets out of your way.
  • You are in full control of saving the changes into the actual file.
0

Use Local History which is active even if you aren't using version control. 

0

Please sign in to leave a comment.