How-to disable auto-save for .scss or .ts Follow
It seems that some file types always auto-save (while typing) regardless of the global auto-save settings (General -> Synchronization).
This sometimes leads to troubles with related (external - not controlled by idea) background tasks that watch these files.
For instance, I run Compass from the command line in watch mode. This is what happens
- Start editing/typing in a .scss file
- Auto-save triggered while typing
- External compass process picks up file change, fails because source file syntax is in a (temporary) invalid state
- More typing (maybe 1sec)
- I switch to the browser
- Save on deactivation kicks in
- Compass misses to react to the last save
- In the browser I reload the stylesheet which is in an invalid state
- I have to switch back to idea, simulate a change, to trigger recompilation
Also, if the triggered task takes longer to complete because it not only works on the one changed file, but recompiles a target file based on multiple source files, these auto-saves are delaying my work.
I checked, and in other file types the auto-save only occurs according to the settings (frame deactivation, after idle of x seconds, etc)
LIVE EDIT is disabled.
Is this expected behavior. Can I somehow configure/disable the auto-save for these file types?
Please sign in to leave a comment.
Do you use File Watchers? (PhpStrom/WebStorm -> Preferences -> File Watchers).
Hi, thx for the hint.
For Typescript I use a File Watcher, and the behavior actually changes when I disable the File Watcher. (Meaning it will *not* auto-save anymore while typing).
I also noticed that the auto-saving (when FileWatcher is enabled) is being smart about when to save. It would still be usefull to be able to turn it off as I don't use per-file compilation for this project. Therefore, as the project grows, the compilation will take longer and longer - maybe there could be an option in the background task config?
This is on the latest Webstorm EAP.
For Compass, I launch it in watch mode via 'Command Line Tools' (a plugin). However, I went back to the project where I used to have problems and did some tests and it seems that the auto-save problems there are gone. It simply doesn't auto-save anymore and I like it.
This is on WebStorm 5.0.4
When you use File Watcher for some file type(in your case it is *.ts). File Watcher forced saves these files on editing and executes command(tsc fileName.ts). I think Compass tracks modifications of corresponding *.js files.
You can try to create a custom file watcher for Compass(see my example). And please creat an issue about extended settings for file watchers.
Update: In WebStorm 6 it is now possible to turn that 'feature' off (uncheck "Immediate file synchronization" in the file watcher). See http://devnet.jetbrains.com/thread/443209?tstart=0
And it seems as if there is also a bug related to Live Edit: http://youtrack.jetbrains.com/issue/WEB-7030