1 ## Here is an example for Ruby.
3 syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
4 header "^#!.*/(env +)?ruby( |$)"
9 ## Asciibetical list of reserved words
10 color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
12 color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
14 icolor magenta "([ ]|^):[0-9A-Z_]+\>"
15 ## Some unique things we want to stand out
16 color brightyellow "\<(__FILE__|__LINE__)\>"
17 ## Regular expressions
18 color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
19 ## Shell command expansion is in `backticks` or like %x{this}. These are
20 ## "double-quotish" (to use a perlism).
21 color brightblue "`[^`]*`" "%x\{[^}]*\}"
22 ## Strings, double-quoted
23 color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
24 ## Expression substitution. These go inside double-quoted strings,
26 color brightgreen "#\{[^}]*\}"
27 ## Strings, single-quoted
28 color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
30 color cyan "#[^{].*$" "#$"
31 color brightcyan "##[^{].*$" "##$"
33 color green start="<<-?'?EOT'?" end="^EOT"
34 ## Some common markers
35 color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
37 color ,green "[[:space:]]+$"