Skip to content

Masterlist Syntax Highlighting

SilentSpike edited this page Jun 1, 2014 · 2 revisions

Introduction

This is a user defined language syntax highlighter for Notepad++ that colours the masterlist format keywords and enables folding of groups. It must be manually applied from the "Language" menu of Notepad++ to take effect. It is found below the divider, and is labelled "BOSS".

Useful Shortcuts:

  • ALT-0: Close all Folders.
  • ALT-1: Close all Level 1 (=Root)-Folders.
  • ALT-2: Close all Folders on Level 2.
  • ...

Installation

Simple Installation

Copy the appropriate code below and save it into a text file with extension .xml. In Notepad++ go to Language > Define your language... > Import and then direct it to your xml file.

Alternative Installation

Copy the appropriate code below and save it into a file named UserDefineLang.xml. Place this newly created file in following directory: %APPDATA%\Notepad++\userDefineLang.xml.

You can also automatically create the file in the right place by pressing WindowsKey+R and pasting notepad.exe %APPDATA%\Notepad++\userDefineLang.xml into the text box.

This folder translates to C:\Users\[your user name]\AppData\Roaming\Notepad++ on Windows Vista and 7.

In case you already have one or more User defined Languages in Notepad++ you have to take care not to overwrite your existing languages. In this case, copy all the code between <NotepadPlus> and </NotepadPlus>. Paste this exactly after the existing root-tag into your existing xml-file.

Highlighting

Default Highlighting

<NotepadPlus>
    <UserLang name="BOSS" ext="bos" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1"></Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range"></Keywords>
            <Keywords name="Operators1">- ( ) * / &amp;&amp; % + &lt; = &gt; || { } .</Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open">BEGINGROUP:</Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close">ENDGROUP:</Keywords>
            <Keywords name="Folders in code2, open"></Keywords>
            <Keywords name="Folders in code2, middle"></Keywords>
            <Keywords name="Folders in code2, close"></Keywords>
            <Keywords name="Folders in comment, open"></Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close"></Keywords>
            <Keywords name="Keywords1">IF&#x000D;&#x000A;IFNOT&#x000D;&#x000A;VAR&#x000D;&#x000A;FILE&#x000D;&#x000A;VERSION&#x000D;&#x000A;REGEX&#x000D;&#x000A;CHECKSUM&#x000D;&#x000A;ACTIVE&#x000D;&#x000A;LANG</Keywords>
            <Keywords name="Keywords2">SET:&#x000D;&#x000A;MOD:&#x000D;&#x000A;ADD:&#x000D;&#x000A;BEFORE:&#x000D;&#x000A;AFTER:&#x000D;&#x000A;BOTTOM:&#x000D;&#x000A;APPEND:&#x000D;&#x000A;REGEX:</Keywords>
            <Keywords name="Keywords3">REQ:</Keywords>
            <Keywords name="Keywords4">GLOBAL&#x000D;&#x000A;WARN:&#x000D;&#x000A;INC:</Keywords>
            <Keywords name="Keywords5">ERROR:&#x000D;&#x000A;DIRTY:</Keywords>
            <Keywords name="Keywords6">SAY:</Keywords>
            <Keywords name="Keywords7">esm&#x000D;&#x000A;esp</Keywords>
            <Keywords name="Keywords8">TAG:</Keywords>
            <Keywords name="Delimiters">00&quot; 01 02&quot; 03$ 04 05$ 06{{ 07 08}}</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="202020" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="Consolas" fontStyle="2" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="06287E" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="C2870C" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="007020" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="FF8000" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="FF0000" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="400040" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="408080" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="408010" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="004000" bgColor="FFFFFF" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="396590" bgColor="FFFFFF" fontName="Consolas" fontStyle="2" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="0080C0" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="008080" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

Zenburn Theme Highlighting

<NotepadPlus>
    <UserLang name="BOSS" ext="" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1"></Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range"></Keywords>
            <Keywords name="Operators1">- ( ) * / &amp;&amp; % + &lt; = &gt; || { } .</Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open">BEGINGROUP:</Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close">ENDGROUP:</Keywords>
            <Keywords name="Folders in code2, open"></Keywords>
            <Keywords name="Folders in code2, middle"></Keywords>
            <Keywords name="Folders in code2, close"></Keywords>
            <Keywords name="Folders in comment, open">/*</Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close">*/</Keywords>
            <Keywords name="Keywords1">VAR&#x000D;&#x000A;FILE&#x000D;&#x000A;VERSION&#x000D;&#x000A;REGEX&#x000D;&#x000A;CHECKSUM&#x000D;&#x000A;ACTIVE&#x000D;&#x000A;LANG</Keywords>
            <Keywords name="Keywords2">SET:&#x000D;&#x000A;MOD:&#x000D;&#x000A;REGEX:</Keywords>
            <Keywords name="Keywords3">REQ:&#x000D;&#x000A;TAG:</Keywords>
            <Keywords name="Keywords4">GLOBAL&#x000D;&#x000A;WARN:&#x000D;&#x000A;INC:</Keywords>
            <Keywords name="Keywords5">ERROR:&#x000D;&#x000A;DIRTY:</Keywords>
            <Keywords name="Keywords6">SAY:</Keywords>
            <Keywords name="Keywords7">esm&#x000D;&#x000A;esp</Keywords>
            <Keywords name="Keywords8">IF&#x000D;&#x000A;IFNOT</Keywords>
            <Keywords name="Delimiters">00&quot; 01 02&quot; 03 04 05 06{{ 07 08}} 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="C0C0C0" bgColor="404040" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="808080" bgColor="404040" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="404040" fontName="Consolas" fontStyle="2" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FFFFFF" bgColor="404040" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="FF80FF" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="FF8080" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="FFFF80" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="FF8000" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="FF0000" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="00FF80" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="80FF80" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="00FFFF" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="00FFFF" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="FF80C0" bgColor="404040" fontName="Consolas" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="FFFFFF" bgColor="404040" fontName="Consolas" fontStyle="2" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="0080C0" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="FFFF80" bgColor="404040" fontName="Consolas" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>