Reputation: 3331
This is really annoying...it really is messing up my syntax highlighting... I think it suddenly happened after I deleted one of my javascript_include_tag statements and saved...suddenly the highlighting changed.
This all happened around the time I created my first js.erb file...
Oh yeah: It was working before!!! I have "erb" already added as a file association/extension to html files...but for some reason, html.erb files are suddenly getting interpreted as javascript files! like, in the bottom left, it says what type of file you are viewing, and when I have an html.erb file open it says "javascript file" which is absurd...it used to say html erb...
Upvotes: 2
Views: 4363
Reputation: 3331
I figured out the problem myself. Since Rails 3 uses this new js.erb file, at one point, I went to the style configurator and added "erb" as an extension option under "Javascript." I had already done this for html so html.erb is recognized as html, so apparently notepad++ has this bug in it b/c once I added "erb" to Javascript all html.erb began getting recognized as JS files. Removing that "erb" to Javascript in the style configurator fixed the problem. :)
Upvotes: 2
Reputation: 30216
You can configure Notepad++ to recognize an .erb (.html.erb or .js.erb) file and associate it with a given language (html).
Now when you open a file with the .erb extension (incl. .js.erb), Notepad++ will automatically apply syntax highlighting for HTML.
Upvotes: 8
Reputation: 28608
Check the post here:
It allows you to change the associations.
Upvotes: 0