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$"
|
2016-05-25 20:13:50 +00:00
|
|
|
comment "#"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2016-05-25 20:13:50 +00:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|comment|magic|linter|i?color|extendsyntax).*$"
|
2014-05-13 17:58:39 +00:00
|
|
|
|
|
|
|
# Keywords
|
2017-03-23 19:50:15 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cut|fill[[:space:]]+[[:digit:]]+|historylog|justifytrim|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[[:digit:]]+|tabstospaces|tempfile|unix|view|wordbounds)\>"
|
2016-11-12 12:00:09 +00:00
|
|
|
icolor yellow "^[[:space:]]*set[[:space:]]+((function|key|number|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" "[[:space:]]+[[:digit:]]+$"
|
2016-10-20 08:07:48 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
|
2016-10-11 18:57:57 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
|
|
|
|
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
|
2016-05-25 20:13:50 +00:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter|formatter)[[:space:]]+.*$"
|
|
|
|
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|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
|
2016-11-12 12:00:09 +00:00
|
|
|
color brightmagenta ""(\\.|[^"])*""
|
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:]]+$"
|