Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Notepad++ there is a menu option: Language->"User-Defined".

How do I customize that? What are capabilities of such option?

Can I highlight date/time? Can I highlight 21-29th symbols in the lines? Can I use RegExp?

share|improve this question

2 Answers 2

The following npp-wiki page explains how to do that:

How to create your own definition (user-defined language) of a Syntax Highlighting scheme

However, the language you need may be already defined by someone-else in User Defined Language List. You may check that list out first.

share|improve this answer

You can define your language as you wish (and make a new programming language!), but the most convenient way is to import an XML document that defines the whole configuration. An XML file for this purpose can be downloaded from here:

Then you have to define this file using your own syntax as follows:

<?xml version="1.0" encoding="Windows-1252" ?>
    <UserLang name="(name your language here e.g.P++) " ext="java">
          <Global caseIgnored="no" />
          <TreatAsSymbol comment="no" commentLine="no"/>
          <Prefix words1="no" words2="no" words3="yes" words4="yes"/>
            <Keywords name="Folder+">{</Keywords>
            <Keywords name="Folder-">}</Keywords>
            <Keywords name="Operators">- ( ) * , . / : ? @ [ ] + =</Keywords>
            <Keywords name="Comment">//</Keywords>
            <Keywords name="Words1"></Keywords>
            <Keywords name="Words2"></Keywords>
            <Keywords name="Words3">instanceof assert if else switch case default break goto return for while do continue new throw throws try catch finally this super extends implements import true false null</Keywords>
            <Keywords name="Words4">capsule design package transient strictfp void char short int long double float const static volatile byte boolean class interface native private protected public final abstract synchronized enum</Keywords>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="9" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="808040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="14" keywordClass="Folder+"/>
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="808040" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="14" keywordClass="Folder-" />            
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="Words3"/>
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="Words4"/>/>
            <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="Comment"/>
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="Comic Sans MS" fontStyle="0" fontSize="" keywordClass="Comment"/>
            <WordsStyle name="NUMBER" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />

Then you would see your language in the language tab.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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