Include files The "include" command would load another nanorc file so each syntax could be stored in a separate file. Color commands could still be used before and after the include command. The "syntax", "set", "unset" and "include" commands would not be allowed in included files. syntax "html" "\.(shtml|html|htm)$" include "/etc/nano/html.nanorc" color red "..." Case-insensitive regular expressions color red nocase "..." OR icolor red "..." Colors preceded with "or" would only be evaluated if the previous color doesn't match. color red "..." or color blue "..." or color green "..." color yellow "..." If the red expression matches then blue and green are skipped. Stopping evaluation on matches If statement before the "break" command matches then no other REs would be applied to the matched text. The "or" command skips over specified REs on a match, this command would skip over all REs. color red "..." break Items Only useful when the same expression must be evaluated multiple times. Something like a string might need to be evaluated for the main body and inside color scopes (see below). item string { color white "\"(\\.|[^\"])*\"" } eval string All but the first color command in an item would have an implicit "or" and the item would return the match status. eval foo or eval bar or color baz "..." Items could also force a single color, using a color with the color command would generate an error. item foo red { color "..." color "..." } Color scopes # html tags color yellow start="<[a-zA-Z/][a-zA-Z0-9]*" end=">" { # this block is evaluated for the text between # the start and end expressions color brightblack "[a-zA-Z0-9_-]+=([a-zA-Z0-9/_-]+)?" color brightwhite "[a-zA-Z0-9_-]+=[a-zA-Z0-9/_-]+%" eval string } color red "..." { # these REs are applied to the entire match } Multi-line regular expressions color red "foo" "(bar" . "|baz)" "(bar" and "|baz)" would be joined to form "(bar|baz)" "foo" would not be joined Using the `file` command to select syntax syntax "bash" "\.sh$" filetype "/bin/(sh|bash) script" Nano would call the system's `file` command which returns a string description of the file type. The regular expression from the 'filetype' command would be evaluated against the file string only when the regular expression from the syntax command failed. The 'filetype' command would need to follow the syntax command. Loading .nanorc files from the current directory Nano source uses tabsize = 8, my tabsize is set to 4 and its a pain to use -T. :)