WebStorm 8.0.0 Web Help

File | Settings | IDE Settings | Handlebars/Mustache

settings

On this page, configure processing of Handlebars expressions and Mustache templates in WebStorm. The settings specified on this page apply to dedicated Handlebars and Mustache files that have the extension .hbs or .mustache respectively.

For more details about Handlebars expressions and Mustache templates see http://handlebarsjs.com/.

Note

The page is only available when the Handlebars/Mustache plugin is enabled. The plugin is bundled with WebStorm and activated by default. If not, enable the plugin.

Item Description
Automatically insert closing tag
  • When this check box is selected, WebStorm automatically inserts the second closing curly brace (}) of a Handlebars expression as soon as you type the first closing one.

    WebStorm also recognizes triple stashes ({{{) that prevent escaping values inside expressions. In this case, WebStorm automatically inserts two closing curly braces as soon as you type the first closing one.

  • When this check box is cleared, you have to type the closing curly braces and triple stashes manually.
Enable formatting
  • Select this check box to have Handlebars expressions and Mustache templates automatically reformatted during code generation, refactoring, or reformatting (Ctrl+Alt+LCtrl+Alt+LShift+Alt+LCtrl+Alt+LCtrl+Alt+LAlt+F8 or Ctrl+Alt+FShift+Alt+FCtrl+Alt+L or Ctrl+Shift+FAlt Command LAlt Command LShift Command F).
  • Clear the check box to have the original formatting of Handlebars expressions and Mustache templates preserved.
Language for comments From this drop-down list, select the language to inherit the style for comments from. When you enter a line or block comment by pressing Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Alt+SemicolonCtrl+Slash, Ctrl+NumPad / or Ctrl+ColonCtrl+Slash, Ctrl+NumPad / or Ctrl+Shift+CCtrl+Slash or Ctrl+NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad / or Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash, Ctrl+Shift+NumPad / or Ctrl+Shift+ColonCtrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+SlashAlt Command Slash, Alt Command NumPad /, Control Shift Slash, Control Shift NumPad /, Shift Command Slash or Shift Command NumPad /Control Shift Slash, Control Shift NumPad /, Shift Command Slash or Shift Command NumPad /Control Shift Slash, WebStorm inserts the comment delimiters that are used in the chosen language, for example, {{!----}} for Handlebars, /**/ for JavaScript, <!----> for HTML, etc.

See Also

Procedures:

External Links:

Web Resources: