WebStorm 9.0.0 Web Help

Handlebars/Mustache

File | Settings | Handlebars/MustacheCtrl+Alt+S 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/.

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+L).
  • 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+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

Last modified: 15 October 2014
comments powered by Disqus