Home Download Buy Blog Forum Support

CoffeeScript

CoffeeScript

Postby jankuca on Sat Apr 16, 2011 1:06 pm

Hi, could I request coffeescript syntax (highligting) support?

And one other thing... When I'm saving a new coffeescript file (.coffee), the resulting filename gets an extension I don't want ("sth.coffee" -> "sth.coffee.js") unless I choose "All files" as the file type. It would be great if there was a "CoffeeScript" item in the file type selectbox (either as a new item or added to the JS one).

Thanks in advance.
jankuca
 
Posts: 6
Joined: Sat Apr 16, 2011 12:56 pm
Location: Prague, Czech Republic

Re: CoffeeScript

Postby adzenith on Sat Apr 16, 2011 5:47 pm

Looks like you can find a Coffeescript tmLanguage file here: https://github.com/jashkenas/coffee-scr ... tmLanguage
Make a folder inside your packages directory called Coffeescript and throw the tmLanguage file in there, and you should be good to go.
adzenith
 
Posts: 1213
Joined: Mon Oct 19, 2009 9:12 pm

Re: CoffeeScript

Postby jankuca on Sat Apr 16, 2011 8:42 pm

Wow, awesome. Thanks a bunch!
jankuca
 
Posts: 6
Joined: Sat Apr 16, 2011 12:56 pm
Location: Prague, Czech Republic

Re: CoffeeScript

Postby johnnykl on Sat May 14, 2011 9:16 am

Doesn't seem to work on Sublime Text 2 on Win7. Tried putting Program Files/Sublime Text 2/Coffeescript/Coffeescript.tmLanguage and also in the Pristine Packages folder, neither works..
johnnykl
 
Posts: 12
Joined: Sat May 14, 2011 9:11 am

Re: CoffeeScript

Postby jbjornson on Mon May 16, 2011 9:34 am

Are you sure you are placing it in the right directory?


Windows: %APPDATA%/Sublime Text 2/Packages
OS X: ~/Library/Application Support/Sublime Text 2/Packages
Linux: ~/.Sublime Text 2/Packages
Portable Installation: Sublime Text 2/Data/Packages


See:
http://sublimetext.info/docs/basic_concepts.html#the-data-directory
http://sublimetext.info/docs/basic_concepts.html#the-packages-directory
jbjornson
 
Posts: 344
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: CoffeeScript

Postby johnnykl on Tue May 17, 2011 8:11 pm

Didn't know about the %APPDATA% folder, was placing it in Sublime app's folder in Program Files. Works now, thanks!
johnnykl
 
Posts: 12
Joined: Sat May 14, 2011 9:11 am

Re: CoffeeScript

Postby TrevorBurnham on Sat Jul 30, 2011 2:25 am

I'm the author of the PragProg book on CoffeeScript (http://pragprog.com/titles/tbcoffee/coffeescript), and I'd like to migrate from TextMate to Sublime Text 2. Syntax highlighting with the tmbundle works quite well, but you don't get any of the commands (though you can hack in a "Build" command pretty easily—see http://prototypef.tumblr.com/post/72110 ... ime-text-2).

Things I miss most:

1. Being able to build or run a file, or just a selection
2. Comment toggling (ST2 can do this just fine in Ruby, so why not in CoffeeScript?)
3. Automatic indentation (type `->` or `if x`, for instance, and hit enter; in TextMate, you get a tab for free)

I love the sleekness, speed and stability of Sublime Text 2, but #1 and #2 on this list are must-have features for CoffeeScript devs.
TrevorBurnham
 
Posts: 6
Joined: Sun Jul 24, 2011 5:49 pm

Re: CoffeeScript

Postby aparajita on Sat Jul 30, 2011 4:21 am

TrevorBurnham wrote:1. Being able to build or run a file, or just a selection


http://sublimetext.info/docs/en/core/build_systems.html
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: CoffeeScript

Postby nobleach on Sat Jul 30, 2011 2:11 pm

TrevorBurnham wrote:I'm the author of the PragProg book on CoffeeScript (http://pragprog.com/titles/tbcoffee/coffeescript), and I'd like to migrate from TextMate to Sublime Text 2. Syntax highlighting with the tmbundle works quite well, but you don't get any of the commands (though you can hack in a "Build" command pretty easily—see http://prototypef.tumblr.com/post/72110 ... ime-text-2).

Things I miss most:

1. Being able to build or run a file, or just a selection
2. Comment toggling (ST2 can do this just fine in Ruby, so why not in CoffeeScript?)
3. Automatic indentation (type `->` or `if x`, for instance, and hit enter; in TextMate, you get a tab for free)

I love the sleekness, speed and stability of Sublime Text 2, but #1 and #2 on this list are must-have features for CoffeeScript devs.


Even though I own Textmate, I have to use Windows or Linux at work, so I was using Emacs for all my CoffeeScript stuff. I just started using Sublime Text 2, so I'm going to do my next project using the CoffeeScript plugin.

I wish your book was available on Amazon.... I'm a "Prime" member, so I'd love to use the free shipping. Otherwise, I'll try to make my job pay for it. I've been waiting for the release!!!
nobleach
 
Posts: 48
Joined: Thu Jun 23, 2011 4:14 pm

Re: CoffeeScript

Postby jps on Mon Aug 01, 2011 1:41 pm

TrevorBurnham wrote:2. Comment toggling (ST2 can do this just fine in Ruby, so why not in CoffeeScript?)
3. Automatic indentation (type `->` or `if x`, for instance, and hit enter; in TextMate, you get a tab for free)

These last two items are controlled by .tmPreferences files, which you'll want to download also (https://github.com/jashkenas/coffee-scr ... references), and place next to your .tmLanguage file - comment toggling, auto indent, and goto symbol should all work after that.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 5 guests