diff options
Diffstat (limited to 'data/sisu/conf/syntax')
-rw-r--r-- | data/sisu/conf/syntax/README | 92 | ||||
-rw-r--r-- | data/sisu/conf/syntax/diakonos.conf | 979 | ||||
-rw-r--r-- | data/sisu/conf/syntax/nanorc | 220 | ||||
-rw-r--r-- | data/sisu/conf/syntax/sisu-mode.el | 235 | ||||
-rw-r--r-- | data/sisu/conf/syntax/sisu.lang | 90 | ||||
-rw-r--r-- | data/sisu/conf/syntax/sisu.xml | 157 | ||||
-rw-r--r-- | data/sisu/conf/syntax/sisu_nedit.pats | 79 |
7 files changed, 1852 insertions, 0 deletions
diff --git a/data/sisu/conf/syntax/README b/data/sisu/conf/syntax/README new file mode 100644 index 00000000..04c0ea09 --- /dev/null +++ b/data/sisu/conf/syntax/README @@ -0,0 +1,92 @@ +This directory + sisu-examples/sisu-examples/config/syntax_hi/ + /usr/share/sisu-examples/sisu-examples/config/syntax_hi +contains rudimentary sisu syntax highlighting files for: + +* (g)vim http://www.vim.org + * package: sisu-vim + * status: largely done + * comments: not found here + a vim syntax highlighting and folds component of sisu exists, + see sisu-vim + +* gedit http://www.gnome.org/projects/gedit +* gobby http://gobby.0x539.de/ + file: sisu.lang + place in: + /usr/share/gtksourceview-1.0/language-specs + or + ~/.gnome2/gtksourceview-1.0/language-specs + * status: very basic syntax highlighting + * comments: this editor features display line wrap and is used by Goby! + +* nano http://www.nano-editor.org + file: nanorc + save as: + ~/.nanorc + includes: + * status: basic syntax highlighting + * comments: assumes dark background + no display line-wrap + does line breaks + +* diakonos (an editor written in ruby) http://purepistos.net/diakonos + file: diakonos.conf + save as: + ~/.diakonos/diakonos.conf + includes: + * status: basic syntax highlighting + * comments: assumes dark background + no display line-wrap + +* kate & kwrite http://kate.kde.org + file: sisu.xml + place in: + /usr/share/apps/katepart/syntax + or + ~/.kde/share/apps/katepart/syntax + [settings::configure kate::{highlighting,filetypes}] + [tools::highlighting::{markup,scripts}::SiSU] + +* nedit http://www.nedit.org + file: sisu_nedit.pats + nedit -import sisu_nedit.pats + * status: a very clumsy first attempt + [not really done] + * comments: this editor features display line wrap + +* emacs http://www.gnu.org/software/emacs/emacs.html + files: sisu-mode.el + to file ~/.emacs add the following 2 lines: + (add-to-list 'load-path "/usr/share/sisu-examples/config/syntax_hi") + (require 'sisu-mode.el) + [not done / not yet included] + +* vim & gvim http://www.vim.org + files: sisu-vim http://www.jus.uio.no/sisu/SiSU/download + package is the most comprehensive sisu syntax highlighting and editor + environment provided to date (is for vim/ gvim, and is separate from the + contents of this directory) + on debian: + aptitude install sisu-vim + * status: this includes: + syntax highlighting + vim folds + some error checking + * comments: this editor features display line wrap + +NOTE: + +[SiSU parses files with long lines or line breaks, +but, display linewrap (without line-breaks) is a +convenient editor feature to have for sisu markup] + +kde-config --prefix +KDEDIR/share/apps/katepart/syntax/ +KDEHOME/share/apps/katepart/syntax +[In the configure dialog in kate, go to the "Editor->highlighting" page and +>select a highlight to change the mimetype/pattern associations for it.] +/etc/mime.types +/usr/share/mime/text +# +# * aeditor (an editor written in ruby) diff --git a/data/sisu/conf/syntax/diakonos.conf b/data/sisu/conf/syntax/diakonos.conf new file mode 100644 index 00000000..212ed5b8 --- /dev/null +++ b/data/sisu/conf/syntax/diakonos.conf @@ -0,0 +1,979 @@ +logfile ~/.diakonos/diakonos.log + +# When the cursor is view.margin.y lines or less from the top or +# bottom line, repeatedly scroll the screen view.jump.y lines until +# the cursor is more than view.margin.y lines from the top and +# bottom line. +# Similarly for view.margin.x and view.jump.x, with respect to the +# left-most and right-most screen columns. +view.margin.x 10 +view.margin.y 5 +view.jump.x 10 +view.jump.y 5 +view.scroll_amount 3 +view.lookback 200 +view.nonfilelines.visible false +view.nonfilelines.character ~ + +# bol_behaviour: This specifies where the cursor should go when the +# beginning-of-line key (the default is the Home key) is pressed. +# zero: Always move to the left-most column of the line +# first-char: Always move to the left-most non-whitespace character +# alternating-zero: As with 'zero', unless the cursor is +# already there, in which case, as with 'first-char'. +# alternating-first-char: As with 'first-char', unless the cursor is +# already there, in which case, as with 'zero'. +# bol_behavior is a synonym for bol_behaviour. +bol_behaviour alternating-first-char + +# Ensures saved files end with a newline character by adding it if necessary. +eof_newline false + +# Specifies whether the cursor should be at the end (false) of found text, or the +# beginning (true). +found_cursor_start false + +max_clips 30 + +# The maximum number of undo lines held in memory per file +# Smaller files will be able to have more undo levels. +max_undo_lines 100000 + +convert_tabs false + +diff_command diff -U 5 + +# Whether or not to use /usr/bin/file to determine whether files are readable +# before opening them. +use_magic_file false + +# --------------------------------------------------------------------- +# Status Line + +# Use "% syntax" as placeholders +# e.g. %d for decimal integers, %s for strings +status.left -- %s %s%s%s -- (%s) - +status.right - Buf %d of %d --- L%3d/%3d C%2d -- +# The string to use to fill in the space between the left and right sides +# of the status line. +status.filler - +status.modified_str (modified) +status.selecting_str (selecting) +status.unnamed_str (unnamed file) +status.read_only_str (read-only) +# status.vars: any subset of: +# line row num_lines col filename modified type buffer_number num_buffers selecting read_only +status.vars filename modified read_only selecting type buffer_number num_buffers row num_lines col +status.format inverse + +# --------------------------------------------------------------------- +# Context Line + +# The context line shows the wrapping context of the cursor, with respect to +# indentation. This shows the current code block(s) that the cursor is in. + +context.visible false +context.combined false +context.max_levels 4 +context.format inverse +context.separator | +context.separator.format red inverse +#context.max_segment_width 10 + +# --------------------------------------------------------------------- +# Interaction Line + +# Duration of "alert" blink (in seconds) when user has made an invalid choice +interaction.blink_duration 0.05 +interaction.blink_string *********************************************************** +# Time to wait (in seconds) before accepting user keystrokes when prompting for +# a choice which has no default +interaction.choice_delay 3 + +# --------------------------------------------------------------------- +# Key Configuration +# key <keystroke> [<keystroke>...];<function> [<arg>[,<arg>...]] +# If no function is specified, it unmaps any previous mapping. +# i.e. key <keystroke> [<keystroke>...]; +# <keystroke> can be "keycode##" to specify specific keycodes. +# e.g. key keycode8;delete +# Note the lack of space after the word keycode. + +# To obtain the string to use for any keychain, use the printKeychain command +# (default alt+k). + +# The shell, execute and pasteShellResult commands can take variables: + +# $f current buffer's filepath +# $F all current buffer filepaths, space-separated +# $i get a string from user input +# $c temp file containing current clipboard text +# $s temp file containing currently selected text + +key left;cursorLeft +key esc [ D;cursorLeft +key right;cursorRight +key esc [ C;cursorRight +key up;cursorUp +key esc [ A;cursorUp +key down;cursorDown +key esc [ B;cursorDown +key home;cursorBOL +key esc O H;cursorBOL +key esc [ H;cursorBOL +key esc [ 1 ~ cursorBOL +key end;cursorEOL +key esc O F;cursorEOL +key esc [ F;cursorEOL +key esc [ 4 ~;cursorEOL +key pageup;pageUp +key pagedown;pageDown +key ctrl+a;cursorBOL +key ctrl+e;cursorEOL +key alt+<;cursorBOF +key alt+>;cursorEOF +key alt+,;cursorTOV +key alt+.;cursorBOV +key ctrl+j;cursorReturn +key ctrl+l;cursorReturn "forward" +key alt+n;scrollDown +key alt+p;scrollUp +key esc up;scrollUp +key esc [ 1 ; 3 A scrollUp +key esc [ 1 ; 5 A scrollUp +key keycode520 scrollUp +key esc down;scrollDown +key esc [ 1 ; 3 B scrollDown +key esc [ 1 ; 5 B scrollDown +key keycode513 scrollDown +key esc right;seek /(?:^|\W)(\w)|\w(\W|$)/ +key esc [ 1 ; 3 C seek /\w(\W|$)|(?:^|\W)(\w)/ +key esc [ 1 ; 5 C seek /\w(\W|$)|(?:^|\W)(\w)/ +key keycode517 seek /\w(\W|$)|(?:^|\W)(\w)/ +key esc left;seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key esc [ 1 ; 3 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key esc [ 1 ; 5 D seek /\w(\W|$)|(?:^|\W)(\w)/, "up" +key keycode515 seek /\w(\W|$)|(?:^|\W)(\w)/, "up" + +key ctrl+g;goToLineAsk +key alt+b alt+b;toggleBookmark +key alt+b alt+n;goToNextBookmark +key alt+b alt+p;goToPreviousBookmark +key alt+b alt+a;addNamedBookmark +key alt+b alt+r;removeNamedBookmark +key alt+b alt+g;goToNamedBookmark +key alt+b alt+!;addNamedBookmark 1 +key alt+b alt+@;addNamedBookmark 2 +key alt+b alt+#;addNamedBookmark 3 +key alt+b alt+$;addNamedBookmark 4 +key alt+b alt+%;addNamedBookmark 5 +key alt+b alt+1;goToNamedBookmark 1 +key alt+b alt+2;goToNamedBookmark 2 +key alt+b alt+3;goToNamedBookmark 3 +key alt+b alt+4;goToNamedBookmark 4 +key alt+b alt+5;goToNamedBookmark 5 +key alt+t;goToTag +key alt+);goToTagUnderCursor +key alt+(;popTag + +key backspace;backspace +key ctrl+h;backspace +key del;delete +#key ctrl+k;deleteLine +key ctrl+k;deleteAndStoreLine +key ctrl+alt+k;deleteToEOL +key esc del;collapseWhitespace +key esc [ 3 ; 3 ~ collapseWhitespace +key enter;carriageReturn +key tab;parsedIndent +#key tab;indent +#key ctrl+alt+l;unindent +key alt+i;indent +key esc i;indent +key esc I;unindent +key keycode353 unindent +#key tab;insertSpaces 4 +#key tab;insertTab +key ctrl+t;insertTab + +key f1 help +key esc O P help +key esc [ 1 1 ~ help +key esc [ [ A help +key f11;loadConfiguration +key esc [ 2 3 ~;loadConfiguration +key f12;openFile "~/.diakonos/diakonos.conf" +key esc [ 2 4 ~;openFile "~/.diakonos/diakonos.conf" + +key ctrl+alt+r;redraw +key esc C;toggleSessionSetting 'context.visible', DO_REDRAW +key ctrl+alt+d;toggleSessionSetting 'display' + +key ctrl+n;newFile +key ctrl+o;openFileAsk +key ctrl+s;saveFile +key alt+s;saveFileAs +key ctrl+w;closeFile +key ctrl+alt+o;revert +key alt+!;setReadOnly +key ctrl+q;quit +key esc T;setBufferType + +key alt+1;switchToBufferNumber 1 +key alt+2;switchToBufferNumber 2 +key alt+3;switchToBufferNumber 3 +key alt+4;switchToBufferNumber 4 +key alt+5;switchToBufferNumber 5 +key alt+6;switchToBufferNumber 6 +key alt+7;switchToBufferNumber 7 +key alt+8;switchToBufferNumber 8 +key alt+9;switchToBufferNumber 9 +key alt+0;switchToBufferNumber 10 +key alt+-;switchToPreviousBuffer +key alt+=;switchToNextBuffer + +key ctrl+space;anchorSelection +#key ctrl+space;toggleSelection +key ctrl+c;copySelection +key ctrl+x;cutSelection +key alt+u;removeSelection +key ctrl+alt+v;showClips +key ctrl+v;paste +key ctrl+y;unundo +key ctrl+z;undo +#key ctrl+z;suspend +key suspend;undo +#key suspend;suspend + +key ctrl+f;find +#key ctrl+f;find "down", CASE_SENSITIVE +key alt+f;find "down", CASE_SENSITIVE +#key alt+f;findExact +key ctrl+alt+f;find "up" +#key ctrl+alt+f;find "up", CASE_SENSITIVE +key f3;findAgain "down" +key esc [ [ C findAgain "down" +key esc O R;findAgain "down" +key esc [ 1 3 ~;findAgain "down" +key f15;findAgain "up" +key esc [ 2 8 ~ findAgain "up" +key esc O 2 R;findAgain "up" +key ctrl+r;searchAndReplace +key ctrl+alt+u;clearMatches + +key f2 shell +key esc O Q shell +key esc [ 1 2 ~ shell +key esc [ [ B shell +key f8;execute +key esc F;execute "glark '$i' $F | less" +key esc d shell "diff -U 5 -w -b $c $s" +#key esc F;shell "grep -n '$i' $F" +#key esc F;execute "grep -n '$i' $F | less" +key f14 evaluate +key esc O 2 Q evaluate +esc [ 2 6 ~ evaluate +key ctrl+alt+c;shell "ruby -c $f" +key ctrl+alt+d;shell "php -l $f" + +# To use the following: +# 1) Copy to the clipboard some Ruby code which operates on stdin text and outputs to stdout. +# 2) Select (highlight) some text to operate on. +# 3) Activate this pasteShellResult command. +# 4) The selected text should now be replaced with the script's results. +key ctrl+alt+p;pasteShellResult "cat $s | ruby $c" +#key ctrl+alt+p;pasteShellResult "cat $s | perl $c" +#key ctrl+alt+p;pasteShellResult "cat $s | python $c" +#key ctrl+alt+p;pasteShellResult "cat $s | sed -f $c" +#key ctrl+alt+p;pasteShellResult "cat $s | awk -f $c" + +key alt+k printKeychain +key alt+m;toggleMacroRecording +key f4 playMacro +key esc O S playMacro +key esc [ 1 4 ~ playMacro +key esc [ [ D playMacro +key f5 loadScript +key esc [ 1 5 ~ loadScript +key esc [ [ E loadScript +key f6;repeatLast +key esc [ 1 7 ~;repeatLast +key f7;operateOnEachLine +key f19;operateOnString +key esc f7;operateOnLines + +# Emacs-like keychains + +#key ctrl+s;find +#key ctrl+x ctrl+c;quit +#key ctrl+x ctrl+f;openFileAsk +#key ctrl+x ctrl+s;saveFile + +# --------------------------------------------------------------------- +# Colour Definitions +# +# colour <integer greater than 7> <foreground colour> <background colour> +# +# For a list of colour names, see the list of format codes in the +# Language Definitions section, below. +# This colour command is only used when you want to set a different background +# colour than the terminal default. +# +# color is a synonym for colour. +colour 8 white blue +colour 9 white red +colour 10 white magenta +colour 11 yellow blue +colour 12 white green +colour 13 white brown +colour 14 black cyan +colour 15 yellow red + +# --------------------------------------------------------------------- +# Language Definitions +# For syntax highlighting and indentation. + +# lang.<language>.tokens.<any name>[.case_insensitive] <regexp with one pair of parentheses identifying the token> +# lang.<language>.tokens.<any name>.format <format codes> +# <format codes> can be any subset of: +# normal black red green brown blue magenta cyan white standout underline inverse blink dim bold +# The numbers of colour pairs (as defined by the configuration command "colour") +# can also be used as format codes. +# +# indent.roundup: If a line's indentation is not evenly divisible by the +# indent.size, and indent.roundup is true, then the non-integer indentation +# level will be rounded up. If indent.roundup is false, then it will be +# rounded down. +# e.g. given an indent.size of 4, and a line with 6 spaces, indent.roundup +# true will make Diakonos consider the line indented 2 levels. With +# indent.roundup false, it will be considered indented 1 level. +# +# The filemask can also be used to specify specific filenames which +# don't conform to the standard extensions for a language. + +# Text (default) + +lang.text.format.default white +lang.text.format.selection inverse +lang.text.format.found yellow inverse +lang.text.indent.size 2 +lang.text.indent.auto true +lang.text.indent.roundup false +#lang.text.indent.using_tabs true +lang.text.tabsize 8 + +lang.xml.filemask \.(xml|rdl|aiml|xhtml)$ +lang.xml.format.default white +lang.xml.format.selection inverse +lang.xml.format.found yellow inverse +lang.xml.tabsize 8 +lang.xml.indent.size 4 +lang.xml.indent.auto true +lang.xml.indent.roundup true +#lang.xml.indent.using_tabs true +lang.xml.tokens.entities &\S+?; +lang.xml.tokens.entities.format magenta bold +lang.xml.tokens.code.open (<)(?:[^%]|$) +lang.xml.tokens.code.close (?:[^%]|^)(>) +lang.xml.tokens.code.format white bold +lang.xml.tokens.code.change_to xml_tag +lang.xml.tokens.comments.open (<!--) +lang.xml.tokens.comments.close (-->) +lang.xml.tokens.comments.format 8 +lang.xml.tokens.comments.change_to xml_comment +lang.xml.tokens.template.open \[@-- +lang.xml.tokens.template.close --@\] +lang.xml.tokens.template.format brown +lang.xml.tokens.template.change_to perl +lang.xml_tag.format.default white bold +lang.xml_tag.format.selection inverse +lang.xml_tag.format.found yellow inverse +lang.xml_tag.tabsize 8 +lang.xml_tag.indent.size 4 +lang.xml_tag.indent.auto true +lang.xml_tag.indent.roundup true +#lang.xml_tag.indent.using_tabs true +lang.xml_tag.tokens.doublequoted_strings (\".*?[^\\]\") +lang.xml_tag.tokens.doublequoted_strings.format green bold +lang.xml_tag.tokens.singlequoted_strings ('.*?[^\\]') +lang.xml_tag.tokens.singlequoted_strings.format green bold +lang.xml_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.xml_tag.tokens.symbols.format white +lang.xml_comment.format.default 8 +lang.xml_comment.format.selection inverse +lang.xml_comment.format.found yellow inverse +lang.xml_comment.tabsize 8 +lang.xml_comment.indent.size 4 +lang.xml_comment.indent.auto true +lang.xml_comment.indent.roundup true +#lang.xml_comment.indent.using_tabs true + +lang.html.filemask \.(r?html?|php|asp)$ +lang.html.format.default white +lang.html.format.selection inverse +lang.html.format.found yellow inverse +lang.html.tabsize 8 +lang.html.indent.size 4 +lang.html.indent.auto true +lang.html.indent.roundup true +#lang.html.indent.using_tabs true +lang.html.tokens.code.open (<)(?:[^%]|$) +lang.html.tokens.code.close (?:[^%]|^)(>) +lang.html.tokens.code.format white bold +lang.html.tokens.code.change_to html_tag +lang.html.tokens.entities &\S+?; +lang.html.tokens.entities.format magenta bold +lang.html.tokens.eruby.open <% +lang.html.tokens.eruby.close %> +lang.html.tokens.eruby.format 9 bold +lang.html.tokens.eruby.change_to ruby +lang.html.tokens.php.open <\?(?:php)? +lang.html.tokens.php.close \?> +lang.html.tokens.php.format 10 bold +lang.html.tokens.php.change_to php +lang.html.tokens.comments.open (<!--) +lang.html.tokens.comments.close (-->) +lang.html.tokens.comments.format 8 +lang.html.tokens.comments.change_to html_comment +lang.html_tag.format.default white bold +lang.html_tag.format.selection inverse +lang.html_tag.format.found yellow inverse +lang.html_tag.tabsize 8 +lang.html_tag.indent.size 4 +lang.html_tag.indent.auto true +lang.html_tag.indent.roundup true +#lang.html_tag.indent.using_tabs true +lang.html_tag.tokens.attribute (href) +lang.html_tag.tokens.attribute.format green bold +lang.html_tag.tokens.elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|EM|FIELDSET|FONT|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b +lang.html_tag.tokens.elements.format cyan +lang.html_tag.tokens.attributes.case_insensitive \b(abbr|accept-charset|accept|accesskey|action|align|alink|alt|archive|axis|background|bgcolor|border|cellpadding|cellspacing|char|charoff|charset|checked|cite|class|classid|clear|code|codebase|codetype|color|cols|colspan|compact|content|coords|data|datetime|declare|defer|dir|disabled|enctype|face|for|frame|frameborder|headers|height|href|href|hreflang|hspace|http-equiv|id|ismap|label|lang|language|link|longdesc|marginheight|marginwidth|maxlength|media|method|multiple|name|nohref|noresize|noshade|nowrap|object|onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onselect|onsubmit|onunload|profile|prompt|readonly|rel|rev|rows|rowspan|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary|tabindex|target|text|title|type|usemap|valign|value|valuetype|version|vlink|vspace|width)\b +lang.html_tag.tokens.attributes.format white +lang.html_tag.tokens.doublequoted_strings (\".*?[^\\]\") +lang.html_tag.tokens.doublequoted_strings.format green bold +lang.html_tag.tokens.singlequoted_strings ('.*?[^\\]') +lang.html_tag.tokens.singlequoted_strings.format green bold +lang.html_tag.tokens.symbols ([@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.html_tag.tokens.symbols.format white +lang.html_comment.format.default 8 +lang.html_comment.format.selection inverse +lang.html_comment.format.found yellow inverse +lang.html_comment.tabsize 8 +lang.html_comment.indent.size 4 +lang.html_comment.indent.auto true +lang.html_comment.indent.roundup true +#lang.html_comment.indent.using_tabs true + +# CSS + +lang.css.filemask \.css$ +lang.css.format.default white +lang.css.format.selection inverse +lang.css.format.found yellow inverse +lang.css.tabsize 8 +lang.css.indent.size 4 +lang.css.indent.auto true +lang.css.indent.roundup true +#lang.css.indent.using_tabs true +lang.css.indent.indenters (\{) +lang.css.indent.unindenters (\}) +lang.css.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.css.tokens.properties \b(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-collapse|border-color|border-spacing|border-style|border-top|border-bottom|border-right|border-left|border-top-color|border-top-style|border-top-width|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-right|margin-top|margin-left|margin-bottom|margin|max-height|max-width|min-height|min-width|orphans|outline-color|outline-style|outline-width|outline|overflow|padding-top|padding-left|padding-right|padding-bottom|padding|page-break-after|page-break-before|page-break-inside|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|table-layout|text-align|text-decoration|text-indent|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index): +lang.css.tokens.properties.format white bold +lang.css.tokens.colours #[A-Fa-f0-9]{6}|\b(?:aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b +lang.css.tokens.colours.format yellow bold +lang.css.tokens.long_comments.open \/\* +lang.css.tokens.long_comments.close \*\/ +lang.css.tokens.long_comments.format 8 bold +lang.css.tokens.numbers \b([0-9]+\.[0-9]+|[0-9]+) +lang.css.tokens.numbers.format blue bold +lang.css.tokens.units [^A-Za-z](em|pt|px)\b +lang.css.tokens.units.format cyan +lang.css.tokens.html_elements.case_insensitive \b(A|ABBR|ACRONYM|ADDRES|APPLET|AREA|B|BASE|BASEFONT|BDO|BIG|BLOCKQUOTE|BODY|BR|BUTTON|CAPTION|CENTER|CITE|CODE|COL|COLGROUP|DD|DEL|DFN|DIR|DIV|DL|DT|FIELDSET|FORM|FRAME|FRAMESET|H1|H2|H3|H4|H5|H6|HEAD|HR|HTML|I|IFRAME|IMG|INPUT|INS|ISINDEX|KBD|LABEL|LEGEND|LI|LINK|MAP|MENU|META|NOFRAMES|NOSCRIPT|OBJECT|OL|OPTGROUP|OPTION|P|PARAM|PRE|Q|S|SAMP|SCRIPT|SELECT|SMALL|SPAN|STRIKE|STRONG|STYLE|SUB|SUP|TABLE|TBODY|TD|TEXTAREA|TFOOT|TH|THEAD|TITLE|TR|TT|U|UL|VA)\b +lang.css.tokens.html_elements.format green +lang.css.tokens.values \b(auto|block|inherit|inline|larger|none|smaller|solid)\b +lang.css.tokens.values.format blue bold + +# Ruby + +lang.ruby.filemask (?:[Rr]akefile)|(?:\.(?:rb|gem(?:spec)?)$) +lang.ruby.bangmask ruby +lang.ruby.format.default white bold +lang.ruby.format.selection inverse +lang.ruby.format.found yellow inverse +lang.ruby.tokens.reserved_words \b(__FILE__|and|def|end|in|or|self|unless|__LINE__|begin|defined\?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|class|elsif|if|not|return|undef|yield)\b +lang.ruby.tokens.reserved_words.format white +lang.ruby.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.ruby.tokens.constants.format yellow bold +lang.ruby.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] +lang.ruby.tokens.symbols.format white +lang.ruby.tokens.class_variables (@[A-Za-z_][A-Za-z_0-9]*) +lang.ruby.tokens.class_variables.format white bold +lang.ruby.tokens.comments (#.*) +lang.ruby.tokens.comments.format 8 bold +lang.ruby.tokens.regular_expressions (\/.+?[^\\]\/) +lang.ruby.tokens.regular_expressions.format red bold +lang.ruby.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") +lang.ruby.tokens.doublequoted_strings.format green bold +lang.ruby.tokens.singlequoted_strings ('.*?[^\\]'|'') +lang.ruby.tokens.singlequoted_strings.format green bold +lang.ruby.tokens.backquoted_strings (`.*?[^\\]`|``) +lang.ruby.tokens.backquoted_strings.format red bold +lang.ruby.tokens.character_codes \W(\?\S) +lang.ruby.tokens.character_codes.format magenta bold +lang.ruby.tokens.long_comments.open ^=begin +lang.ruby.tokens.long_comments.close ^=end +lang.ruby.tokens.long_comments.format 8 bold +lang.ruby.tokens.sql_string.open (<<-EOSQL) +lang.ruby.tokens.sql_string.close (EOSQL) +lang.ruby.tokens.sql_string.format 1 +lang.ruby.tokens.sql_string.change_to sql +lang.ruby.indent.size 4 +lang.ruby.indent.auto true +lang.ruby.indent.roundup true +#lang.ruby.indent.using_tabs true +lang.ruby.indent.indenters \b(do|def|begin|ensure|when|case|else|for|while|elsif|if|class|module|rescue)\b|([{\[(]$|\{\s*\|[\w\s,]*\|\s*$) +lang.ruby.indent.unindenters \b(end|else|when|rescue)\b|(^\s+[\]})]) +lang.ruby.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*)|\S\s+if +lang.ruby.indent.ignore ^\s*$ +lang.ruby.context.ignore ^=(begin|end)$ + +# PHP + +lang.php.filemask \.php\d?$ +lang.php.bangmask php +lang.php.format.default white bold +lang.php.format.selection inverse +lang.php.format.found yellow inverse +lang.php.tokens.doublequoted_strings (\".*?[^\\]\") +lang.php.tokens.doublequoted_strings.format green bold +lang.php.tokens.singlequoted_strings ('.*?[^\\]') +lang.php.tokens.singlequoted_strings.format green bold +lang.php.tokens.reserved_words \b(NULL|E_ALL|__wakeup|not|endwhile|__sleep|new|endswitch|__LINE__|list|endif|__FILE__|global|endforeach|while|include_once|endfor|virtual|include|enddeclare|xor|if|empty|var|elseif|TRUE|else|this|echo|stdClass|die|switch|do|static|default|return|function|declare|require_once|foreach|continue|require|for|class|print|FALSE|cfunction|PHP_VERSION|extends|case|exit|break|PHP_OS|eval|argc|parent|E_WARNING|as|or|E_ERROR|argv|old_function|E_PARSE|and)\b +lang.php.tokens.reserved_words.format white +lang.php.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.php.tokens.constants.format yellow bold +lang.php.tokens.comments (\/\/.*) +lang.php.tokens.comments.format 8 bold +lang.php.tokens.preprocessor (^\s*#.*) +lang.php.tokens.preprocessor.format yellow bold +lang.php.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.php.tokens.symbols.format white +lang.php.tokens.long_comments.open \/\* +lang.php.tokens.long_comments.close \*\/ +lang.php.tokens.long_comments.format 8 bold +lang.php.tokens.sql_string.open (<<<EOS) +lang.php.tokens.sql_string.close (EOS) +lang.php.tokens.sql_string.format 1 +lang.php.tokens.sql_string.change_to sql +lang.php.tokens.js.open (<<<EOJS) +lang.php.tokens.js.close (EOJS) +lang.php.tokens.js.format 12 bold +lang.php.tokens.js.change_to java +lang.php.indent.size 4 +lang.php.indent.auto true +lang.php.indent.roundup false +#lang.php.indent.using_tabs true +lang.php.indent.indenters ([{\[(]$) +lang.php.indent.unindenters (^\s+[\]})]) +lang.php.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.php.indent.ignore ^(.+:|\s*?)$ +lang.php.context.ignore ^(.+:|\s*\{?)$ + +# Perl + +lang.perl.filemask \.(?:pl|pm)$ +lang.perl.bangmask perl +lang.perl.format.default white bold +lang.perl.format.selection inverse +lang.perl.format.found yellow inverse +lang.perl.tokens.comments (#.*) +lang.perl.tokens.comments.format 8 bold +lang.perl.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.perl.tokens.constants.format yellow bold +lang.perl.tokens.symbols [!#^&*()\[\]{}/?=+\-\\|,<.>;:~] +lang.perl.tokens.symbols.format white +lang.perl.tokens.regular_expressions (\/.+?[^\\]\/) +lang.perl.tokens.regular_expressions.format red bold +lang.perl.tokens.doublequoted_strings (\".*?[^\\]\") +lang.perl.tokens.doublequoted_strings.format green bold +lang.perl.tokens.singlequoted_strings ('.*?[^\\]') +lang.perl.tokens.singlequoted_strings.format green bold +lang.perl.tokens.backquoted_strings (`.*?[^\\]`) +lang.perl.tokens.backquoted_strings.format red bold +lang.perl.tokens.reserved_words \b(unless|until|else|for|while|foreach|if|return|do|next|elsif|last|redo|continue|sub|goto)\b +lang.perl.tokens.reserved_words.format white +lang.perl.tokens.builtins \b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eval|exec|exists|exit|exp|fcntl|fileno|flock|fork|format|formline|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|local|localtime|lock|log|lstat|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ord|our|pack|package|pipe|pop|pos|print|printf|prototype|push|q|qq|qr|quotemeta|qw|qx|rand|read|readdir|readline|readlink|readpipe|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|sub|substr|symlink|syscall|sysopen|sysread|sysseek|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|use|utime|values|vec|wait|waitpid|wantarray|warn|write|y)\b +lang.perl.tokens.builtins.format cyan bold +lang.perl.tokens.array_variables \s(@[A-Za-z_][A-Za-z_0-9]*)\b +lang.perl.tokens.array_variables.format red bold +lang.perl.tokens.hash_variables \s(%[A-Za-z_][A-Za-z_0-9]*)\b +lang.perl.tokens.hash_variables.format magenta bold +lang.perl.indent.size 4 +lang.perl.indent.auto true +lang.perl.indent.roundup true +#lang.perl.indent.using_tabs true +lang.perl.indent.indenters (case|[{\[(]$) +lang.perl.indent.unindenters (case|^\s+[\]})]) +#lang.perl.indent.indenters \b(unless|else|for|while|foreach|if|do|elsif|sub)\b +#lang.perl.indent.unindenters \b(else)\b +lang.perl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(\/.+?[^\\]\/)|(^\s*#.*) +lang.perl.indent.ignore ^\s*$ +lang.perl.context.ignore ^(.+:|\s*\{?)$ + +# Python + +lang.python.filemask \.py$ +lang.python.bangmask python +lang.python.format.default white bold +lang.python.format.selection inverse +lang.python.format.found yellow inverse +lang.python.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.python.tokens.constants.format yellow bold +lang.python.tokens.symbols [@!#$%^&*()\[\]{}/?=+\-\\|,<.>;:~] +lang.python.tokens.symbols.format white +lang.python.tokens.comments (#.*) +lang.python.tokens.comments.format 8 bold +lang.python.tokens.doublequoted_strings (\".*?[^\\]\") +lang.python.tokens.doublequoted_strings.format green bold +lang.python.tokens.singlequoted_strings ('.*?[^\\]') +lang.python.tokens.singlequoted_strings.format green bold +lang.python.tokens.backquoted_strings (`.*?[^\\]`) +lang.python.tokens.backquoted_strings.format red bold +lang.python.tokens.reserved_words \b(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|yield)\b +lang.python.tokens.reserved_words.format white +lang.python.indent.size 4 +lang.python.indent.auto true +lang.python.indent.roundup true +#lang.python.indent.using_tabs true +lang.python.indent.indenters \b(class|def|elif|else|except|finally|for|if|try|while)\b +#lang.python.indent.indenters : +lang.python.indent.unindenters \b(else|elif|except)\b +lang.python.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) +lang.python.indent.ignore ^\s*$ + +# Java + +lang.java.filemask \.java$ +lang.java.format.default white bold +lang.java.format.selection inverse +lang.java.format.found yellow inverse +lang.java.tokens.doublequoted_strings (\".*?[^\\]\") +lang.java.tokens.doublequoted_strings.format green bold +lang.java.tokens.singlequoted_strings ('.*?[^\\]') +lang.java.tokens.singlequoted_strings.format green bold +lang.java.tokens.reserved_words \b(abstract|do|if|package|synchronized|boolean|double|implements|private|this|break|else|import|protected|throw|byte|extends|instanceof|public|throws|case|false|int|return|transient|catch|final|interface|short|true|char|finally|long|static|try|class|float|native|strictfp|void|const|for|new|super|volatile|continue|goto|null|switch|while|default|assert)\b +lang.java.tokens.reserved_words.format white +lang.java.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.java.tokens.constants.format yellow bold +lang.java.tokens.comments (\/\/.*) +lang.java.tokens.comments.format 8 bold +lang.java.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.java.tokens.symbols.format white +lang.java.tokens.long_comments.open \/\* +lang.java.tokens.long_comments.close \*\/ +lang.java.tokens.long_comments.format 8 bold +lang.java.indent.size 4 +lang.java.indent.auto true +lang.java.indent.roundup false +#lang.java.indent.using_tabs true +lang.java.indent.indenters (\{) +lang.java.indent.unindenters (\}) +lang.java.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.java.indent.ignore ^(.+:|\s*?)$ +lang.java.context.ignore ^(.+:|\s*\{?)$ + +# C + +lang.c.filemask \.(c(pp|xx)?|h)$ +lang.c.format.default white bold +lang.c.format.selection inverse +lang.c.format.found yellow inverse +lang.c.tokens.doublequoted_strings (\".*?[^\\]\") +lang.c.tokens.doublequoted_strings.format green bold +lang.c.tokens.singlequoted_strings ('.*?[^\\]') +lang.c.tokens.singlequoted_strings.format green bold +lang.c.tokens.reserved_words \b(if|double|break|else|byte|case|int|return|short|char|long|static|void|for|super|continue|goto|switch|while)\b +lang.c.tokens.reserved_words.format white +lang.c.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b +lang.c.tokens.constants.format yellow bold +lang.c.tokens.comments (\/\/.*) +lang.c.tokens.comments.format 8 bold +lang.c.tokens.preprocessor (^\s*#.*) +lang.c.tokens.preprocessor.format yellow bold +lang.c.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.c.tokens.symbols.format white +lang.c.tokens.long_comments.open \/\* +lang.c.tokens.long_comments.close \*\/ +lang.c.tokens.long_comments.format 8 bold +lang.c.indent.size 4 +lang.c.indent.auto true +lang.c.indent.roundup false +#lang.c.indent.using_tabs true +lang.c.indent.indenters (case|[{\[(]$) +lang.c.indent.unindenters (case|^\s+[\]})]) +lang.c.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.c.indent.ignore ^(.+:|\s*?)$ +lang.c.context.ignore ^(.+:|\s*\{?)$ + +# Configuration files + +lang.conf.filemask (?:\.conf(?:ig)?|\.cfg|\.cnf|user_prefs|XF86Config)$ +lang.conf.format.default white +lang.conf.format.selection inverse +lang.conf.format.found yellow inverse +lang.conf.tokens.commands ^\s*([^\s=]+) +lang.conf.tokens.commands.format cyan bold +lang.conf.tokens.comments (^\s*#.*) +lang.conf.tokens.comments.format yellow bold +lang.conf.tokens.doublequoted_strings (\".*?[^\\]\") +lang.conf.tokens.doublequoted_strings.format green bold +lang.conf.tokens.singlequoted_strings ('.*?[^\\]') +lang.conf.tokens.singlequoted_strings.format green bold +lang.conf.indent.size 4 +lang.conf.indent.auto true +lang.conf.indent.roundup true +#lang.conf.indent.using_tabs true + +# crontab + +lang.crontab.filemask (?:^|\/)crontab$ +lang.crontab.format.default white +lang.crontab.format.selection inverse +lang.crontab.format.found yellow inverse +lang.crontab.tokens.comments (^\s*#.*) +lang.crontab.tokens.comments.format yellow bold +lang.crontab.tokens.schedule ^((?:[0-9\/*,-]+\s+){5}) +lang.crontab.tokens.schedule.format cyan bold +lang.crontab.tokens.commands ^(\S+=.+) +lang.crontab.tokens.commands.format cyan +lang.crontab.indent.size 4 +lang.crontab.indent.auto true +lang.crontab.indent.roundup true +#lang.crontab.indent.using_tabs true + +lang.fstab.filemask ^fstab$ +lang.fstab.format.default white +lang.fstab.format.selection inverse +lang.fstab.format.found yellow inverse +lang.fstab.tokens.comments (^\s*#.*) +lang.fstab.tokens.comments.format yellow bold +lang.fstab.indent.size 4 +lang.fstab.indent.auto true +lang.fstab.indent.roundup true +#lang.fstab.indent.using_tabs true + +# SQL + +lang.sql.filemask \.sql$ +lang.sql.format.default white bold +lang.sql.format.selection inverse +lang.sql.format.found yellow inverse +lang.sql.indent.size 4 +lang.sql.indent.auto true +lang.sql.indent.roundup true +#lang.sql.indent.using_tabs true +lang.sql.tokens.reserved_words.case_insensitive \b(ABSOLUTE|ACCESS|ACTION|ADD|ADMIN|AFTER|ALIAS|ALL|ALLOCATE|AND|ANY|ARE|AS|ASC|ASSERTION|AT|AUDIT|AUTHORIZATION|AVG|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BOTH|BREADTH|BY|CASCADE|CASCADED|CASE|CAST|CATALOG|CHAR_LENGTH|CHARACTER_LENGTH|CHECK|CLASS|CLOSE|CLUSTER|COALESCE|COBOL|COLLATE|COLLATION|COLUMN|COMPLETION|COMPRESS|COMPUTED|CONCAT|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTINUE|CONVERT|CORRESPONDING|COUNT|CROSS|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURRENT|CURSOR|CYCLE|DATA|DAY|DBHIGH|DBKEY|DBLOW|DBMAC|DEALLOCATE|DECLARE|DECODE|DEFAULT|DEFERRABLE|DEFERRED|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISTINCT|DO|DOMAIN|EACH|ELEMENT|ELSE|ELSEIF|END-EXEC|END|EQUALS|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXISTS|EXTERNAL|EXTERNALLY|EXTRACT|FALSE|FILE|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FROM|FULL|FUNCTION|GENERAL|GET|GLOBAL|GO|GOTO|GROUP|HAVING|HOUR|IDENTIFIED|IDENTITY|IF|IGNORE|IMMEDIATE|IN|INCREMENT|INDEX|INDICATOR|INITIAL|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSTEAD|INTERSECT|INTERVAL|INTO|IS|ISOLATION|JOIN|KEY|LABEL|LANGUAGE|LAST|LEADING|LEAVE|LEFT|LESS|LEVEL|LIKE|LIMIT|LOCAL|LOCK|LOOP|LOWER|MATCH|MAX|MAXEXTENTS|MIN|MINUS|MINUTE|MLSLABEL|MLS_LABEL_FORMAT|MODE|MODIFY|MODULE|MONTH|MOVE|MULTISET|NAMES|NATIONAL|NATURAL|NEW_TABLE|NEXT|NO|NOAUDIT|NOCOMPRESS|NONE|NOT|NOWAIT|NULL|NULLIF|NUMBER|NVL|OCTET_LENGTH|OF|OFF|OFFLINE|OID|OLD|OLD_TABLE|ON|ONLINE|ONLY|OPEN|OPERATION|OPERATORS|OPTION|OR|ORDER|OTHERS|OUT|OUTER|OUTPUT|OVERLAPS|PAD|PARAMETER|PARTIAL|PASCAL|PCTFREE|PENDANT|PLI|POSITION|PRECISION|PREORDER|PRESERVE|PRIMARY|PRIOR|PRIVATE|PRIVILEGES|PROCEDURE|PROTECTED|PUBLIC|RAW|READ|READUP|REAL|RECORD|RECURSIVE|REF|REFERENCES|REFERENCING|RELATIVE|RENAME|REPLACE|REPRESENTATION|RESIGNAL|RESOURCE|RESTRICT|RETURN|RETURNS|RIGHT|ROLE|ROUTINE|ROW|ROWID|ROWNUM|ROWS|SAVEPOINT|SCHEMA|SCROLL|SEARCH|SECOND|SECTION|SENSITIVE|SEQUENCE|SESSION|SESSION_USER|SET|SHARE|SIGNAL|SIMILAR|SIZE|SOME|SPACE|SPECIFIC|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STRUCTURE|SUBSTRING|SUCCESSFUL|SUM|SYNONYM|SYSDATE|SYSTEM_USER|TABLE|TEMPLATE|TEMPORARY|TEST|THAN|THEN|THERE|SQ92|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TRAILING|TRANSACTION|TRANSLATE|TRANSLATION|TRIGGER|TRIM|TRUE|TUPLE|TYPE|UID|UNDER|UNION|UNIQUE|UNKNOWN|UPPER|USAGE|USER|USING|VALIDATE|VALUE|VALUES|VARIABLE|VARIANT|VIRTUAL|VARYING|VIEW|VISIBLE|VOID|WAIT|WHEN|WHENEVER|WHERE|WHILE|WITH|WITHOUT|WORK|WRITE|WRITEDOWN|WRITEUP|YEAR|ZONE)\b +lang.sql.tokens.reserved_words.format white +lang.sql.tokens.commands.case_insensitive \b(ALTER|COMMENT|COMMIT|CREATE|DELETE|DROP|EXEC|EXECUTE|FETCH|GRANT|INSERT|PERFORM|PREPARE|REVOKE|ROLLBACK|SELECT|UPDATE)\b +lang.sql.tokens.commands.format cyan +lang.sql.tokens.data_types.case_insensitive \b(BIT|BOOLEAN|CHAR|CHARACTER|DATE|DEC|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|INTERVAL|LONG|NCHAR|NUMBER|NUMERIC|REAL|RECORD|ROW|SMALLINT|STRUCTURE|TIME|TIMESTAMP|TUPLE|VARCHAR|VARCHAR2)\b +lang.sql.tokens.data_types.format brown +lang.sql.tokens.comments (--.*) +lang.sql.tokens.comments.format 8 bold +lang.sql.tokens.singlequoted_strings ('.*?[^\\]') +lang.sql.tokens.singlequoted_strings.format green bold +lang.sql.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.sql.tokens.symbols.format white +lang.sql.tokens.typos (==) +lang.sql.tokens.typos.format 15 bold +lang.sql.indent.indenters ((?:\(|BEGIN|DECLARE|FROM|LOOP|ORDER BY|SELECT|SET|WHERE)$) +lang.sql.indent.unindenters (^\s+(?:\)|;|BEGIN|DECLARE|END)) +lang.sql.indent.preventers (\".+?[^\\]\")|('.+?[^\\]') +lang.sql.context.ignore ^(\W+)$ + +# Bash + +lang.bash.filemask (?:\.(?:ebuild|bash_profile|bashrc))$ +lang.bash.bangmask (?:ba)?sh\b +lang.bash.format.default white bold +lang.bash.format.selection inverse +lang.bash.format.found yellow inverse +lang.bash.indent.size 4 +lang.bash.indent.auto true +lang.bash.indent.roundup true +#lang.bash.indent.using_tabs true +lang.bash.tabsize 4 +lang.bash.tokens.comments (^\s*#.*) +lang.bash.tokens.comments.format 8 bold +lang.bash.tokens.singlequoted_strings ('.*?[^\\]') +lang.bash.tokens.singlequoted_strings.format green bold +lang.bash.tokens.doublequoted_strings (\".*?[^\\]\") +lang.bash.tokens.doublequoted_strings.format green bold +lang.bash.tokens.backquoted_strings (`.*?[^\\]`) +lang.bash.tokens.backquoted_strings.format red bold +lang.bash.indent.indenters (\{) +lang.bash.indent.unindenters (\}) +lang.bash.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) +lang.bash.indent.ignore ^(.+:|\s*?)$ + +# Tcl + +lang.tcl.filemask \.tcl$ +lang.tcl.bangmask tcl +lang.tcl.format.default white bold +lang.tcl.format.selection inverse +lang.tcl.format.found yellow inverse +lang.tcl.indent.size 4 +lang.tcl.indent.auto true +lang.tcl.indent.roundup true +#lang.tcl.indent.using_tabs true +lang.tcl.tabsize 4 +lang.tcl.tokens.comments (^\s*#.*) +lang.tcl.tokens.comments.format 8 bold +lang.tcl.tokens.reserved_words \b(encoding|incr|pid|tcl_endOfWord|Tcl|eof|info|tcl_findLibrary|after|error|interp|pkg_mkIndex|tcl_startOfNextWord|append|eval|join|proc|tcl_startOfPreviousWord|array|exec|lappend|puts|tcl_wordBreakAfter|auto_execok|exit|lassign|pwd|tcl_wordBreakBefore|auto_import|expr|lindex|re_syntax|tcltest|auto_load|fblocked|linsert|read|tclvars|auto_mkindex|fconfigure|list|regexp|tell|auto_mkindex_old|fcopy|llength|registry|time|auto_qualify|file|load|regsub|trace|auto_reset|fileevent|lrange|rename|unknown|bgerror|filename|lrepeat|resource|unload|binary|flush|lreplace|return|unset|break|for|lsearch|scan|update|catch|foreach|lset|seek|uplevel|cd|format|lsort|set|upvar|clock|gets|memory|socket|variable|close|glob|msgcat|source|vwait|concat|global|namespace|split|while|continue|history|open|string|dde|http|package|subst|dict|if|parray|switch)\b +lang.tcl.tokens.reserved_words.format white +lang.tcl.tokens.symbols ([!@#$%\^&*()\[\]{}/?=+\-\\|,<.>;:]) +lang.tcl.tokens.symbols.format white +lang.tcl.tokens.variables (\$[A-Za-z_][A-Za-z_0-9]*)\b +lang.tcl.tokens.variables.format yellow bold +lang.tcl.tokens.doublequoted_strings (\".*?[^\\]\") +lang.tcl.tokens.doublequoted_strings.format green bold +lang.tcl.indent.indenters (\{) +lang.tcl.indent.unindenters (\}) +lang.tcl.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(\/\/.*) + +lang.diff.filemask (?:\.(?:diff|patch))$ +lang.diff.format.default white +lang.diff.format.selection inverse +lang.diff.format.found yellow inverse +lang.diff.indent.size 4 +lang.diff.indent.auto false +#lang.diff.indent.using_tabs true +lang.diff.tabsize 4 +lang.diff.tokens.oldfile (^--- .+$) +lang.diff.tokens.oldfile.format red bold +lang.diff.tokens.newfile (^\+\+\+ .+$) +lang.diff.tokens.newfile.format green bold +lang.diff.tokens.oldline (^-.+$) +lang.diff.tokens.oldline.format red bold +lang.diff.tokens.newline (^\+.+$) +lang.diff.tokens.newline.format green bold +lang.diff.tokens.location (^@@.+$) +lang.diff.tokens.location.format green +lang.diff.tokens.filediff (^Only in .+$) +lang.diff.tokens.filediff.format magenta bold +lang.diff.tokens.diff_command (^diff .+$) +lang.diff.tokens.diff_command.format 13 bold + +lang.yaml.filemask (?:\.ya?ml)$ +lang.yaml.bangmask ^--- +lang.yaml.format.default white bold +lang.yaml.format.selection inverse +lang.yaml.format.found yellow inverse +lang.yaml.indent.size 4 +lang.yaml.indent.auto false +lang.yaml.indent.roundup false +lang.yaml.tabsize 8 +lang.yaml.tokens.value_indicator (:)(?: |$) +lang.yaml.tokens.value_indicator.format white +lang.yaml.tokens.key_indicator (\? ) +lang.yaml.tokens.key_indicator.format white +lang.yaml.tokens.nested_series (?:^|[^-])(- ) +lang.yaml.tokens.nested_series.format magenta bold +lang.yaml.tokens.series_separator (,) +lang.yaml.tokens.series_separator.format white +lang.yaml.tokens.inline_series ([\[\]]) +lang.yaml.tokens.inline_series.format white +lang.yaml.tokens.inline_keyed ([{}]) +lang.yaml.tokens.inline_keyed.format white +lang.yaml.tokens.doublequoted_strings (\".*?[^\\]\"|\"\") +lang.yaml.tokens.doublequoted_strings.format green bold +lang.yaml.tokens.singlequoted_strings ('.*?[^\\]'|'') +lang.yaml.tokens.singlequoted_strings.format green bold +lang.yaml.tokens.block_scalar (\|[0-9+-]*)$ +lang.yaml.tokens.block_scalar.format blue bold +lang.yaml.tokens.folded_scalar (>[0-9+-]*)$ +lang.yaml.tokens.folded_scalar.format blue bold +lang.yaml.tokens.document_header ^(---.*)$ +lang.yaml.tokens.document_header.format 10 bold +lang.yaml.tokens.document_terminator ^(\.\.\.) +lang.yaml.tokens.document_terminator.format 10 +lang.yaml.tokens.directive_indicator ^(%.*) +lang.yaml.tokens.directive_indicator.format 10 +lang.yaml.tokens.comment_indicator (#.+) +lang.yaml.tokens.comment_indicator.format 8 bold +lang.yaml.tokens.anchor_indicator (&\w+) +lang.yaml.tokens.anchor_indicator.format red bold +lang.yaml.tokens.alias_indicator (\*\w+) +lang.yaml.tokens.alias_indicator.format yellow +lang.yaml.tokens.tag (!\w*) +lang.yaml.tokens.tag.format yellow bold +lang.yaml.tokens.null (~|null) +lang.yaml.tokens.null.format red +lang.yaml.indent.size 4 +lang.yaml.indent.auto true +lang.yaml.indent.roundup true +lang.yaml.indent.indenters :$ +lang.yaml.indent.preventers (\".+?[^\\]\")|('.+?[^\\]')|(`.+?[^\\]`)|(^\s*#.*) +lang.yaml.indent.ignore ^\s*$ + +#% SiSU +lang.sisu.filemask \.(?:sst|ssm|ssi|[_-]sst)$ +lang.sisu.format.default white +lang.sisu.tokens.comment ^%+\s+.* +lang.sisu.tokens.comment.format 8 +#langsisu.tokens.comments.format 8 bold +lang.sisu.tokens.header ^(@\S+?:|0~\S+)\s+.* +lang.sisu.tokens.header.format cyan +lang.sisu.tokens.heading ^:?[A-C1-9]~(?:\S+)?\s+.* +lang.sisu.tokens.heading.format yellow bold +#lang.sisu.tokens.heading.format white inverse +lang.sisu.tokens.headings.case_insensitive ^(?:Chapter|Part|Section|Book|Article|Preamble|Appendix)\s.* +lang.sisu.tokens.headings.format white bold +lang.sisu.tokens.bullet ^_[12]?\*\s+ +lang.sisu.tokens.bullet.format yellow +lang.sisu.tokens.indent ^_[12]\s+ +lang.sisu.tokens.indent.format yellow +lang.sisu.tokens.link \{.+?\}(?:http:\/\/\S+|image) +lang.sisu.tokens.link.format yellow +lang.sisu.tokens.url http:\/\/\S+ +lang.sisu.tokens.url.format blue bold +lang.sisu.tokens.line_bold ^!_\s+.* +lang.sisu.tokens.line_bold.format white bold +lang.sisu.tokens.font_bold [!*]\{.+?\}[!*] +lang.sisu.tokens.font_bold.format white bold +lang.sisu.tokens.font_modify [/_+-^,]\{.+?\}[/_+-^,] +lang.sisu.tokens.font_modify.format brown +lang.sisu.tokens.page_break <:(?:pb|np)> +lang.sisu.tokens.page_break.format white bold inverse +lang.sisu.tokens.br <(?:\/\s*)?br> +lang.sisu.tokens.br.format white bold inverse +lang.sisu.tokens.endnote_mark ~\^(?:\s|$) +lang.sisu.tokens.endnote_mark.format green +lang.sisu.tokens.endnote_content ^\^~\s.+ +lang.sisu.tokens.endnote_content.format green + +lang.sisu.tokens.endnote.open ~\{ +lang.sisu.tokens.endnote.close \}~ +lang.sisu.tokens.endnote.format green +#lang.sisu.tokens.endnotes ~\{.+?\}~ +#lang.sisu.tokens.endnotes.format green +lang.sisu.tokens.group.open ^group\{ +lang.sisu.tokens.group.close ^\}group +lang.sisu.tokens.group.format green +lang.sisu.tokens.poem.open ^poem\{ +lang.sisu.tokens.poem.close ^\}poem +lang.sisu.tokens.poem.format green +lang.sisu.tokens.code.open ^code\{ +lang.sisu.tokens.code.close ^\}code +lang.sisu.tokens.code.format green + +lang.sisu.tokens.error [a-zA-Z0-9,.::?!&]+http:\/\/\S+ +lang.sisu.tokens.error.format magenta + +# Custom configuration files can be included. +# If a setting is specified again, it overrides the previous setting given +# higher up in the configuration file(s). + +include ~/.diakonos/cucumber.conf diff --git a/data/sisu/conf/syntax/nanorc b/data/sisu/conf/syntax/nanorc new file mode 100644 index 00000000..82183131 --- /dev/null +++ b/data/sisu/conf/syntax/nanorc @@ -0,0 +1,220 @@ +## Sample initialization file for GNU nano +## Please note that you must have configured nano with --enable-nanorc +## for this file to be read! Also note that characters specially +## interpreted by the shell should not be escaped here. +## +## To make sure a value is not enabled, use "unset <option>" +## +## For the options that take parameters, the default value is given. +## Other options are unset by default. + +## Use auto-indentation. +# set autoindent + +## Backup files to filename~. +# set backup + +## The directory to put unique backup files in. +# set backupdir "" + +## Do backwards searches by default. +# set backwards + +## The characters treated as closing brackets. They cannot contain +## blank characters. Only closing punctuation, optionally followed by +## closing brackets, can end sentences. +## +# set brackets "'")}]>" + +## Do case sensitive searches by default. +# set casesensitive + +## Constantly display the cursor position in the statusbar. Note that +## this cancels out "quickblank". +# set const + +## Use cut to end of line by default. +# set cut + +## Set the line length for wrapping text and justifying paragraphs. +## If fill is 0 or less, the line length will be the screen width less +## this number. +## +# set fill -8 + +## Enable ~/.nano_history for saving and reading search/replace strings. +# set historylog + +## Use the blank line below the titlebar as extra editing space. +# set morespace + +## Enable mouse support, so that mouse clicks can be used to set the +## mark and run shortcuts. +# set mouse + +## Allow multiple file buffers (inserting a file will put it into a +## separate buffer). You must have configured with --enable-multibuffer +## for this to work. +## +# set multibuffer + +## Don't convert files from DOS/Mac format. +# set noconvert + +## Don't follow symlinks when writing files. +# set nofollow + +## Don't display the helpful shortcut lists at the bottom of the screen. +# set nohelp + +## Don't wrap text at all. +# set nowrap + +## Set operating directory. nano will not read or write files outside +## this directory and its subdirectories. Also, the current directory +## is changed to here, so files are inserted from this dir. A blank +## string means the operating directory feature is turned off. +## +# set operatingdir "" + +## Preserve the XON and XOFF keys (^Q and ^S). +# set preserve + +## The characters treated as closing punctuation. They cannot contain +## blank characters. Only closing punctuation, optionally followed by +## closing brackets, can end sentences. +## +# set punct ".?!" + +## Do quick statusbar blanking. Statusbar messages will disappear after +## 1 keystroke instead of 25. Note that "const" cancels this out. +## +# set quickblank + +## The email-quote string, used to justify email-quoted paragraphs. +## This is an extended regular expression if your system supports them, +## otherwise a literal string. Default: +# set quotestr "^([ ]*[\|>:}#])+" +## if you have regexps, otherwise: +# set quotestr "> " +## You can get old nano quoted-justify behavior via: +# set quotestr "(> )+" + +## Fix Backspace/Delete confusion problem. +# set rebinddelete + +## Do extended regular expression searches by default. +# set regexp + +## Make the Home key smarter. When Home is pressed anywhere but at the +## very beginning of non-whitespace characters on a line, the cursor +## will jump to that beginning (either forwards or backwards). If the +## cursor is already at that position, it will jump to the true +## beginning of the line. +# set smarthome + +## Use smooth scrolling as the default. +# set smooth + +## Use this spelling checker instead of the internal one. This option +## does not properly have a default value. +## +# set speller "aspell -x -c" + +## Allow nano to be suspended. +# set suspend + +## Use this tab size instead of the default; it must be greater than 0. +# set tabsize 8 + +## Convert typed tabs to spaces. +# set tabstospaces + +## Save automatically on exit, don't prompt. +# set tempfile + +## Disallow file modification; why would you want this in an rcfile? ;) +# set view + +## The two single-column characters used to display the first characters +## of tabs and spaces. 187 decimal (00BB hexadecimal) and 183 decimal +## (00B7 hexadecimal) seem to be good values for these. +# set whitespace " " + +## Color setup +## +## Format: +## +## syntax "short description" ["filename regex" ...] +## +## color foreground,background "regex" ["regex"...] +## or +## icolor foreground,background "regex" ["regex"...] +## +## "color" will do case sensitive matches, while "icolor" will do case +## insensitive matches. +## +## Legal colors: white, black, red, blue, green, yellow, magenta, cyan. +## You may use the prefix "bright" to mean a stronger color highlight +## for the foreground. +## +## To use multi-line regexes, use the start="regex" end="regex" format. +## +## If your system supports transparency, not specifying a background +## color will use a transparent color. If you don't want this, be sure +## to set the background color to black or white. +## +# syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$" +# color red "\<[A-Z_]{2,}\>" +# color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>" +# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" +# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>" +# color brightyellow "\<(try|throw|catch|operator|new|delete)\>" +# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" +# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'" +## color foreground,background "regex" ["regex"...] +## +#% sisu +syntax "sisu" "\.ss[tmi]$" +#color white,black ".*" +color cyan start="^0~" end="^$" +color cyan start="^@\S+:" end="^$" +#color cyan "^0~.*" +color brightyellow "^[1-6]~.*" +color brightyellow "^:?[A-C]~.*" +icolor brightwhite "^(Chapter|Part|Section|Book|Article|Preamble|Appendix)\s.*" +color brightyellow "^!_\s.*" +color brightyellow "[!*]\{.+?\}[!*]" +color yellow "[/_+-^,]\{.+?\}[/_+-^,]" +color green "~\{.+?\}~" +color green "~\^(\s|$)" +color green "^\^~\s.+" +#color green start="~\{" end="\}~" +color yellow "\{.+?\}http:\/\/\S+" +color brightblue "http:\/\/\S+" +color yellow "^(_[12]?\*|_[12])" +color magenta "^%+\s+.*" +color green start="^poem\{$" end="^\}poem$" +color green start="^code\{$" end="^\}code$" +color green start="^group\{$" end="^\}group$" +color green start="^alt\{$" end="^\}alt$" +color magenta "<:(pb|np)>" +color magenta "<(\/\s*)?br>" +color magenta "[a-zA-Z0-9,.::?!&]+http:\/\/\S+" + +# .nanorc +# + syntax "nanorc" "(\.|/|)nanorc$" +# highlight possible errors and parameters + icolor brightwhite "^[[:space:]]*(set|unset|syntax|i?color).*$" +# set, unset and syntax + icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>" + icolor green "^[[:space:]]*(set|unset|syntax)\>" +# colors + icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" + icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" +# strings + icolor white "\"(\\.|[^\"])*\"" +# comments + icolor blue "^[[:space:]]*#.*$" + diff --git a/data/sisu/conf/syntax/sisu-mode.el b/data/sisu/conf/syntax/sisu-mode.el new file mode 100644 index 00000000..3f56de1c --- /dev/null +++ b/data/sisu/conf/syntax/sisu-mode.el @@ -0,0 +1,235 @@ +;;; sisu-mode.el.el --- Major mode for editing .sisu-files + +;;; It mainly defines a grammar for syntax highlighting. +;;; SiSU http://www.jus.uio.no/sisu + +;;; Copyright 2005 Ralph Amissah + +;;; Author: Ralph Amissah <ralph.amissah@gmail.com> +;;; Version: $Id$ +;;; Keywords: perl sisu + +;;; This program is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 2, or (at your option) +;;; any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program; if not, write to the Free Software +;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Commentary: + +;;; This mode is built with help of the +;;; "Emacs language mode creation tutorial" at +;;; http://two-wugs.net/emacs/mode-tutorial.html +;;; +;;; Regexes are defined for the following font-lock-faces: +;;; +;;; font-lock-keyword-face +;;; font-lock-type-face +;;; font-lock-comment-face +;;; font-lock-reference-face +;;; font-lock-doc-string-face +;;; font-lock-function-name-face +;;; + +;;; Usage: + +;;; Put this file into your load-path and the following into your ~/.emacs: +;;; +;;; (require 'sisu-mode.el) +;;; +;;; +;;; To associate sisu-mode.el with .s[tmi] files add the following to your ~/.emacs +;;; +;;; (setq auto-mode-alist +;;; (append auto-mode-alist +;;; '(("\\.ss[tmi]$" . sisu-mode.el)))) +;;; +;;; +;;; To automatically turn on font-lock-mode add the following to your ~/.emacs +;;; +;;; (add-hook 'sisu-mode.el-hook 'font-lock-mode) +;;; +;;; Code: + +;; ;; default variables +;; (defvar sisu-mode.el-hook nil) +;; +;; (defvar sisu-mode-map +;; (let ((sisu-mode-map (make-keymap))) +;; (define-key wpdl-mode-map "\C-j" 'newline-and-indent) +;; sisu-mode-map) +;; "Keymap for SiSU major mode") +;; +;; (add-to-list 'auto-mode-alist '("\\.ss[tmi]\\'" . sisu-mode)) + +(defvar sisu-mode-hook nil) + +(defvar sisu-mode-map + (let ((sisu-mode-map (make-keymap))) + (define-key sisu-mode-map "\C-j" 'newline-and-indent) + sisu-mode-map) + "Keymap for SiSU major mode") +(add-to-list 'auto-mode-alist '("\\.ss[tmi]\\'" . sisu-mode)) + +(defconst sisu-font-lock-keywords-1 + (list + '("\\<\\(BOOK\\|CHAPTER\\).+" . font-lock-builtin-face) +; '("\\<\\(BOOK\\|CHAPTER\\)\\>" . font-lock-builtin-face) + '("\\('\\w*'\\)" . font-lock-variable-name-face)) + "Minimal highlighting expressions for SiSU mode") + +(defconst sisu-font-lock-keywords-2 + (append sisu-font-lock-keywords-1 + (list +; header + '("^0~.+" . font-lock-keyword-face) +; heading + '("^[1-6]~.+" . font-lock-keyword-face) +; bullet + '("\\<\\(_\\*\\|_[12]\\|_\\*[12]\\) " . font-lock-constant-face) +; font, bold italics etc. + '("^!_ .+" . font-lock-constant-face) + '("[/_+-^,]{.+?}[/_+-^,]" . font-lock-constant-face) + '("[!*]{.+?}[!*]" . font-lock-constant-face) +; endnotes + '("~{.+?}~" . font-lock-constant-face) + '("~\\^(\s\\|$)" . font-lock-constant-face) + '("^\\^~\s.+" . font-lock-constant-face) +; links + '("{.+?}http://[^ \n]+" . font-lock-constant-face) + '("http://[^ \n]+" . font-lock-constant-face) +; breaks + '("<:\\(pb\\|np\\)>" . font-lock-constant-face) + '("<\\(\s*/\\)?br>" . font-lock-constant-face) +; comments + '("[a-zA-Z0-9,.::?!&]+http://[^ \n]+" . font-lock-constant-face) + '("^%+ .+" . font-lock-constant-face) +; errors + '("[a-zA-Z0-9,.::?!&]+http://[^ \n]+" . font-lock-constant-face) +; not done +; multiline matches !! +; poem code group alt + '("^code{.+?}code" . font-lock-constant-face) +; '("\\http://[a-zA-Z0-9]+" . font-lock-constant-face) +; '("\\<\\(\\_\\*\\|\\_[12]\\|\\_\\*[12]\\) \\>" . font-lock-constant-face) +; select more appropriate matches + )) + "Additional Keywords to highlight in SiSU mode") + + (defconst sisu-font-lock-keywords-3 + (append sisu-font-lock-keywords-2 + (list +; '("\\<\\(0~\\|[1-6]~\\|!_ \\)\\>" . font-lock-constant-face) + )) + "Balls-out highlighting in SiSU mode") + +(defvar sisu-font-lock-keywords sisu-font-lock-keywords-3 + "Default highlighting expressions for SiSU mode") + + (defvar sisu-mode-syntax-table + (let ((sisu-mode-syntax-table (make-syntax-table))) + (modify-syntax-entry ?_ "w" sisu-mode-syntax-table) +; (modify-syntax-entry ?/ ". 124b" sisu-mode-syntax-table) + (modify-syntax-entry ?* ". 23" sisu-mode-syntax-table) + (modify-syntax-entry ?\n "> b" sisu-mode-syntax-table) + sisu-mode-syntax-table) + "Syntax table for sisu-mode") + +(defun sisu-mode () + "Major mode for editing Workflow Process Description Language files" + (interactive) + (kill-all-local-variables) + (set-syntax-table sisu-mode-syntax-table) + (use-local-map sisu-mode-map) + +(set (make-local-variable 'font-lock-defaults) '(sisu-font-lock-keywords)) +(setq major-mode 'sisu-mode) +(setq mode-name "SiSU") +(run-hooks 'sisu-mode-hook)) +(provide 'sisu-mode.el) + +;; ;; keymap +;; (defvar sisu-mode.el-map nil "Keymap for SiSU major mode.") +;; (if sisu-mode.el-map nil +;; (let ((map (make-sparse-keymap))) +;; ;; insert (define-key map ...) stuff here +;; (setq sisu-mode.el-map map))) +;; +;; syntax highlighting: standard keywords +;; (defconst sisu-font-lock-keywords-1 +;; '( +;; ("^\\(!_\\|_[12]\\|_*\\)" 0 font-lock-keyword-face) +;; ("^_[12]\\(.*\\)$" 1 font-lock-type-face) +;; ;; ("^[ \t]+\\(.*\\)$" 1 font-lock-type-face) +;; ) +;; "Minimal highlighting expressions for SiSU mode.") +;; +;; ;; syntax highlighting: additional keywords +;; (defconst sisu-font-lock-keywords-2 +;; (append sisu-font-lock-keywords-1 +;; '( +;; ("%+ \\(.*\\)" 2 font-lock-comment-face) +;; )) +;; "Additional Keywords to highlight in SiSU mode.") +;; +;; ;; syntax highlighting: even more keywords +;; (defconst sisu-font-lock-keywords-3 +;; (append sisu-font-lock-keywords-2 +;; '( +;; ("^0~.+" 1 font-lock-reference-face) +;; ("^[1-6]~.+" 2 font-lock-reference-face) +;; ;; ("[IBSCF]<\\([^>]*\\)>" 1 font-lock-reference-face) +;; ;; ("L<\\([^|>]*|\\)?\\([^>]+\\)>" 2 font-lock-reference-face) +;; ("L<\\([^|>]*\\)|\\([^>]*\\)>" 1 font-lock-doc-string-face) +;; ("E<\\([^>]*\\)>" 1 font-lock-function-name-face) +;; ("\"\\([^\"]+\\)\"" 0 font-lock-string-face) +;; )) +;; "Balls-out highlighting in SiSU mode.") +;; +;; ;; default level of highlight to maximum +;; (defvar sisu-font-lock-keywords sisu-font-lock-keywords-3 +;; "Default highlighting expressions for SiSU mode") +;; +;; ;; no special indenting, just pure text mode +;; (defun sisu-indent-line () +;; "Indent current line as SiSU code. Does nothing yet." +;; (interactive) +;; ) +;; +;; ;; no special syntax table +;; (defvar sisu-mode.el-syntax-table nil +;; "Syntax table for sisu-mode.el.") +;; +;; ;; create and activate syntax table +;; (defun sisu-create-syntax-table () +;; (if sisu-mode.el-syntax-table +;; () +;; (setq sisu-mode.el-syntax-table (make-syntax-table)) +;; (set-syntax-table sisu-mode.el-syntax-table) +;; )) + +;; main +; (defun sisu-mode.el () +; "Major mode for editing SiSU files." +; (interactive) +; (kill-all-local-variables) +; (sisu-create-syntax-table) +; (use-local-map sisu-mode.el-map) +; (make-local-variable 'font-lock-defaults) +; (setq font-lock-defaults '(sisu-font-lock-keywords 't)) +; ;; (make-local-variable 'indent-line-function) +; ;; (setq indent-line-function 'sisu-indent-line) +; (setq major-mode 'sisu-mode.el) +; (setq mode-name "SiSU") +; (run-hooks 'sisu-mode.el-hook)) + + +;;; sisu-mode.el ends here diff --git a/data/sisu/conf/syntax/sisu.lang b/data/sisu/conf/syntax/sisu.lang new file mode 100644 index 00000000..df126b23 --- /dev/null +++ b/data/sisu/conf/syntax/sisu.lang @@ -0,0 +1,90 @@ +<?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> diff --git a/data/sisu/conf/syntax/sisu.xml b/data/sisu/conf/syntax/sisu.xml new file mode 100644 index 00000000..d54483ac --- /dev/null +++ b/data/sisu/conf/syntax/sisu.xml @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language SYSTEM "language.dtd"> +<language name="SiSU" version="1.00" section="Markup" kateversion="2.4" extensions="*.sst; *.ssm; *.ssi; *._sst; *.-sst;" author="Ralph Amissah (ralph.amissah@gmail.com)" license="LGPL" > + <highlighting> + <list name="somename"> + <item> class </item> + <item> const </item> + </list> + <contexts> + <context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" > + <keyword attribute="Keyword" context="#stay" String="somename" /> + <DetectChar attribute="String" context="string" char=""" /> + <RegExpr String="^(0~\S+|@\S+)\s.+$" attribute="Header" context="#pop" /> + <RegExpr String="^:?[A-C1-6]~.+$" attribute="Heading" context="#pop" /> + <StringDetect String="~{" attribute="Endnote" context="footnote"/> + <StringDetect String="^~" attribute="Endnote" context="endnote"/> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + <StringDetect String="<br>" attribute="Break" context="#pop" /> + <RegExpr String="\{.+?\}(http:\/\/\S+|image)" attribute="Link" context="#stay"/> + <RegExpr String="(^|\s)http:\/\/\S+" attribute="Link" context="#stay"/> + <RegExpr String="^!_ .+" attribute="Bold" context="boldline"/> + <RegExpr String="^(_[12]|_\*|_[12]\*)\s" attribute="Indent" context="#stay"/> + <RegExpr String="~\^" attribute="Endnote" context="#stay"/> + <RegExpr String="^%+\s.+$" attribute="Comment" context="#stay" endRegion="regionMarker" firstNonSpace="true" /> + </context> + <context attribute="String" lineEndContext="#stay" name="string" > + <DetectChar attribute="String" context="#pop" char=""" /> + </context> + <context attribute="Endnote" lineEndContext="#stay" name="footnote" > + <StringDetect attribute="Endnote" context="#pop" String="}~" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Bold" lineEndContext="#stay" name="bold" > + <StringDetect attribute="Bold" context="#pop" String="}*" /> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Bold" lineEndContext="#stay" name="emphasis" > + <StringDetect attribute="Bold" context="#pop" String="}!" /> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Italic" lineEndContext="#stay" name="italic" > + <StringDetect attribute="Italic" context="#pop" String="}/" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Underscore" lineEndContext="#stay" name="underscore" > + <StringDetect attribute="Underscore" context="#pop" String="}_" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Superscript" lineEndContext="#stay" name="superscript" > + <StringDetect attribute="Superscript" context="#pop" String="}^" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Subscript" lineEndContext="#stay" name="subscript" > + <StringDetect attribute="Subscript" context="#pop" String="}," /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Strike" lineEndContext="#stay" name="strike" > + <StringDetect attribute="Strike" context="#pop" String="}-" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="+{" attribute="Insert" context="insert"/> + </context> + <context attribute="Insert" lineEndContext="#stay" name="insert" > + <StringDetect attribute="Insert" context="#pop" String="}+" /> + <StringDetect String="!{" attribute="Bold" context="emphasis"/> + <StringDetect String="*{" attribute="Bold" context="bold"/> + <StringDetect String="/{" attribute="Italic" context="italic"/> + <StringDetect String="_{" attribute="Underscore" context="underscore"/> + <StringDetect String="^{" attribute="Superscript" context="superscript"/> + <StringDetect String=",{" attribute="Subscript" context="subscript"/> + <StringDetect String="-{" attribute="Strike" context="strike"/> + </context> + <context attribute="Endnote" lineEndContext="#pop" name="endnote" /> + <context attribute="Bold" lineEndContext="#pop" name="boldline" /> + <context attribute="Indent" lineEndContext="#pop" name="indent" /> + </contexts> + <itemDatas> + <itemData name="Normal Text" defStyleNum="dsNormal" /> + <itemData name="Header" defStyleNum="dsNormal" color="#1c869b" selColor="#60FFFF" bold="0" italic="0"/> + <itemData name="Heading" defStyleNum="dsNormal" color="#ff0000" selColor="#60FFFF" bold="1" italic="0"/> + <itemData name="Bold" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="1" italic="0"/> + <itemData name="Italic" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="0" italic="1"/> + <itemData name="Underscore" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Superscript" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Subscript" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Strike" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Insert" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Keyword" defStyleNum="dsKeyword" /> + <itemData name="Endnote" defStyleNum="dsNormal" color="#086800" selColor="#60FFFF" bold="0" italic="0"/> + <itemData name="Link" defStyleNum="dsNormal" color="#0000FF" selColor="#60FFFF" bold="0" italic="0"/> + <itemData name="String" defStyleNum="dsString" /> + <itemData name="Comment" defStyleNum="dsComment"/> + <itemData name="Group" defStyleNum="dsRegionMarker"/> + <itemData name="Break" defStyleNum="dsNormal" color="#FF0000" selColor="#60FFFF" bold="0" italic="0"/> + <itemData name="Indent" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + <itemData name="Structure" defStyleNum="dsNormal" color="#F00000" selColor="#80FFD0" bold="0" italic="0"/> + </itemDatas> + </highlighting> + <general> + <keywords weakDeliminator="\" wordWrapDeliminator=",{}[]"/> + <comments> + <comment name="singleLine" start="%" /> + </comments> + </general> +</language> diff --git a/data/sisu/conf/syntax/sisu_nedit.pats b/data/sisu/conf/syntax/sisu_nedit.pats new file mode 100644 index 00000000..8e12cd5c --- /dev/null +++ b/data/sisu/conf/syntax/sisu_nedit.pats @@ -0,0 +1,79 @@ +! Nedit Syntax highlighting patterns and commenting for SiSU +! Version 0.1 +! +! INSTALLATION +! +! Load this pattern by starting nedit with: +! +! nedit -import <name of this file> +! +! Then, check that the patterns were loaded correctly, and choose Save Defaults +! from the Preferences menu. The new patterns will now be incorporated into +! your own .nedit file, so the next time you start NEdit, you will no longer +! need to use -import. +! +! These comments will not appear in your ~/.nedit +! +nedit.macroCommands: \ + SiSU Comments>Comment Out Lines@SiSU:::R: {\n\ + replace_in_selection("^.*$", "%+ &", "regex")\n\ + }\n\ + SiSU Comments>Uncomment Lines@SiSU:::R: {\n\ + replace_in_selection("(^[ \\\\t]*# ?)(.*)$", "\\\\2", "regex")\n\ + }\n\ + SiSU Comments>Comment Out Sel.@SiSU:::R: {\n\ + beginning-of-selection()\n\ + mark("1")\n\ + deselect-all()\n\ + insert-string("=begin\\n")\n\ + goto-mark("1")\n\ + beginning-of-selection()\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + backward-character("extend")\n\ + mark("1")\n\ + end-of-selection()\n\ + deselect-all()\n\ + insert-string("\\n=end")\n\ + goto-mark("1")\n\ + }\n\ + SiSU Comments>Uncomment Sel.@SiSU:::R: {\n\ + beginning-of-selection()\n\ + mark("1")\n\ + deselect-all()\n\ + replace("=begin\\n","")\n\ + goto-mark("1")\n\ + deselect-all()\n\ + replace("\\n=end","","backward")\n\ + goto-mark("1")\n\ + }\n +nedit.highlightPatterns: SiSU:1:0{\n\ + comment:"^%+ ":"$"::Comment::\n\ + endnote1:"~\\^(\s|$)":::Keyword::D\n\ + endnote2:"^\\^~ ":"$"::Comment::\n\ + header:"^0~":"$"::Keyword::\n\ + bold_line:"^!_ ":"$"::Keyword::\n\ + heading:"^[1-6]~":"$"::Keyword::\n\ + code_block:"^code\\{":"^\\}code"::Comment::\n\ + poem_block:"^poem\\{":"^\\}poem"::Comment::\n\ + group_block:"^group\\{":"^\\}group"::Comment::\n\ + alt_block:"^alt\\{":"^\\}alt"::Comment::\n\ + endnote:"~\\{":"\\}~":"\\n":String::\n\ + string2:"'":"'":"\\n":String1::\n\ + string escape chars:"\\\\(.|\\n)":::String1:endnote:\n\ + character constant:"'":"'":"[^\\\\][^']":Character Const::\n\ + numeric constant:"<((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?>":::Plain::D\n\ + storage keyword:"<(class)>":::Storage Type::D\n\ + line:"^(_[12]|_\\*|_[12]\\*)":::Keyword::D\n\ + link:"[{}](http://[a-zA-Z0-9?.!+\\-_/&=#]+)?":::Keyword::D\n\ + url:"http://[a-zA-Z0-9?.!+\\-_/&=#]+":::Keyword::D\n\ + } +! endnote:"~\\{":"\\}~"::Keyword::\n\ +! link:"\\{":"\\}http://\S+"::Keyword::D\n\ +nedit.languageModes: SiSU:.sst::::::".,/\\`'!|@#%^&*()-=+{}[]"":;<>?~" +! nedit.languageModes: SiSU:.sst::::::".,/\\`'!|@#%^&*()-=+{}[]"":;<>?~" +! nedit.languageModes: SiSU:.ss[tmi]:::::: |