Notepad++: syntax highlighting for BB code

It came to my attention that no one published a user defined language mode for Notepad++ that would allow you to view BB code tags in the editor relatively comfortably, so I decided to correct that omission by publishing mine.

As far as technical details go, there isn't anything of particular complexity here - various tags are defined as delimiters and URLs use the same trick that the built-in Markdown UDL uses.

Download UDL

Continue reading

Notepad++: Syntax highlighting for FontForge Script

FontForge comes with two scripting systems - largely-regular Python and an unnamed scripting language that uses the extension .PE.

While the documentation advices to prefer Python scripting where possible, it is still nice to be able to read the existing PE scripts easier.

This User Defined Language for Notepad++ aids with that, adding folding and syntax highlighting for built-in functions and variables of the scripting language.

Continue reading

Notepad++: Syntax highlighting for GameMaker Studio

npp-gml-gms

Some time ago I've introduced a Notepad++ syntax highlighting file for GameMaker 8.1 and earlier versions. At the time, making a GameMaker: Studio version seemed slightly less senseful, since dynamic scripting functions are no longer supported, and code in XML files is escaped slightly, but then... oh do wait, extensions!
Extensions in GameMaker: Studio are imported into each project locally, permitting easy modification of their files. Of course, this also implies ability to edit GML files in them. Which in turn permits editing them with external editor of choice without having to deal with XML conversions.
So I took those several minutes needed, and updated UDL (user defined language) file for GameMaker: Studio. It contains all functions, variables, and constants present as of version 1.2.1264 (released January 22, 2014). Apart of new keywords, it now sticks to editor style better as well.
Oh, and you can fold code with comments (//{, //}). Foldable sections are awesome.

Download UDL (XML)

(or grab source from PasteBin, if Dropbox is somehow inaccessible)

... and if you prefer Sublime Text, there's GameMaker plugin for that too (by Cycododge).

Notepad++: Syntax highlighting for GameMaker ≤ 8.1

Similar to other few posts about Notepad++ on this blog, this one also contains a user defined language for said program. As you can guess from title, it's for pre-Studio versions of GameMaker Language (GML).
I've made this UDF file a while ago actually, but wasn't publishing it, since it seemed that there is at least one more solution existing for this. Apparently not anymore.

This language definition supports all standard language structures of GameMaker. As well it highlights all existing functions, constants, and "special" variables (like global/self/other). Colour "conventions" are kept to ones of GameMaker. User-defined script and constant names are not automatically detected, unfortunately, but you may include these in Keyword Group 6 manually for them to be highlighted.

Download UDF

And if you are looking for GameMaker: Studio syntax highlighting, there's a UDL for that as well.

Notepad++: Syntax highlighting for Killa 0.2

Some time ago I've made a UDL2 definition for Lua-based programming language called Killa.
Actually I was planning to wait until next version of language will be released (which alters standard module names, among other things), but apparently that isn't going to be that fast, so here it is.

If you don't know what Killa is, it's a Lua-based scripting language, which adds some JavaScript-like syntax parts (including proper for-loops, bitwise operators, ternary operators, assignment operators, and more) while keeping the pleasing parts of Lua in. Also it does not allow you to accidentally leak variables in global scope, which excludes possibility of common Lua "silent errors". There's also a topic about it here. You can read more about it there, if this sounds interesting for you.

Download UDL

Notepad++: Haxe syntax highlighting


Definition file in action, displaying syntax for function of fancy purpose.

In past few days I've spent some time to update an existing user definition file to UDL2, which was introduced in Notepad++ v6.2.

UDL2 improves possibilities of creating user defined languages slightly, introducing configurable delimiters, non-symbol operators, foldable comments, and other things.

For the case of Haxe, UDL2 improves detection of symbols, and made it possible to include hexadecimal number declarations, and separate highlighting for regular expressions. A thing that is currently missing out is preprocessor instructions (#if, #else, #end, ...), however, due to nature of these, highlighting is not always needed anyway.

Download

Update: Someone has set up a repository with a more up-to-date version of the UDL file, so you should take a look at that as well.

Alternatively, UDL .xml' contents:

<NotepadPlus>
    <UserLang name="Haxe" ext="hx" udlVersion="2.0">
        <Settings>
            <Global caseIgnored="no" allowFoldOfComments="yes" forceLineCommentsAtBOL="no" foldCompact="no" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments" id="0">00// 01 02 03/* 04*/</Keywords>
            <Keywords name="Numbers, additional" id="1"></Keywords>
            <Keywords name="Numbers, prefixes" id="2">0x</Keywords>
            <Keywords name="Numbers, extras with prefixes" id="3">a b c d e f A B C D E F</Keywords>
            <Keywords name="Numbers, suffixes" id="4"></Keywords>
            <Keywords name="Operators1" id="5">&apos; - ! &quot; $ &amp; ( ) , . : ; ? @ [ ] ^ ` | + &lt; = &gt; ~</Keywords>
            <Keywords name="Operators2" id="6"></Keywords>
            <Keywords name="Folders in code1, open" id="7">{</Keywords>
            <Keywords name="Folders in code1, middle" id="8"></Keywords>
            <Keywords name="Folders in code1, close" id="9">}</Keywords>
            <Keywords name="Folders in code2, open" id="10"></Keywords>
            <Keywords name="Folders in code2, middle" id="11"></Keywords>
            <Keywords name="Folders in code2, close" id="12"></Keywords>
            <Keywords name="Folders in comment, open" id="13">//{</Keywords>
            <Keywords name="Folders in comment, middle" id="14"></Keywords>
            <Keywords name="Folders in comment, close" id="15">//}</Keywords>
            <Keywords name="Keywords1" id="16">break callback case catch class continue default do else enum extends for function if implements import in interface new package return switch throw try typedef using var while</Keywords>
            <Keywords name="Keywords2" id="17">null true false</Keywords>
            <Keywords name="Keywords3" id="18">Void Int Float Dynamic Bool UInt Iterator Array List Hash IntHash Date String Xml</Keywords>
            <Keywords name="Keywords4" id="19">dynamic extern inline override private public static untyped cast trace super this arguments</Keywords>
            <Keywords name="Keywords5" id="20"></Keywords>
            <Keywords name="Keywords6" id="21"></Keywords>
            <Keywords name="Keywords7" id="22"></Keywords>
            <Keywords name="Keywords8" id="23"></Keywords>
            <Keywords name="Delimiters" id="24">00&apos; 01\ 02&apos; 03&quot; 04\ 05&quot; 06~/ 07\ 08/ 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="NUMBERS" styleID="3" fgColor="FA3232" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" styleID="4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS2" styleID="5" fgColor="004080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS3" styleID="6" fgColor="0080AA" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS4" styleID="7" fgColor="0064FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS5" styleID="8" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS6" styleID="9" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS7" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS8" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="OPERATORS" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" styleID="14" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" styleID="16" fgColor="A31515" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" styleID="17" fgColor="A31515" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" styleID="18" fgColor="7049B6" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" styleID="19" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" styleID="20" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" styleID="21" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" styleID="22" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" styleID="23" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>