86

I've associated .xul with Notepad++ so if I double-click on a .xul file, it will open in Notepad++. But Notepad++ doesn't know that XUL is just a particular type of XML, so I then have to manually click on "Language > XML" to get XML syntax highlighting. Is there a way that I can tell it: "every time you open a file with the extension .xul, automatically switch to the XML language"?

117

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:

  • 16
    And if you want to add more than one (for example, I'm also adding 'rdf' -- yup, I'm doing Firefox extension development) then just separate them with spaces. – MatrixFrog Jun 11 '10 at 22:21
  • 1
    I'm saving it and it works for the session but it doesn't persist. When I restart Notepad++, it's not there anymore. – strider Mar 27 '14 at 15:31
  • 4
    Run it as Administrator and it persists. – strider Mar 27 '14 at 15:37
  • 1
    Note that for user-defined languages, the same can be done from the language configuration window in Language > Define your language... > user language : <your language> in the Ext. field. – yco Apr 20 '16 at 9:54
  • Awsome! +1 for you! – Ivijan Stefan Stipić Nov 11 '16 at 17:55
2

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.

  • 1
    Please read the question again carefully. Your answer does not answer the original question. This is an answer to some other question. – DavidPostill Jan 29 '17 at 15:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.