-
-
Save joshheartsy/1059468 to your computer and use it in GitHub Desktop.
TextMate javascript syntax highlighting for content_for :inline_js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To edit: | |
// Bundles -> Bundle Editor -> Edit Languages | |
// Open Ruby on Rails | |
// Edit HTML (Rails) | |
// add to the patterns | |
{ | |
name = 'inline_js.rails.embedded.html'; | |
begin = '<%\s+(content_for)\s+(:inline_js)\s+(do)\s+-?%>'; | |
end = '<%\s+(end)\s+-?%>'; | |
beginCaptures = { | |
1 = { name = 'support.function.viewhelpers.rails'; }; | |
2 = { name = 'constant.other.symbol.double-quoted.ruby'; }; | |
3 = { name = 'keyword.control.def.ruby'; }; | |
}; | |
endCaptures = { 1 = { name = 'keyword.control.def.ruby'; }; }; // make it blue | |
patterns = ( | |
{ include = 'source.js'; } | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment