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.
2. In IDE Settings -> Editor -> Editor tabs, check "Mark modified tabs with asterisk".
Hope this helps,
Dan
"In communist Russia, the IDE saves the file for you"
请先登录再写评论。
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.
This post helped me a lot.
I don't get why some people think that "auto save" is great. If it's that great why don't Visual Studio or Sublime Text follow suit?
Auto saving is nuisance than being helpful. Having worked on PC for decades, my fingers can press Ctrl+S swiftly whenever I want to save. I don't need software doing it for me. Auto saving backfires when I messed up to much and I simply want to reopen the file.
"Auto save" is great when executed correctly.
Auto save can be very helpful when done correctly. It's just that the way Jetbrains decided to implement it made it a complete nuisance. It's Jetbrains that needs to follow suit of how other software is doing it right. Clearly there are many ways to skin a cat, and Jetbrains chose the way that make the cat scream the loudest.
You may be one of those peeps who press Ctrl+S ten times every few seconds for no real reason other than to make extra double triple sure the file is saved. Not everyone works like that, a correctly implemented auto-save feature is a boon to those who don't.
Making assumptions of someone you have never met, eh?
For clarification :
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.
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 behaves identically whether I have "Save files automatically" checked or not.
Is anyone else seeing this regression in v12?
Thanks,
Seth
JetBrains does this wrong.
Atom does this right.
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.
... maybe because quite a lot of people have some habits influenced by no-auto-save-available software (in this particular case), e.g.
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).
IntelliJ is like Nvidia. I would instantly buy a nvidia card if they would support Freesync. I would buy and use IntelliJ if this stupid auto save feature could be disabled completely.
It makes absolutley no sense to force people to use this.
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?
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."
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):
Other than that -- no other real ideas from me right now.
Here's what I did:
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? )
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.
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!
Mystery solved. Case closed. Lesson learned (IDEA is not PhpStorm and may behavse differently as it has other/more/different features).
Use Local History which is active even if you aren't using version control.
Well it's fun, isn't it?
Thanks for the clarifications.
The issue hasn't been posted in this thread yet, so: https://youtrack.jetbrains.com/issue/IDEABKL-6460
FWIW, I (and the rest of the team) spent about 40% of my work time on Meteor in PhpStorm (current version) and this has never been a problem: apparently actual disk writes only happen if one presses ^S (or ⌘S when I'm on macOS), or some time interval elapses.
Admittedly it takes some time to unlearn pressing ^S after each typed word, but it's actually convenient, and this never broke a build for us.
I just reset the editor (RubyMine) to defaults because I thought introduced this behavior. I agree, it is pretty unbelievable to not allow autosaving to be turned off. I guess I found something I don't like about RubyMine.
Absolutely stupid idea to change master file on disk by saving it with every key stroke without asking for permission.
Hrvoje Lončar: what are you talking about? IntelliJ doesn't do that. Here are the autosave settings as of WebStorm 2024.2.1:
Autosave is useful in many cases, but has unwanted consequences in others - namely when external processes watch files for changes and take actions you're not ready for them to take, such as recompiling when there are syntax errors still, or restarting servers when you haven't finished looking at the log output yet.
JetBrains has made this feature optional. Case closed.
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?