home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / nano / ruby.nanorc < prev    next >
Encoding:
Text File  |  2006-07-10  |  1.4 KB  |  30 lines

  1. ## Here is an example for Ruby.
  2. syntax "ruby" "\.rb$"
  3. ## Asciibetical list of reserved words
  4. 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)\>"
  5. ## Constants
  6. color brightblue "(\$|@|@@)?[A-Z]+[0-9A-Z_a-z]*"
  7. ## Ruby "symbols"
  8. icolor magenta "([     ]|^):[0-9A-Z_]+\>"
  9. ## Some unique things we want to stand out
  10. color brightyellow "\<(__FILE__|__LINE__)\>"
  11. ## Regular expressions
  12. color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  13. ## Shell command expansion is in `backticks` or like %x{this}.  These are
  14. ## "double-quotish" (to use a perlism).
  15. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  16. ## Strings, double-quoted
  17. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  18. ## Expression substitution.  These go inside double-quoted strings,
  19. ## "like #{this}".
  20. color brightgreen "#\{[^}]*\}"
  21. ## Strings, single-quoted
  22. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  23. ## Comments
  24. color cyan "#[^{].*$" "#$"
  25. color brightcyan "##[^{].*$" "##$"
  26. ## "Here" docs
  27. color green start="<<-?'?EOT'?" end="^EOT"
  28. ## Some common markers
  29. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
  30.