mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-27 01:10:30 +09:00
* Added title setting (Requires tcell pull!) and optimized tab display. * Added Clojure highlighting. * Changed tcell call to screen. * Fixed bad reference for getting Buffer name. * Yet another massive syntax overhaul * Tweaking and testing web syntax * More webdev goodies * Added html5 highlighting and strict html4 highlighting. * Documentation update
44 lines
2.8 KiB
Plaintext
44 lines
2.8 KiB
Plaintext
## A HTML+Ruby set for Syntax Highlighting .erb files (Embedded RubyRails Views etc) ERB
|
|
## (c) 2009, Georgios V. Michalakidis - g.michalakidis@computer.org
|
|
## Licensed under the CC (Creative Commons) License.
|
|
##
|
|
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
|
|
#Note for dummies like me who had no idea what Embedded Ruby is:
|
|
# https://en.wikipedia.org/wiki/ERuby
|
|
# It's like Ruby for your browser. Heh. Cheers, CaptainMcClellan
|
|
|
|
syntax "erb" "\.erb$" "\.rhtml$"
|
|
#Highlights from html-land
|
|
color error "<[^!].*?>"
|
|
color symbol.tag "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
|
|
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>"
|
|
color preproc "(?i)<[/]?(script|style)( .*|>)*?>"
|
|
color special "&[^;[[:space:]]]*;"
|
|
color symbol "[:=]"
|
|
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
|
|
color constant.string ""[^"]*""
|
|
color constant.number "(?i)#[0-9A-F]{6,6}"
|
|
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
|
color comment "<!--.+?-->"
|
|
color preproc "<!DOCTYPE.+?>"
|
|
## The tags that were here before. Disabled now.
|
|
#color symbol.tag start="<" end=">"
|
|
#Reset syntax highlighting for ruby
|
|
color default start="<%" end="%>"
|
|
color preproc "<%|%>"
|
|
color red "&[^;[[:space:]]]*;"
|
|
color statement "\b(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)\b"
|
|
color identifier.var "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
|
|
color magenta "(?i)([ ]|^):[0-9A-Z_]+\b"
|
|
color identifier.macro "\b(__FILE__|__LINE__)\b"
|
|
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
|
color brightblue "`[^`]*`" "%x\{[^}]*\}"
|
|
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
|
color brightgreen "#\{[^}]*\}"
|
|
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
|
color comment "#[^{].*$" "#$"
|
|
color comment.bright "##[^{].*$" "##$"
|
|
color identifier.macro start="<<-?'?EOT'?" end="^EOT"
|
|
color todo "(XXX|TODO|FIXME|\?\?\?)"
|
|
|