Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoffeeScript editor for MacOS

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?

Cheers :)

like image 314
kolinko Avatar asked Nov 22 '10 13:11

kolinko


People also ask

Is CoffeeScript still a thing?

As of today, January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kind of alive).

Is CoffeeScript easy to learn?

CoffeeScript is a lightweight language that compiles into JavaScript. It provides simple and easy to learn syntax avoiding the complex syntax of JavaScript.


2 Answers

On http://jashkenas.github.com/coffee-script/ there is a list of what is available.

For Emacs there is CoffeeScript Major Mode (Emacs for mac: http://aquamacs.org/)

For Vim there is Vim CoffeeScript (Vim for mac: http://code.google.com/p/macvim/)

For Textmate there 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 2 too)

For Gedit there is gedit-coffeescript

For IntelliJ IDEA and RubyMine there is coffeescript-idea

I can find nothing for TextWrangler or BBEdit.

Edit:

The list moved to the wiki and now there is an attempt to make a BBEdit plugin too ;)

As mb21 said, you can find TextWrangler instructions here.

like image 192
Sinetris Avatar answered Sep 25 '22 01:09

Sinetris


To highlight coffeescript in Eclipse:

  1. Download http://www.gstaff.org/colorEditor/cbg.editor_1.2.6.jar
  2. Download https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
  3. Open cbg.editor_1.2.6.jar with a zip editor.
  4. Put coffeescript.xml into the cbg.editor_1.2.6.jar\modes directory
  5. Edit cbg.editor_1.2.6.jar\modes\catalog (it's an XML file)
  6. Add a line for Coffeescript:

<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.

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.

Colour preferences in Eclipse

like image 28
Jeremy Warne Avatar answered Sep 25 '22 01:09

Jeremy Warne