fzf added to the bashrc
[dotfiles/.git] / .nano / ruby.nanorc
1 ## Here is an example for Ruby.
2 ##
3 syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
4 header "^#!.*/(env +)?ruby( |$)"
5 magic "Ruby script"
6 linter ruby -w -c
7 comment "#"
8
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)\>"
11 ## Constants
12 color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
13 ## Ruby "symbols"
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,
25 ## "like #{this}".
26 color brightgreen "#\{[^}]*\}"
27 ## Strings, single-quoted
28 color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
29 ## Comments
30 color cyan "#[^{].*$" "#$"
31 color brightcyan "##[^{].*$" "##$"
32 ## "Here" docs
33 color green start="<<-?'?EOT'?" end="^EOT"
34 ## Some common markers
35 color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
36 ## Trailing spaces
37 color ,green "[[:space:]]+$"