erb.nanorc 1.3 KB

12345678910111213141516171819202122232425
  1. ## A HTML+Ruby set for Syntax Highlighting .erb files (Embedded RubyRails Views etc) ERB
  2. ## (c) 2009, Georgios V. Michalakidis - g.michalakidis@computer.org
  3. ## Licensed under the CC (Creative Commons) License.
  4. ##
  5. ## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
  6. syntax "erb" "\.erb$" "\.rhtml$"
  7. color blue start="<" end=">"
  8. color white start="<%" end="%>"
  9. color red "&[^;[[:space:]]]*;"
  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)\>"
  11. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
  12. icolor magenta "([ ]|^):[0-9A-Z_]+\>"
  13. color brightyellow "\<(__FILE__|__LINE__)\>"
  14. color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  15. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  16. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  17. color brightgreen "#\{[^}]*\}"
  18. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  19. color cyan "#[^{].*$" "#$"
  20. color brightcyan "##[^{].*$" "##$"
  21. color green start="<<-?'?EOT'?" end="^EOT"
  22. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"