简体   繁体   中英

Better syntax highlighting for js.erb files in Textmate

I'd like Textmate to highlight Ruby syntax inside <% %> tags in *.js.erb files (like it does in *.html.erb files). Right now it looks like this:

替代文字

As you can see, everything within the quotes is treated like a regular JS string – annoying.

I think the "HTML (Rails)" bundle in TextMate would define the syntax highlighting for what you're looking for, and what you're describing would probably be an enhancement to the plugin. I'd dig into the DrNic Ruby on Rails bundle (or email him for tips, he is friendly) to look for how you can add this functionality. I'm entirely sure this is the correct bundle, but DrNic has developed others and starting with asking him for help would be a good bet. You can google for his personal blog/contact details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM