MrPizzaFace
MrPizzaFace

Reputation: 8086

ERB in HTML background syntax highlighting with Sublime Text 3?

So I was following a Railscast and I noticed that inside of the html.erb file the ruby code has a faint background highlight effect to differentiate it from the rest of the HTML document.

I realize Ryan uses TextMate. I am using Sublime Text 3. How can I achieve the same effect? Thanks!

enter image description here

Upvotes: 6

Views: 9383

Answers (1)

jmromer
jmromer

Reputation: 2236

Install the ERB package for Sublime Text.

Assuming you have the Sublime Text package manager installed*, just hit cmd+shift+P to get the command menu, than type install package and select

Package Control: Install Package

to get the package manager menu.

In that menu, type ERB and select the package when you see it. That's it!

*Here's how to install the package manager.

NB: Once installed, you'll need to make sure HTML (Rails) mode is set.

enter image description here

And here's what the coloring should look like (with Sublime Text's Twilight color scheme):

enter image description here

Upvotes: 8

Related Questions