Thursday, December 1, 2011

Coffeescript IDE


So we have to choose what IDE we are going to write our coffeescript in.

So we are looking for some basic things (in no particular order):

syntax hilighting/coloring
compiling to javascript
live debug
ability to handle .coffee files/support coffeescript
refactoring
indentation support/text formatting
simple expansion
very low entry level
free and open source
Javascript support

Let's take a look at the coffee script wiki:

  • Brewer: rbrcurtis's Brewer project browser based editor uses the ace editor (which cloud9 also uses) to show the compiled JS alongside your coffeescript, much like the coffeescript homepage, and runs a simple nodejs webserver on your machine to provide file manipulation functionality.
  • Cloud9IDE: tanepiper's Cloud9IDE CoffeeScript Live extension - provides a live debug environment for .coffee files in Cloud9. Of course, written in CoffeeScript too!
  • Coda/SubEthaEdit:
  • Emacs: defunkt's CoffeeScript Major Mode — provides syntax highlighting, indentation support, and some bonus commands.
  • gedit: wavded's gedit-coffeescript — provides syntax highlighting.
  • IntelliJ IDEA/RubyMine/PyCharm/PHPStorm/WebStorm:
    • yeungda's coffeescript-idea — provides syntax highlighting. development halted: see next item.
    • netzpirat's CoffeeBrew — an extensive refactoring and improvement upon coffeescript-idea. development halted: see next item.
    • Official Support is planned for RubyMine 4, using CoffeeBrew as a base. Whether or not this support will be more widely available is currently up in the air. Please add your comments to the bug tracker if you would like to see CoffeeScript support in other jetbrains products than just RubyMine, with all of the features one would expect from a jetbrains product (completion, inspections/intentions, auto-fix, go-to-definition, etc).
  • jEdit: dhotson's and balazstth's coffeescript-jedit — which provides syntax highlighting and indentation support in jEdit.
  • Kate: max99x's kate-coffeescript — provides syntax highlighting.
  • NetBeans: dstepanov's coffeescript-netbeans - compiles coffeescript files without Node.js, advanced syntax highlighting, error checking by background compilation and autocompilation
  • Notepad++: blakmatrix's CoffeeScript_notepad_UDL - provides syntax highlighting.
  • Sublime Text 2: jashkenas's CoffeeScript TextMate bundle above provides syntax highlighting and snippet expansion.
  • Textadept: rgieseke's CoffeeScript Textadept module — provides snippets, additional key commands and indentation support.
  • TextMate: jashkenas's CoffeeScript TextMate bundle — provides syntax highlighting, snippet expansion, and the ability to run bits of CoffeeScript from within TextMate itself.
  • Vim: kchmck's Vim CoffeeScript — adds Vim syntax highlighting and indentation support.
  • Vim snippets collections carlosvillu's CoffeeScript Vim Snippets - add snippets to be used with the snippets vim plugin.
  • Vim: claco's plugin for jasmine testing in vim with support for CoffeeScript Jasmine/CoffeeSCript Vim Plugin
  • Vim: clvv's fork of a.vim - support for switching between .coffee and compiled .js files.
  • Visual Studio:
    • CoffeeLite
    • Mindscape Web Workbench - works with CoffeeScript, Sass, and LESS. Free version provides syntax highlighting and compiles CoffeeScript files automatically on save. Pro version adds automatic minification of JavaScript files.
  • BBEdit: pmuellr's CoffeeScript BBEdit Language Module / plist - not perfect, but seems to handle most things in an acceptable fashion.
  • Eclipse: provided by Titanium (Aptana) Studio. For now just syntax coloring and a basic class/method outline.
This was ripped directly from the page itself, so I'm not claiming any rights here at all.


 NetBeans.

Let's run down the scorecard:


syntax hilighting/coloring [check]
compiling to javascript [check] and it autocompiles in the background
live debug [check]
ability to handle .coffee files/support coffeescript [via https://github.com/dstepanov/coffeescript-netbeans]
refactoring [check]
indentation support/text formatting [check]
simple expansion [check]
very low entry level [not so much]
free and open source [check]
Javascript support [check]
support for node.js [check: on linux/mac]



It just seems like a more fleshed out IDE, although if you are use to something like c# in vs2010 it will feel lacking.  Everything on the wiki list is worth a look though, because people spent quite a bit of time developing the coffee script plugins.

Cloud9 IDE

The currently most popular IDE and probably the tie for first place is Cloud9 IDE.  It fulfills every requirement in spades, and it's the future of IDEs, without a doubt.  My only concern is it's newness.  So that's an issue that will resolve itself.  Possibly the other concern would be no offline support.  But I'd have a hard time remembering when I wasn't connected to the internet in some fashion.  The big buzz is centered around it.  And support for new technologies is abundant.


A link to the Coffee Script Cloud9 live plugin



Problems with very complicated IDEs I have found in the past are not with the IDE, but with myself.  The more complex something is the more of a distraction it is.  The "I need to know" syndrome.  And after years of screwing around with different IDEs or just complex software: I *don't* need to know.  I just have to realize that it is a tool and I just need the basic skills to operate the tool.  At one point I had forced myself to not use complex software for much of anything, because I had thought that it was the software's fault that I got nothing done because I had spent all of my time writing plugins or learning all of the key commands, etc.   So I had switched to a bare bones text editor.  Wow, great, focus.... so where's that one useful tool that I used 1,000 times a day... it's not there, period.  So you make due, and in the end you get more done but at the cost of 1.5x the amount of work.  That's not smart.  The solution: A complicated IDE being used as a simple IDE.  Hide everything unless you use it, but don't forget it's there.  If you need a plugin then someone else probably has written it, or you're making a mountain out of a mole hill.  I could go on and on.



If you feel differently about any of this let me know in the comments.

No comments:

Post a Comment