1 Replies Last post: Dec 27, 2013 1:12 AM by Andriy Bazanov  
seba kerckhof Newbie 1 posts since
Dec 26, 2013
Currently Being Moderated

Dec 26, 2013 8:23 PM

Force file watcher execution

Hello,

 

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.

Andriy Bazanov Master 4,179 posts since
May 28, 2010
Currently Being Moderated
Dec 27, 2013 1:12 AM in response to: seba kerckhof
Re: Force file watcher execution

Hi there,

 

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:

  • Select required files/folders in Project View
  • Ctrl+Shift+A twice in a row (or "Help | Find Action..." and then activate check box on that screen)
  • Search for "run file wa" (without quotes obviously) and choose "Run File Watcher" entry

 

Alternatively:

  • "Settings | Keymaps"
  • Find "Run File Watcher" action under "Plugins | File Watcher"
  • Assign any keyboard shortcut you want
  • Use it after selecting desired file(s)/folder(s) in Project View

More Like This

  • Retrieving data ...