File Extensions

From Notepad++ Wiki
Jump to: navigation, search
Associating file extensions with highlighters


You can associate a particular file extension to any language Notepad++ can handle. Using the Language menu, you can override any choice Notepad+ made.

There are two different ways to specify extensions Notepad++ is to associate with some language:

For Built-in Languages: Go to the Settings -> Styler Configurator... dialog. Select the desired language on the leftmost list. The lower left part of the dialog shows two text fields. The leftmost field is read only and shows default associated extension(s). The rightmost field is editable and extra extensions can be typed in just like they are in the leftmost field: no leading period, multiple extensions are separated with a space.

Builtin fileexts.png

For User Defined Languages, the extension list is given in the ext attribute of the userLang node which describes the language. The list appears between double quotes, is space separated, and extensions shouldn't have any leading period. It is shown on the upper left corner of the User Define Dialog, and is better edited there.