davidrios / jade-tmbundle

A comprehensive textmate / sublime text bundle for the Jade template language.
https://github.com/davidrios/jade-tmbundle
MIT License
102 stars 31 forks source link

[Feature Request] highlight spacebars #{foo} #56

Closed hongbo-miao closed 3 years ago

hongbo-miao commented 8 years ago

1 I love this Bundle.

Now a lot of people start to use Meteor. Meteor's spacebars in Jade looks like #{foo}. I would be appreciate if you can highlight this kind of spacebars. Also in this screenshot, #{showSelectedPlayer.name} shows two kind of color, please just use one highlight color.

Thank you so much!

davidrios commented 8 years ago

Sorry, i couldn't quite understand what you want. What kind of highlight should there be on #{foo}? As for the #{showSelectedPlayer.name} case, this happens because when a #{} block appears in Jade, the highlighting is passed to the JavaScript highlighter, which I have no control of. If you create a new JS file and type showSelectedPlayer.name on the first line you will see it is colored in the same way.

hongbo-miao commented 8 years ago

Hi @davidrios, sorry for not clear. I mean #{blabla} and "blabla", if they can be in different colors, that will be great.

dalgard commented 8 years ago

I write my Meteor templates in Jade, too, but I suspect that @Hongbo-Miao is mixing up some concepts around Spacebars and interpolation. Still, it might be nice to have special highlighting of #{...}.

(In the Meteor version of Jade, the interpolation syntax is converted directly to a Spacebars helper – {{helper posArg keywordArg=value}}. This gives it some slightly different semantics, since its contents is not JavaScript, but helper syntax.)

hongbo-miao commented 8 years ago

@dalgard Thanks to make it more clear. :)

hongbo-miao commented 3 years ago

Wow, this is my first issue on GitHub! I realized the issue I opened mostly not make sense. I did mix up some concepts around Spacebars and interpolation at that time. The web world changed a lot since then. I guess it can be close. Ha