How-to disable auto-save for .scss or .ts

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

  1. Start editing/typing in a .scss file
  2. Auto-save triggered while typing
  3. External compass process picks up file change, fails because source file syntax is in a (temporary) invalid state
  4. More typing (maybe 1sec)
  5. I switch to the browser
  6. Save on deactivation kicks in
  7. Compass misses to react to the last save
  8. In the browser I reload the stylesheet which is in an invalid state
  9. 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?

4 comments
Comment actions Permalink

Do you use File Watchers? (PhpStrom/WebStorm -> Preferences -> File Watchers).

2
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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

0

Please sign in to leave a comment.