Webstorm 9: Can I disable autosave?

New WS user.  When I type things into a file WS seems to automatically save the changes to disk.  At present I think that this isn't desirable (recover from very bad edit) and would like to disable it.  I can't see where in the settings this can be changed.

When I want to undo changes the Ctrl-Z works. What about redoing, which cancels a Ctrl-Z action?  Many other editors map this to Ctrl-Y.  What about WS?

Thanks,
Jerome.

4 comments
Comment actions Permalink

Hi there,

New WS user.  When I type things into a file WS seems to automatically save the changes to disk.  At present I think that this isn't desirable (recover from very bad edit) and would like to disable it.  I can't see where in the settings this can be changed.

You cannot completely disable auto saving, but you can minimize it a lot.

When you switching to another / from another app -- "Settings | Appearance & Behavior | System Settings" -- it has few options under "Synchronization" in this regard.

If you are using LiveEdit plugin it will be saving your changes to have LiveEdit do what it supposed to do -- dynamically refresh files in browser with your latest changes. For this just stop debugging/LiveEdit session (or configure LiveEdit to only reload on manual request).

If you are using File Watchers (Settings | Tools | File Watchers) -- you have possibly enabled "Immediate file synchronisation" option in them which will save file after approx 1 sec delay. More: http://confluence.jetbrains.com/display/PhpStorm/File+Watchers+in+PhpStorm

The following kind of auto save cannot be disabled:

  • Autosave happens when you using any of the Run/Debug configuration, switching and using built-in terminal, executing external tasks etc
  • Autosave also happens when you saving changes in Settings screen
  • Autosave on IDE exit

When I want to undo changes the Ctrl-Z works. What about redoing, which cancels a Ctrl-Z action?  Many other editors map this to Ctrl-Y.  What about WS?

Edit | Redo ?? (Ctrl+Shift+Z using Default keymap).

You can choose another or eit current keymap at "Settings | Appearance & Behavior | Keymap"

You can also use "Local History" (simple local VCS) to execute different kind of Undo -- http://confluence.jetbrains.com/display/PhpStorm/Local+History+in+PhpStorm

1
Comment actions Permalink

I will look at the "local version control" feature.  However, I don't think I've satisfaction with the UI yet.

In my daily work I use maybe four or five different editors that don't auto-save per keystroke.  My fingers are used to Ctrl-S, and frequently.  More to the point, suppose in any of these editing sessions I delete the center of the file.  Or perhaps, as occured with WS today, I click Ctrl-Y to redo and it instead deletes lines.  At this point I want to abandon all changes to the file and start over.  I close the editing tab and open the file again for editing. Surprise! The unwanted changes are still in the file.

If WS has a system that always forces every keystroke to disk, then it had *better* have a transparent, easy-to-use version control system. I haven't thought of looking for something like that.  Where would I get documentation about this?

Jerome.

0
Comment actions Permalink
If WS has a system that always forces every keystroke to disk

Once again (in case if you misread or misunderstood my original comment or if I was not clear enough): IDE does not save a file after every keystroke.

It may ONLY do that (auto save after each keystroke) if you have File Watcher that watches this file which has "Immediate file synchronisation" option enabled (solution: disable that option) or you are in LiveEdit session (which is logical). In ALL other cases (known to me, at least) it does not save after every keystroke.

I'm using couple of file watchers for my daily work (compiling LESS and minifying JS) with "Immediate file synchronisation" option disabled and have no such issues at all.


I suggest to disable those 2 plugins to start with, restart IDE and see if it will behave differently.

If still nothing -- disable all possible plugins and enable 1-2 at a time. Thing is: I do not see tons tickets/forum threads (actually: any) where users complain about such frequent autosave .. which suggests me that it could be your settings.

If still nothing (even with ALL plugins disabled) then I do not know what it may be and you will have to provide more details to the devs on Issue Tracker.

More to the point, suppose in any of these editing sessions I delete the center of the file.  Or perhaps, as occured with WS today, I click Ctrl-Y to redo and it instead deletes lines.  At this point I want to abandon all changes to the file and start over.  I close the editing tab and open the file again for editing. Surprise! The unwanted changes are still in the file.

That's where Local History will be usefull -- you can quickly restore a file (or bunch of files/whole folder) to one of the previously saved states -- it allows you to quickly undo whole Replace in path made across whole project .. or even recover just deleted file.

P.S.
"Settings | Editor | General | Editor Tabs  --> Mark modified tabs with asterisk" -- enable this option (AFAIK it's disabled by default) to see if file is currently saved or not.

In my daily work I use maybe four or five different editors that don't auto-save per keystroke.  My fingers are used to Ctrl-S, and frequently.

Me too. I have pretty quickly addopted to this auto save in PhpStorm -- no regrets at all. But I have no real idea how I will work if some other tools I use would have it (ancient Delphi 7, MS SQL Server management tool, some MySQL management tools). But in PhpStorm autosave woks great -- no complains. Yes, it takes a bit of time to get used to it, to have your habbits altered... (P.S. I'm referring to "normal" autosave).

0
Comment actions Permalink

You are correct that I am not seeing autosave in WS.  I started editing a file, which I then monitored in a console window.  I did all sorts of navigation within WS and no autosave.  I *did* get the changes to save by clicking on Run, but I'd expect that.

I will review the rest of your comments at leisure, to learn how to use WS.

Thanks for your replies.
Jerome.

0

Please sign in to leave a comment.