Netbeans Quick Tip: Syntax Highlighting and File Extensions

If you have some random file name extension (such as .ss for SilverStripe templates) which Netbeans doesn’t know about, it’s easy to configure it to use the correct syntax highlighting.

Configure syntax highlighting in Netbeans for a particular file extension

Go to Netbeans -> Preferences -> Miscellaneous -> Files on a Mac
or Tools -> Options -> Miscellaneous -> Files on Windows

Leave "File Extensions" as "< Choose the extension >" and click the "New" button.

Type in the extension without the dot.

Select the appropriate file type from the "Associated file type (MIME)" drop down box.

Click "OK" and you are done.