How can I tell Notepad++ to always use a particular language with a particular file extension

All you have to do is tell Notepad++ that "xul" files are actually "XML" files.

  1. Go to Settings > Style Configurator
  2. Under Language, scroll down and highlight "XML"
  3. At the bottom, under User ext. type in "xul"
  4. Press Save & Close
  5. Open your file and it should now highlight properly.

Some other helpful links:

  • Assigning custom extensions to a language’s syntax highlighting in Notepad++
  • Associating file extensions with highlighters

Here is the instructions for user defined languages. With pictures.

Select: Language --> Define Your Language:

Select: Language --> Define Your Language

Make sure you omit "." from extension in the Ext. box, or it wont work:

Make sure you omit "." from extension in the Ext. box, or it wont work.