Disable autosave (or mark files/folders as read only?)

I was searching for a way to disable autosave, I read this is a common request and I think is not possible to disable it.   
But then maybe you can help me with this common scenary:   

You open files from an external library or your framework. Just for reading it, or putting some breakpoints, etc.
Probably you don't want to change anything in those files, but what happen if you make some unnoticed mistake? maybe you select something and delete it without noting, or type something, I don't know...
With autosave you will get those changes without even noting it.    

How can we prevent that?

8 comments
Comment actions Permalink

It's not possible to automatically mark files as read-only, unless someone will write such plugin. Here is already existing request for such functionality: http://youtrack.jetbrains.com/issue/WI-8889

The only way right now is to manually mark such file as read-only (File | Make File Read Only). Possible problem here: it's done on file-system level (on Windows: by using Read Only attribute). Therefore you may have issue when deploying such files (it really depends on circumstances -- at least I had such issues).

0
Comment actions Permalink

why the team decided to use this autosaving system?
maybe it has some advantages, but is a very counterintuitive solution. Therefore I don't understand why there isn't an option for disabling it.
I never saw it in any other program, not only IDEs. And most of those programs have a backup system, but you have absolute control about the saving of your files.    

0
Comment actions Permalink

No idea. But as ordinary user I have no issues with auto save. It was unusual and a bit awkward on beginning, but after using it for few weeks I think it's very natural to have it as it's now (although I think think that asking for saving modified (and currently opened in IDE) files on project close/exit is a good feature to have).

I'm not opening files from libraries that much, and when I do, I usually marking them read only if I plan to work with them (like, copying some code from there to see how it works etc). Other than that -- I'm relying on myself -- hoping that tab colours will help me to not to do mistake (files from outside of project have yellow tab colour). Having that ticket implemented will be very usefull.

0
Comment actions Permalink

Well, I don't see any advantage for the moment, maybe you can tell me what are the advantages of having autosave.   
On the other side, I can think in some CONS:    
1) You can edit files without noting it (we are not machines, this just happens)
2) What happens if you are using an autoreload plugin like live.js, XRefresh, etc? the page will be reload on every new char.
3) Confusion, I never know if my file was saved or not, I tend to trust in PHPStorm and I think it saves at every new char but I don't know, also, why there's a "save" button then?
Now, maybe you think these are not big CONS, but the question is, if there are CONS and no PROS... then... why to use it?   

Can you make a list of PROS?

0
Comment actions Permalink

I'm confused with your 2) and 3).

2) IDE will auto save file on certain events, some of them you can control on Settings | General. And definitey not after you type single character or straight after you perform some operation.
3) Settings | Editor | Editor Tabs | Mark modified tabs with asterisk

0
Comment actions Permalink

ahhhh, well, I think I need to understand what "autosave" means in PHPStorm then :)     
Now I'm a bit confused.
I like the asterisk, but I think it doesn't have the standard meaning. I changed a file (the asterisk appears, this is OK), then close the file (without saving it), then open it again, and the changes were there ! (why if I didn't save it?) also, the tab has the asterisk again... if I save explicitely the file, then the asterisk disappears, I don't understand the asterisk...
I can't understand when PHPStorm saves the file :(

0
Comment actions Permalink

A file saves when the IDE loses focus and when a file is closed. Maybe other times too, but those are the times that stick in my head, I've come to appreciate the auto save. Seems I want a file (or group of files) saved more often than not by far. It took a little getting used to but now, when I use another IDE, I miss it. I completley understand the opposite side of the debate though. An option to use the autosave or not seems on the surface like a sensible thing to me.

0
Comment actions Permalink

JetBrains tried to make our lives easier with the autosave feature, but some times it just doesn't work, and they should simply implement an easy option to turn it off.

In the meantime, there's a way to turn WebStorm autosave off for long enough - about 74 days.

0

Please sign in to leave a comment.