Gedit Syntax highlighting

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

Post Reply
User avatar
waeV
New Member
Posts: 74
Joined: Wed 23 Apr, 2008 12:52 am
Location: Maine

Gedit Syntax highlighting

Post by waeV »

I started this because I noticed that while Gedit recognizes many languages, z80 assembly is not among them. I'll be adding commands as I use them, and feel free to use / add / update this list.

To add to the list of languages, paste this into the following file (in ubuntu, at least) /usr/share/gtksourceview-1.0/language-specs/z80assembly.lang

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="z80 Assembly" version="1.0" _section="Sources" mimetypes="text/x-fb">

<!-- /' z80 Assembly syntax script for GEdit */ -->
<!-- /' MaxCoderz, started by WaeV */ -->
<!-- /' Version 1.0 Dec. 2008. Public Domain */ -->

<!-- /' COMMENTS */ -->

    <!-- /' Multiline Comment */ -->
    <block-comment _name = "Multiline Comment" style = "Comment">
        <start-regex>/&apos;</start-regex>
            <end-regex>&apos;/</end-regex>
    </block-comment>

    <!-- /' Single line comment */ -->
    <line-comment _name = "Single line Comment" style= "Comment">
        <start-regex>;</start-regex>
    </line-comment>


<!-- /' INSIDE OF " " */ -->
    <string _name = "String" style = "String" end-at-line-end = "TRUE">
        <start-regex>"</start-regex>
        <end-regex>"</end-regex>
    </string>


<!-- /' KEYWORDS */ -->
        <keyword-list _name = "Commands" style = "Keyword" case-sensitive="false">
                <keyword>LD</keyword>
        </keyword-list>

        <keyword-list _name = ".bcalls" style = "Keyword" case-sensitive="false">
                <keyword>_ClrLCDFull</keyword>
        </keyword-list>

        <keyword-list _name = "Data Keywords" style ="Data Type" case-sensitive="false">
                <keyword>.db</keyword>
        </keyword-list>

</language>
My ethicator machine must have had a built-in moral compromise spectral release phantasmatron! I'm a genius!
Image
Post Reply