适用于 MacOS 的 CoffeeScript 编辑器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4246024/
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
CoffeeScript editor for MacOS
提问by kolinko
Does anybody know a good text editor for Mac that supports syntax highlighting in CoffeeScript? Is it possible to do this in TextWrangler or BBEdit?
有人知道一个很好的 Mac 文本编辑器,它支持 CoffeeScript 中的语法高亮显示吗?是否可以在 TextWrangler 或 BBEdit 中执行此操作?
Cheers :)
干杯:)
采纳答案by timbo
回答by Sinetris
On http://jashkenas.github.com/coffee-script/there is a list of what is available.
在http://jashkenas.github.com/coffee-script/ 上有一个可用的列表。
For Emacs there is CoffeeScript Major Mode(Emacs for mac: http://aquamacs.org/)
对于 Emacs,有CoffeeScript Major Mode(Emacs for mac:http: //aquamacs.org/)
For Vim there is Vim CoffeeScript(Vim for mac: http://code.google.com/p/macvim/)
对于 Vim,有Vim CoffeeScript(Mac 版 Vim:http: //code.google.com/p/macvim/)
For Textmatethere is CoffeeScript TextMate Bundle(how noted by Trevor, this is maintained by CoffeeScript creator Jeremy Ashkenas. And how noted by Chocohound, it works on Sublime Text 2too)
对于TextMate中存在的CoffeeScript TextMate的捆绑(如何特雷弗指出,这是由CoffeeScript的创建者杰里米阿什克纳斯维持。以及如何通过指出Chocohound,它适用于崇高的文本2太)
For Gedit there is gedit-coffeescript
For IntelliJ IDEA and RubyMine there is coffeescript-idea
对于 IntelliJ IDEA 和 RubyMine,有coffeescript-idea
I can find nothing for TextWrangler or BBEdit.
我找不到 TextWrangler 或 BBEdit 的任何内容。
Edit:
编辑:
The list moved to the wikiand now there is an attempt to make a BBEdit plugin too ;)
该列表已移至wiki,现在也尝试制作 BBEdit 插件;)
As mb21said, you can find TextWranglerinstructions here.
正如mb21所说,您可以在此处找到TextWrangler说明。
回答by Jeremy Warne
To highlight coffeescript in Eclipse:
要在 Eclipse 中突出显示 coffeescript:
- Download http://www.gstaff.org/colorEditor/cbg.editor_1.2.6.jar
- Download https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
- Open cbg.editor_1.2.6.jar with a zip editor.
- Put coffeescript.xml into the cbg.editor_1.2.6.jar\modes directory
- Edit cbg.editor_1.2.6.jar\modes\catalog (it's an XML file)
- Add a line for Coffeescript:
- 下载 http://www.gstaff.org/colorEditor/cbg.editor_1.2.6.jar
- 下载https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
- 使用 zip 编辑器打开 cbg.editor_1.2.6.jar。
- 将coffeescript.xml放入cbg.editor_1.2.6.jar\modes目录
- 编辑 cbg.editor_1.2.6.jar\modes\catalog(这是一个 XML 文件)
- 为 Coffeescript 添加一行:
<MODE NAME="coffee" FILE="coffeescript.xml"
FILE_NAME_GLOB="*.coffee" />
<MODE NAME="coffee" FILE="coffeescript.xml"
FILE_NAME_GLOB="*.coffee" />
Save the .jar and put it into Eclipse's plugin directory. Restart Eclipse and .coffee files should now be highlighted.
保存 .jar 并将其放入 Eclipse 的插件目录中。重新启动 Eclipse,现在应该突出显示 .coffee 文件。
WARNING: For some reason, this plugin's default colours are TERRIFYINGLY UNUSABLE. I recommend editing the colours to the attached first, before viewing any files. Honestly, just save yourself the heartache.
警告:出于某种原因,这个插件的默认颜色是可怕的不可用。我建议先编辑附件的颜色,然后再查看任何文件。老实说,只是省去自己的心痛。
回答by Andrzej ?liwa
TextMate have good bundle:
TextMate 有很好的捆绑:
RubyMine / IDEA have also good plugin (but this is IDE and is crossplatform):
RubyMine / IDEA 也有很好的插件(但这是 IDE 并且是跨平台的):
回答by Dom Vinyard
Adobe Bracketshas native CoffeeScript support and the 'Interactive Linter' extension (downloadable from within the app) will even lint it to some extent, tell you that your lines are too long and so on.
Adobe Brackets具有原生的 CoffeeScript 支持,“Interactive Linter”扩展程序(可从应用程序内下载)甚至会在某种程度上对其进行整理,告诉您您的行太长等等。
However, there is no comment/uncomment keyboard shortcut, which gets old fast and there are other bugs, as you'd expect with software in such hard-development.
但是,没有注释/取消注释键盘快捷键,它会很快变旧并且还有其他错误,正如您对在这种硬开发中的软件所期望的那样。
Worth checking out, none-the-less.
值得一试,尽管如此。
回答by Jon Stevens
Aptana has it now in version 3.0.4, but due to a bug with control over tabs/spaces, you'll need to install the 3.0.5 beta.
Aptana 现在在 3.0.4 版中提供了它,但由于控制制表符/空格的错误,您需要安装 3.0.5 测试版。
This is the beta Eclipse update site: http://preview.appcelerator.com/aptana/studio3/plugin/update/beta/
这是测试版 Eclipse 更新站点:http: //preview.appcelerator.com/aptana/studio3/plugin/update/beta/
I'm pretty happy with Aptana. In my opinion, the editors for css, scss, coffeescript, html, etc. are all better than the built-in eclipse editors for these languages.
我对 Aptana 很满意。在我看来,css、scss、coffeescript、html等的编辑器都比这些语言内置的eclipse编辑器要好。
回答by Graeck
Here's a plist file for syntax highlighting, etc, for CoffeeScript in BBEdit:
这是用于 BBEdit 中 CoffeeScript 的语法高亮等的 plist 文件: