3

In Notepad++, I can't color code my html.erb files. At first, I didn't think this was a problem, but then I realized that it's making my work extremely difficult.

There are options to highlight with Ruby, and options to highlight with HTML.

HTML.erb files though include both html and ruby.

Does anyone know how to color-code for html.erb files?

Darkmouse
  • 1,941
  • 4
  • 28
  • 52

1 Answers1

2

This question led me to this repo for a User Defined XML made for HTML with Twig templating. With some tweaks, especially in the Operators & Delimiters tab of the User Defined Language settings window, I have found it very useful for better highlighting ERB templating in HTML files.

Community
  • 1
  • 1
Spencer Williams
  • 821
  • 10
  • 20
  • Is Twig the same as Erb? – Thomas S. Dec 18 '17 at 11:50
  • They are definitely not the same in that they have different syntax and keywords and all that, but the markup is similar enough so that you can make a few changes to the XML to get syntax highlighting that is meaningful. – Spencer Williams Dec 19 '17 at 20:32