3

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.

Dru
  • 537

1 Answers1

0

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.

BlakBat
  • 1,279