I have sublime 2/3 and the colorize inside a :javascript block doesn't work fine.
The package is this https://sublime.wbond.net/packages/Haml
Actually they says that: "Text inside Ruby, ERB, Javascript, Sass, and CSS filters are now properly recognized so you get all the syntax highlighting, snippets, commands, etc." but in sublime it doesn't work.
Sublime 3 comes with preinstalled
Rails
package. This package also contains "Ruby Haml" syntax, which does not highlight embedded js etc. If you pressctrl + alt + p
and typehaml
you will probably see twoSet Syntax: Ruby Haml
, one fromRails
package, one fromHaml
. You need the latter to be used.The best solution for me was to install
ApplySyntax
and in it's user settings add the following:https://sublime.wbond.net/packages/Haml (https://github.com/phuibonhoa/handcrafted-haml-textmate-bundle) (installed with Package Control) works for me.
Though it would be nice to use it as the default somehow...