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-11-03 20:12:44 +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
|
2019-03-03 10:56:56 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|finalnewline|historylog|jumpyscrolling|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabstospaces|tempfile|trimblanks|unix|view|wordbounds|zap)\>"
|
2019-03-03 10:04:19 +00:00
|
|
|
icolor yellow "^[[:space:]]*set[[:space:]]+((error|function|key|number|selected|status|stripe|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"
|
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|stripecolor|titlecolor|whitespace|wordchars)[[:space:]]+"
|
2019-03-03 10:56:56 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(fill[[:space:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:space:]]+[1-9][0-9]*)\>"
|
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-11-03 20:12:44 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*"
|
2018-08-09 19:12:10 +00:00
|
|
|
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
|
2019-04-02 09:48:42 +00:00
|
|
|
color brightmagenta "([[:space:]]|(start|end)=)".+"([[:space:]]|$)"
|
2017-12-03 18:55:03 +00:00
|
|
|
|
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
|
2018-11-03 20:12:44 +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:]]+$"
|