IntelliJ IDEA 2018.2 Help

File Watchers

File | Settings | Tools | File Watchers for Windows and Linux
IntelliJ IDEA | Preferences | Tools | File Watchers for macOS
Ctrl+Alt+S icons general settings svg


The page is available when the File Watchers plugin is enabled. The plugin is not bundled with IntelliJ IDEA, but it can be installed from the JetBrains plugin repository as described in Managing Plugins.

A File Watcher is a IntelliJ IDEA system that tracks changes to your files and runs a third-party standalone application. IntelliJ IDEA provides predefined File Watcher templates for a number of such standard popular third-party tools (compilers, compressors, prettifiers, and others). You can also configure a custom File Watcher to run any other third-party tool.

File watchers have two dedicated code inspections:

  • The File watcher available inspection is run in every file where a predefined File Watcher is applicable. If the project has no relevant File Watcher configured, IntelliJ IDEA suggests to add one.

  • The File watcher problems inspection is invoked by a running File Watcher and highlights errors specific to it.

The page consists of two parts:

  • A list of File Watchers available in the current project. To activate a File Watcher, select the check box next to it. If an error occurs while a File Watcher is running, the File Watcher is automatically disabled.

  • A toolbar to manage this list.

Item

Tooltip/
and shortcut

Description

icons general add svg

Add
Alt+Insert

Click this button to open the Choose template pop-up list and choose the relevant type of File Watcher. After that IntelliJ IDEA opens the New Watcher dialog box for customizing the predefined File Watcher according to the settings of the current project.

icons actions edit svg

Edit
Enter

Click this button to update the settings of the selected File Watcher in the Edit Watcher dialog box. The update is applied to the current project File Watcher only, it does not affect the predefined IntelliJ IDEA-level template.

icons general remove svg

Remove
Alt+Delete

Click this button to remove the selected File Watcher. The File Watcher is no longer applied to the files in the current project. Note that this action does not affect the corresponding predefined template which is still available at the IntelliJ IDEA level.

icons actions previousOccurence svg icons actions nextOccurence svg

Up(Ctrl+Alt+Up)
Down (Ctrl+Alt+Down)

Use these buttons to change the order of File Watcher in the list. This determines the order of launching File Watchers, if more than one are enabled.

icons actions copy svg

Copy

Use this button to create a copy of the selected file watcher.

icon importCopyrightProfile

Import

Click this button to import an existing file watcher and add it to the list of available file watchers.

icons toolbarDecorator export svg

Export

Click this button to export the selected watchers to watchers.xml file, located under the user's home.

Last modified: 20 November 2018

See Also