Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top