IntelliJ IDEA 11.1 Web Help

11.0+

IntelliJ IDEA provides CoffeeScript support. IntelliJ IDEA recognizes *.coffee files, and allows to edit them.

In this section:

Prerequisites

Note

Before you start working with CoffeeScript, make sure that CoffeeScript plugin is enabled.

The plugin is bundled with IntelliJ IDEA and activated by default. If it is not, enable the plugin.

CoffeeScript support

CoffeeScript files are marked with icon_CoffeeScript icon.

CoffeeScript support includes:

  1. Coding assistance:
  2. Code generation
    • Generating code stubs based on file templates during file creation.
    • Possibility to create line and block comments (Ctrl+Slash Command Slash or Ctrl+Divide Command Divide/Ctrl+Shift+Slash Control Shift Slash or Ctrl+Shift+Divide Control Shift Divide ).
  3. Numerous ways to navigate through the source code, among them:
    • Navigating with Structure View.
    • Navigate | Declaration (Ctrl+BCommand B).
    • Navigate | Implementation (Ctrl+Alt+BCommand Alt B) from overridden method / subclassed class.
  4. Advanced facilities to search through the source code.
  5. Running and testing.

    Note

    For compiling CoffeeScript to JavaScript, you need some JavaScript engine to be installed. The easiest way is to use Node.js, which should be downloaded and installed on your machine.

    There are two ways of using Node.js:

    • Use NodeJS repository plugin. It should be installed and enabled.
    • Define Node.js as an external tool, as described in the section Configuring third-party tools. This approach is helpful, when you need facilities that are missing in the plugin, for example, the possibility to pass certain parameters as wildcards.

    Executing CoffeeScript files involves:

    • Possibility to preview results of CoffeeScript files compilation to JavaScript.
    • Possibility to launch CoffeeScript files from the context menu.
    • Run/debug configuration for NodeJS includes the possibility to use CoffeeScript plugin.

See Also

Language and Framework-Specific Guidelines:

External Links:

Web Resources: