Mercurial > repos > other > linux
comparison nanorc.d/nanorc.nanorc @ 90:4342e7b19fa8
Standardise nanorc colouring with other file types
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 02 Apr 2018 17:20:47 +0100 |
parents | |
children | 5f2c5800fa8a |
comparison
equal
deleted
inserted
replaced
89:a5810e6bed7e | 90:4342e7b19fa8 |
---|---|
1 ## Here is an example for nanorc files. | |
2 | |
3 syntax nanorc "\.?nanorc$" | |
4 comment "#" | |
5 | |
6 # Possible errors and parameters | |
7 icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|i?color|extendsyntax).*$" | |
8 | |
9 # Keywords | |
10 icolor brightmagenta "^[[:space:]]*(set|unset)[[:space:]]+(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)\>" | |
11 icolor yellow "^[[:space:]]*set[[:space:]]+((error|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))?\>" | |
12 icolor brightmagenta "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+" | |
13 icolor brightmagenta "^[[: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:]]*$)" | |
14 icolor brightmagenta "^[[: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:]]*$)" | |
15 icolor brightmagenta "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter|formatter)[[:space:]]+.*$" | |
16 icolor brightmagenta "^[[:space:]]*(syntax|linter|formatter)[[:space:]]+[^[:blank:]]+" | |
17 icolor magenta "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|extendsyntax)\>" | |
18 | |
19 # Strings | |
20 color yellow "".+"([[:space:]]|$)" | |
21 | |
22 # Colors | |
23 icolor brightmagenta "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" | |
24 icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" | |
25 | |
26 # Comments | |
27 color green "(^|[[:space:]]+)#.*$" | |
28 color green "^[[:space:]]*##.*$" | |
29 | |
30 # Trailing whitespace | |
31 color ,green "[[:space:]]+$" |