Closed franklin-ross closed 11 years ago
+1
Fantastic! I've only been using it for 10 minutes but so far so good!
My only small quibble thus far is with indentation. There seems to be some extra indentation added with closing braces in the resulting Javascript. I'll copy some code below to try and highlight.
Given this CoffeeScript snipped
eat food for food in meal when food?
I expect the resulting Javascript to be (this is what the 'Display Javascript' command does)
var food, _i, _len;
for (_i = 0, _len = meal.length; _i < _len; _i++) {
food = meal[_i];
if (food != null) {
eat(food);
}
}
This is what is actually printed by the 'Fast Compile' command
var food, _i, _len;
for (_i = 0, _len = meal.length; _i < _len; _i++) {
food = meal[_i];
if (food != null) {
eat(food);
}
}
I guess it could be something to do with Sublime's indentation settings or something when the text is replaced, I'm not sure. It's not a big deal anyway because the code is perfectly valid and not hard to just reindent manually.
I'll let you know if I see anything else in the future.
Hey guys, great work with this. Here's something I'd love to see in it: The ability to write a line or 2 of Coffeescript in a JS file, then select just the Coffeescript and hit a command to have it replaced with the equivalent JS.
I have to use JS at work unfortunately, and I'm fine doing so most of the time, but it often comes up that I'm about to write out a for loop or something, and I stop and think about how much easier it would be in CS. Being able to just write that out inline as a kind of super snippet without having to drop to another buffer, compile, then copy to my JS would make me so happy.