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$"
|
2016-05-25 23:13:50 +03:00
|
|
|
comment "#"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Possible errors and parameters
|
2017-07-14 16:32:56 +03:00
|
|
|
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|i?color|extendsyntax).*$"
|
2014-05-13 21:58:39 +04:00
|
|
|
|
|
|
|
# Keywords
|
2017-07-14 17:06:52 +03:00
|
|
|
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|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:]]+[1-9][0-9]*|tabstospaces|tempfile|unix|view|wordbounds)\>"
|
2017-09-25 22:37:13 +03:00
|
|
|
icolor yellow "^[[:space:]]*set[[:space:]]+((function|key|number|selected|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
2017-07-29 21:24:42 +03:00
|
|
|
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
|
2016-10-11 21:57:57 +03: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 23:13:50 +03:00
|
|
|
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter|formatter)[[:space:]]+.*$"
|
2017-07-14 16:32:56 +03:00
|
|
|
icolor brightgreen "^[[:space:]]*(linter|formatter)[[:space:]]+[[:alpha:]]+"
|
2016-05-25 23:13:50 +03:00
|
|
|
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|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
|
2016-11-12 15:00:09 +03:00
|
|
|
color brightmagenta ""(\\.|[^"])*""
|
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:]]+$"
|