[GtkSourceView syntax highlighting inclusion request] request for inclusion in GtkSourceView of sisu syntax highlighting
| Newsgroups | gmane.comp.gnome.devtools |
|---|---|
| Message-ID | <[email protected]> |
Dear Gnome GtkSourceView developers, request for inclusion in GtkSourceView of sisu syntax highlighting In March this year I wrote to the developers of gobby, asking about how to proceed in writing and submitting a syntax highlighting file for sisu - a smart utf-8 lightweight markup that is packaged initially for Debian. I was directed to you... and made to understand that the gedit syntax file was shared. >---------- Forwarded message ---------- >Philipp Kern (Date: 21-Mar-2006 16:10) > >Hello Ralph, > ... >this is not something you need to contribute to Gobby, but rather to >GtkSourceView (and Gnome's gedit will also profit from it).[1] The >syntax looks pretty straightforward, though. ... > ... It has taken a long time for me to write, partly because I had intended to improve upon the file. It makes heavy use of regexes and I thought there might perhaps be various optimizations things that might be done to it. No doubt there will be refinements over time, but for now I submit the existing basic syntax highlighting file which works for inclusion in gnome. (a syntax highlighting file is included for example in vim 7). Sample (prepared/input/marked-up) documents (against which the syntax highlighter should work) can be found via: http://www.jus.uio.no/sisu/SiSU/2.html e.g. http://www.jus.uio.no/sisu/free_culture.lawrence_lessig/sisu_manifest.html http://www.jus.uio.no/sisu/free_culture.lawrence_lessig/free_culture.lawrence_lessig.sst or http://www.jus.uio.no/sisu/autonomy_markup0/sisu_manifest.html http://www.jus.uio.no/sisu/autonomy_markup0/autonomy_markup0.sst If there is work to be done, and you can guide me I will be glad to make the improvements. Thank you. Sincerely, Ralph Amissah -- email: [email protected] SiSU: http://www.jus.uio.no/sisu _______________________________________________ gnome-devtools mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-devtools
sisu.lang
(text/plain, 2.6 KB)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="SiSU" version="1.0" _section="Markup" mimetypes="text/x-ruby">
<!-- SiSU syntax highligting for gedit, place in:
/usr/share/gtksourceview-1.0/language-specs
or:
~/gtksourceview-1.0/language-specs
-->
<syntax-item _name="Header" style="Data Type">
<start-regex>^0~\S|^\@\S+:\s</start-regex>
<end-regex>\n\n</end-regex>
</syntax-item>
<pattern-item _name="Bold" style="Keyword" end-at-line-end = "TRUE">
<regex>^(:[A-C]|[1-6])~[ a-Z0-9,.;:!?"'\/()-]+</regex>
</pattern-item>
<pattern-item _name="Operators" style="Function">
<regex>^(!_|_[12]|_[12]?\*)\s</regex>
</pattern-item>
<syntax-item _name="Note Function" style="Function">
<start-regex>~\{</start-regex>
<end-regex>\}~</end-regex>
</syntax-item>
<syntax-item _name="Bold Function" style="Function">
<start-regex>[!*]\{</start-regex>
<end-regex>\}[!*]</end-regex>
</syntax-item>
<syntax-item _name="FontFace Function" style="Function">
<start-regex>[/_,^+-]\{</start-regex>
<end-regex>\}[/_,^+-]</end-regex>
</syntax-item>
<pattern-item _name="Bold Single" style="String">
<regex>[*]\S+[*]</regex>
</pattern-item>
<pattern-item _name="Link" style="String">
<regex>\{[^}]+\}(http:\/\/\S+|image)\s</regex>
</pattern-item>
<pattern-item _name="Url" style="String">
<regex>\bhttp:\/\/\S+</regex>
</pattern-item>
<line-comment _name="Line Comment" style="Comment">
<start-regex>^%+\s.</start-regex>
</line-comment>
<syntax-item _name="Multiline Code" style="Others">
<start-regex>^code\{\s*$</start-regex>
<end-regex>^\}code\s*$</end-regex>
</syntax-item>
<syntax-item _name="Multiline Poem" style="Others">
<start-regex>^poem\{\s*$</start-regex>
<end-regex>^\}poem\s*$</end-regex>
</syntax-item>
<syntax-item _name="Multiline Group" style="Others">
<start-regex>^group\{\s*$</start-regex>
<end-regex>^\}group\s*$</end-regex>
</syntax-item>
<syntax-item _name="Multiline Alt" style="Others">
<start-regex>^alt\{\s*$</start-regex>
<end-regex>^\}alt\s*$</end-regex>
</syntax-item>
<pattern-item _name="Page Break" style="Others 2" end-at-line-end = "TRUE">
<regex><:(pb|np)></regex>
</pattern-item>
<pattern-item _name="Line Break" style="Others 2" end-at-line-end = "TRUE">
<regex><(\/\s*)?br></regex>
</pattern-item>
<pattern-item _name="Footnote Reference" style="Others" end-at-line-end = "TRUE">
<regex>~\^(\s|$)</regex>
</pattern-item>
<pattern-item _name="Footnote Content" style="Others" end-at-line-end = "TRUE">
<regex>^\^~\s.+</regex>
</pattern-item>
</language>