I have a custom XML style file for SAS, from a list of User Defined Language Files in Notepad++ available here : http://docs.notepad-plus-plus.org/index.php/User_Defined_Languages#How_To_Create_or_Modify_User-Defined_Languages

The file style: http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_SAS.xml

How can I tell Notepad++ to create a new custom language and use this file for the styling?

When I click on New User Defined Language (trying to call it SAS) I get this:

enter image description here

How can I tell it to use the style in the XML file for this new custom language?

I consulted the following questions, but they all concern changing the default behaviour, or manually defining a new language, not adding in a premade XMl file.

How to set the default language in Notepad++

How to set the default language in Notepad++

Adding a new language to Notepad++

How to get user defined language in Notepad++ to follow master formatting?


The XML file you show already contains complete definition of the UDL.

  1. Copy everything beetween tags <UserLang and </UserLang> also including them.

  2. Locate the file userdefinelang.xml. It is in the same directory as file contextMenu.xml which you can open using menu Settings > Edit Popup ContextMenu.

    • If the file was missing, just copy your file into that file and skip steps 3 and 4.
  3. Paste your selection just before </NotepadPlus> tag.

  4. Save and restart Notepad++.

  5. The language should appear near bottom of the Language menu.


The Import button on the User Defined Language pop up was what worked for me. It prompted me for the xml file to import and then the language showed up after I exited and reopened Notepad++

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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