2006-06-01 18:35:39 +00:00
|
|
|
## Here is an example for nanorc files.
|
2014-05-13 17:58:39 +00:00
|
|
|
|
2006-06-01 18:35:39 +00:00
|
|
|
syntax "nanorc" "\.?nanorc$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2014-03-21 13:59:29 +00:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Keywords
|
2016-02-26 09:04:54 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const(antshow)?|cut|fill|historylog|justifytrim|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)\>"
|
2014-08-07 20:27:21 +00:00
|
|
|
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))?\>"
|
2014-05-05 20:48:31 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
|
2016-01-31 13:20:40 +00:00
|
|
|
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:]]*$)"
|
2015-01-03 07:24:17 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter|formatter)[[:space:]]+.*$"
|
2015-06-20 08:31:27 +00:00
|
|
|
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|formatter|extendsyntax)\>"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Colors
|
2006-06-01 18:35:39 +00:00
|
|
|
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
|
|
|
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Strings
|
2014-03-21 13:59:29 +00:00
|
|
|
icolor brightmagenta ""(\\.|[^"])*""
|
2014-05-13 17:58:39 +00:00
|
|
|
# Comments
|
2016-01-17 16:15:08 +00:00
|
|
|
icolor brightblue "(^|[[:space:]]+)#.*$"
|
2006-06-03 12:41:02 +00:00
|
|
|
icolor cyan "^[[:space:]]*##.*$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Trailing whitespace
|
2014-03-24 12:45:20 +00:00
|
|
|
color ,green "[[:space:]]+$"
|