Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.