2006-06-01 22:35:39 +04:00
|
|
|
## Here is an example for nanorc files.
|
2014-05-13 21:58:39 +04:00
|
|
|
|
2006-06-01 22:35:39 +04:00
|
|
|
syntax "nanorc" "\.?nanorc$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2014-03-21 17:59:29 +04:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Keywords
|
2016-02-26 12:04:54 +03: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-08 00:27:21 +04: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-06 00:48:31 +04:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
|
2016-01-31 16:20:40 +03: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 10:24:17 +03:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter|formatter)[[:space:]]+.*$"
|
2015-06-20 11:31:27 +03:00
|
|
|
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|formatter|extendsyntax)\>"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Colors
|
2006-06-01 22:35:39 +04: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 21:58:39 +04:00
|
|
|
|
|
|
|
# Strings
|
2014-03-21 17:59:29 +04:00
|
|
|
icolor brightmagenta ""(\\.|[^"])*""
|
2014-05-13 21:58:39 +04:00
|
|
|
# Comments
|
2016-01-17 19:15:08 +03:00
|
|
|
icolor brightblue "(^|[[:space:]]+)#.*$"
|
2006-06-03 16:41:02 +04:00
|
|
|
icolor cyan "^[[:space:]]*##.*$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Trailing whitespace
|
2014-03-24 16:45:20 +04:00
|
|
|
color ,green "[[:space:]]+$"
|