2006-06-01 18:35:39 +00:00
|
|
|
## Here is an example for nanorc files.
|
2014-05-13 17:58:39 +00:00
|
|
|
|
2018-02-07 10:25:46 +00:00
|
|
|
syntax nanorc "\.?nanorc$"
|
2016-05-25 20:13:50 +00:00
|
|
|
comment "#"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2018-08-09 19:12:10 +00:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Keywords
|
2018-04-30 20:10:27 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|fill[[:space:]]+-?[[:digit:]]+|historylog|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|trimblanks|unix|view|wordbounds)\>"
|
2018-03-27 17:32:08 +00:00
|
|
|
icolor yellow "^[[:space:]]*set[[:space:]]+((error|function|key|number|selected|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"
|
2018-02-20 08:50:54 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
|
2018-08-05 18:40:53 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+([[:alpha:]]+|".*")[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
|
|
|
|
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
|
2018-08-09 19:12:10 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*$"
|
|
|
|
icolor brightgreen "^[[:space:]]*(syntax|linter)[[:space:]]+[^[:blank:]]+"
|
|
|
|
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|extendsyntax)\>"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
2017-12-03 18:55:03 +00:00
|
|
|
# Strings
|
|
|
|
color brightmagenta "".+"([[:space:]]|$)"
|
|
|
|
|
2014-05-13 17:58:39 +00:00
|
|
|
# Colors
|
2018-03-27 17:32:08 +00:00
|
|
|
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"
|
2006-06-01 18:35:39 +00:00
|
|
|
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Comments
|
2016-11-12 12:00:09 +00:00
|
|
|
color brightblue "(^|[[:space:]]+)#.*$"
|
|
|
|
color cyan "^[[:space:]]*##.*$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Trailing whitespace
|
2014-03-24 12:45:20 +00:00
|
|
|
color ,green "[[:space:]]+$"
|