Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Similar question to this but my question goes a step further.

I'm developing in rails and would like Notepad++ to automatically use html formatting on files with the extension html.erb. For example 'hello.html.erb' should open with html syntax highlighting.

How do I accomplish this?

Note(1): I've linked to a question which shows how to set default languages. But the solution doesn't work for extensions with dot separators, such as 'html.erb'

Note(2): I'm avoiding simply using html formatting for .erb extensions because I want those to use ruby syntax highlighting.

share|improve this question

I've went browsing in the Notepad++ source code, and it seems that the double extension case is not handled.

The function that determines the automatic loading of language is "Buffer::setFileName" (in Buffer.cpp). That function looks up the extension by stopping at the first dot encountered by starting in last position since it uses Microsoft's "PathFindExtension" function.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .