Authors:
dmarcotte
logos
opensource software

Handlebars/Mustache

Products: IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, Android Studio

Vendor: dmarcotte

Email: N/A

Website: https://github.com/dmarcotte/idea-handlebars

SourceCode: https://github.com/dmarcotte/idea-handlebars

License: license url

Bugtracker page

Description:

Handlebars and Mustache template support

Issues, feature requests and contributions welcome: https://github.com/dmarcotte/idea-handlebars
Downloads: 37809
Rating:
Participated in rating: 1
Version Since Build Until Build File/URL Size (Kb) Date Details
0.7_Leda. 128.18. . Download 168.97 2013-04-07 22:42:11 details
0.7. 110. 128.18. Download 168.33 2013-04-07 22:31:01 details
0.1.1 (backport). 107. 108. Download 36.17 2012-05-10 03:40:02 details
. .
11 updates are hidden show all updates
Screenshot #14079
Screenshot #14150
Screenshot #14080

Recent change notes:

Version 0.7
Version 0.6
  • Updates color scheme for Darcula and other new custom editor themes
    • Also updates file icon to optimize for both the traditional and Darcula UI themes
  • Updates the plugin with the latest features/syntax in Handlebars
    • {{@data}} syntax is no longer marked as an error (and the highlighting of these data vars is configurable)
    • Handlebars block comments are now supported:
      {{!-- block comment which can contain {{mustaches}} --}}
    • Escaped mustaches are now properly highlighted, so \{{escaped}} constructs do not render as regular mustaches
    • Single quotes in mustache strings are no longer marked as errors. i.e. {{foo bar='baz'}} behaves as expected
    • Partials names can now be paths: {{>path/to/partial}}
    • Negative number literals no longer marked as errors: {{foo bar=-2}}
  • Adds the ability to have the "Comment with Line Comment" and "Comment with Block Comment" actions insert the new Handlebars block comment
    • To enable, select "Handlebars" for "Language for comments" in Settings->Handlebars/Mustache
    • NOTE: this is Handlebars specific (not generic Mustache syntax) and should only be used with recent versions of Handlebars
  • Enables comment folding for multi-line comments (works with both standard and block comments)
Version 0.5.1
Version 0.5
  • Makes Handlebars/Mustache a full-fledged template language, supporting templating of any language (default is still HTML)
    • "Settings->File Types" now allows configuration of which language is being templated by choosing a "Registered Pattern", clicking edit, and choosing a language from the dropdown
    • "Settings->Template Data Language" settings will now be respected, allowing configuration of template data languages by project and folder
    • "Settings->Handlebars/Mustache" can now configure which language's comment syntax is used by the "Comment with Line Comment" and "Comment by Block Comment" actions. Note that the inability to dynamically choose a commenter is a known issue.
  • Adds code folding for mustache blocks
    • The folding behavior is modelled after the native HTML/XML code folding
    • Blocks can be set to collapse by default in "Settings->Editor->Code Folding"
Version 0.4
Version 0.3
  • Adds auto-insert of closing tags.
    • This behavior can be toggled in the Settings->Handlebars/Mustache page.
    • More info on the project site
  • Improves charset defaulting for files associated with this plugin.
Version 0.2
  • Adds syntax error highlighting
Version 0.1.1
  • Adds .mustache and .hbs as default files extensions handled by this plugin
  • Fixes a lexer issue where non-Handlebars "{" characters were being parsed incorrectly
Version 0.1

The key feature of this early version of the plugin is that it allows most of the power of the built-in IDEA HTML editing utilities to be used with Handlebars syntax inserted in the markup. Future versions will build out more Handlebars-specific utilites.
  • Features
    • Configurable syntax highlighting
    • Mustache pair highlighting
    • Full HTML highlighting, code completion, inspections, formatting and commenting
    • Since Handlebars is a super-set of Mustache syntax, this plugin should greatly improve IDEA's editing experience for Mustache templates too
  • Not yet implemented
    • Find usages, Go-to declaration, etc. for references
    • Support for Handlebars templates embedded in script tags in html files (more info)

Comments:

dmarcotte
Rated: noRate
2013-01-09 06:11:02
If anyone has a problem similar to eysikal's, check out our solution here: https://github.com/dmarcotte/idea-handlebars/issues/36
.
eysikal
Rated:
2013-01-08 23:26:37
Hi dmarcotte, Thanks for your plugin. I have used it in the past and it's been great, but can't seem to get it running this time on a fresh install of Mac OSX Lion and PHPStorm. I have the plugin installed but still I get no syntax highlighting or recognition of .mustache files in PHPStorm. I installed the handlebars/mustache plugin from within PHPStorm using Preferences -> IDE Settings -> Plugins -> Browse Repositories. I am running: PHPStorm version v.5.0.4 Handlebars/Mustache v.0.4
.
dmarcotte
Rated: noRate
2012-12-01 20:51:37
Hey flancer, The plugin is definitely compatible with PhpStorm 4 and 5, except for the "0.3 (Leda)" version, which is only compatible with Intellij IDEA 12. Did you by any chance grab that version from this page? The best way to install the plugin (and get automatic updates) is install it within PhpStorm rather than download versions here. Go to "Settings->Plugins" and choose "Browse repositories..." and install the plugin from there. Let me know if that doesn't fix you up. I want to get you up and running!
.
flancer
Rated: noRate
2012-12-01 14:18:01
Hello, does this plugin computible with PhpStorm? I have unsuccessfully tried to install it on PhpStorm 5.0.4 & PhpStorm 4.0.3 :( This plugin is red (disabled) after installation.
.