Force file watcher execution Follow
I'm using phpstorm 7 (trial) on windows 8.
I use file watchers for sass/scss to css compilation. However, the file watcher seems to kick in at times while I'm still typing a css rule and doesn't always detect a file change when I'm done typing. This often leaves me up with an error as css output (because it did the compilation when there was an incomplete css rule). Then I start adding or removing blank lines, hoping the file watcher will pick up a change, but most of the time it doesn't.
I don't know if this is a windows file system or phpstorm problem, but it is very very annoying. One solution would be an easily accessible button or context-menu item to manually (re)start the compilation.
Please sign in to leave a comment.
1) Uncheck "Immediate file synchronization" option in File Watcher settings -- this will make file watcher to be executed ONLY when file will be saved and not after you make any changes to the file.
2) "Settings | Menus and Toolbars" -- you can customize any context menu yourself. The action (when adding new entry to any menu) to manually re-run file watcher on a specific file can be found under "Plugins | File Watcher | Run File Watcher".
3) To manually re-run file watcher without modifying any context menu you need to:
I've found this when searching how to 'touch' (like the *nix command) a file in the project, and force a watcher to process it.
The definition got lost in a Phpstorm upgrade :(
I managed to find the old definition, in case it helps someone.
Add and ExternalTool:
Working directory: $ProjectFileDir$
Associate a key of your choosing under Settings > Keymap > External Tools (I used Windows T).