1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-25 09:55:40 +01:00
nanorc/erb.nanorc

27 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-08-02 10:05:51 +02:00
## 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
syntax "ERB" "\.erb$" "\.rhtml$"
2014-08-02 10:05:51 +02:00
color blue start="<" end=">"
color white start="<%" end="%>"
color red "&[^;[[:space:]]]*;"
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)\>"
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
icolor magenta "([ ]|^):[0-9A-Z_]+\>"
color brightyellow "\<(__FILE__|__LINE__)\>"
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
color brightblue "`[^`]*`" "%x\{[^}]*\}"
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color brightgreen "#\{[^}]*\}"
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
color cyan "#[^{].*$" "#$"
color brightcyan "##[^{].*$" "##$"
color green start="<<-?'?EOT'?" end="^EOT"
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
2016-12-06 21:58:21 +01:00
## Trailing spaces
color ,green "[[:space:]]+$"