## Here is an example for nanorc files.

syntax "nanorc" "\.?nanorc$"

# Possible errors and parameters
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$"

# Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const(antshow)?|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nohelp|nonewlines|nowrap|pos(ition)?log|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|unix|view|wordbounds|justifytrim)\>"
icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor|statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9^_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9^_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter|formatter)[[:space:]]+.*$"
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|formatter|extendsyntax)\>"

# Colors
icolor brightwhite "^[[:space:]]*i?color[[:space:]]*brightwhite\>"
icolor white "^[[:space:]]*i?color[[:space:]]*white\>"
icolor ,white "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,white\>"
icolor brightblack "^[[:space:]]*i?color[[:space:]]*brightblack\>"
icolor black "^[[:space:]]*i?color[[:space:]]*black\>"
icolor ,black "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,black\>"
icolor brightred "^[[:space:]]*i?color[[:space:]]*brightred\\>"
icolor red "^[[:space:]]*i?color[[:space:]]*red\>"
icolor ,red "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,red\>"
icolor brightblue "^[[:space:]]*i?color[[:space:]]*brightblue\>"
icolor blue "^[[:space:]]*i?color[[:space:]]*blue\>"
icolor ,blue "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,blue\>"
icolor brightgreen "^[[:space:]]*i?color[[:space:]]*brightgreen\>"
icolor green "^[[:space:]]*i?color[[:space:]]*green\>"
icolor ,green "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,green\>"
icolor brightyellow "^[[:space:]]*i?color[[:space:]]*brightyellow\>"
icolor yellow "^[[:space:]]*i?color[[:space:]]*yellow\>"
icolor ,yellow "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,yellow\>"
icolor brightmagenta "^[[:space:]]*i?color[[:space:]]*brightmagenta\>"
icolor magenta "^[[:space:]]*i?color[[:space:]]*magenta\>"
icolor ,magenta "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,magenta\>"
icolor brightcyan "^[[:space:]]*i?color[[:space:]]*brightcyan\>"
icolor cyan "^[[:space:]]*i?color[[:space:]]*cyan\>"
icolor ,cyan "^[[:space:]]*i?color[[:space:]]*[[:alpha:]]*,cyan\>"
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="

# Strings
icolor brightmagenta ""(\\.|[^"])*""
# Comments
icolor brightblue "(^|[[:space:]]+)#.*$"
icolor cyan "^[[:space:]]*##.*$"

# Trailing whitespace
color ,green "[[:space:]]+$"
