eclipse 车把js编辑器。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13368386/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Handlebars js editor.
提问by Sergey Kucher
Lately I have started to explore Ember.js, from their site I understood that there is a good synergy between Ember and Handlebars language.
最近我开始探索 Ember.js,从他们的网站我了解到 Ember 和 Handlebars 语言之间有很好的协同作用。
I wondered if there is any editor (plugin) that can help me with handlebars auto-completion and coloring.
我想知道是否有任何编辑器(插件)可以帮助我进行车把自动完成和着色。
采纳答案by Marc
If you use Sublime Text 2, there is a great Handlebars package for syntax highlighting, etc.
如果您使用 Sublime Text 2,则有一个很棒的 Handlebars 包用于语法高亮等。
https://github.com/nrw/sublime-text-handlebars
https://github.com/nrw/sublime-text-handlebars
TextMate version:
文本伴侣版本:
https://github.com/drnic/Handlebars.tmbundle
https://github.com/drnic/Handlebars.tmbundle
It can be installed manually or with the Sublime Text 2 package manager.
它可以手动安装或使用 Sublime Text 2 包管理器安装。
回答by Ignacio Vazquez
If you are using handlebars as .hbs files (no script tag) you can enable syntax highlight by configuring 2 settings: the editor and content types:
如果您使用把手作为 .hbs 文件(无脚本标签),您可以通过配置 2 个设置来启用语法高亮:编辑器和内容类型:
- Eclipse -> Preferences -> General -> Content_Types
- add *.hbs under html
- Eclipse -> Preferences -> General -> Editor -> File Associations
- Add *.hbs to html editor.
- Close the editor and re-open it
- [optional] If still not highlight (old eclipse versions) restart eclipse.
- Eclipse -> 首选项 -> 常规 -> Content_Types
- 在html下添加*.hbs
- Eclipse -> 首选项 -> 常规 -> 编辑器 -> 文件关联
- 将 *.hbs 添加到 html 编辑器。
- 关闭编辑器并重新打开它
- [可选] 如果仍然没有突出显示(旧 eclipse 版本)重新启动 eclipse。
This works for aptana and zend studio as well
这也适用于 aptana 和 Zend Studio
回答by Mark Horgan
IntelliJ IDEA (an alternative to Eclipse) has a handlebars plug-in. For Emblem, a Haml-like version of Handlebars, the nearest plug-in would be Slim.
IntelliJ IDEA(Eclipse 的替代品)有一个把手插件。对于 Emblem,一个类似 Haml 的 Handlebars 版本,最接近的插件是 Slim。