2006-06-01 22:35:39 +04:00
|
|
|
## Here is an example for nanorc files.
|
2014-05-13 21:58:39 +04:00
|
|
|
|
2018-02-07 13:25:46 +03:00
|
|
|
syntax nanorc "\.?nanorc$"
|
2016-05-25 23:13:50 +03:00
|
|
|
comment "#"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2018-08-09 22:12:10 +03:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Keywords
|
2018-04-30 23:10:27 +03: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 20:32:08 +03: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 11:50:54 +03: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 21:40:53 +03: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 22:12:10 +03: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 21:58:39 +04:00
|
|
|
|
2017-12-03 21:55:03 +03:00
|
|
|
# Strings
|
|
|
|
color brightmagenta "".+"([[:space:]]|$)"
|
|
|
|
|
2014-05-13 21:58:39 +04:00
|
|
|
# Colors
|
2018-03-27 20:32:08 +03: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 22:35:39 +04:00
|
|
|
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Comments
|
2016-11-12 15:00:09 +03:00
|
|
|
color brightblue "(^|[[:space:]]+)#.*$"
|
|
|
|
color cyan "^[[:space:]]*##.*$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Trailing whitespace
|
2014-03-24 16:45:20 +04:00
|
|
|
color ,green "[[:space:]]+$"
|