1
0
mirror of https://github.com/scopatz/nanorc synced 2024-09-21 05:56:00 +02:00
nanorc/nanorc.nanorc
Jeppe Fihl-Pearson 74c48dd85c Support all the .nanorc keywords
The list was taken from https://www.nano-editor.org/dist/latest/nanorc.5.html.
Previously the list of keywords were split into two regexes, this didn't seem
to serve any purpose besides making the code harder to read, so I have
collapsed them together into one.
2019-07-27 08:53:05 +01:00

17 lines
1.3 KiB
Plaintext

## Here is an example for nanorc files.
##
syntax "Nanorc" "\.?nanorc$"
## Possible errors and parameters
icolor brightred "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
## Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backupdir|boldtext|brackets|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|errorcolor|fill|functioncolor|guidestripe|historylog|jumpyscrolling|keycolor|linenumbers|locking|matchbrackets|morespace|mouse|multibuffer|noconvert|nohelp|nonewlines|nopauses|nowrap|numbercolor|operatingdir|positionlog|preserve|punct|quickblank|quotestr|rawsequences|rebinddelete|regexp|selectedcolor|showcursor|smarthome|smooth|softwrap|speller|statuscolor|stripecolor|suspend|tabsize|tabstospaces|tempfile|titlecolor|trimblanks|unix|view|whitespace|wordbounds|wordchars|zap)\>"
icolor green "^[[:space:]]*(bind|set|unset|syntax|header|include|magic)\>"
## Colors
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)="
## Strings
icolor white ""(\\.|[^"])*""
## Comments
icolor brightblue "^[[:space:]]*#.*$"
icolor cyan "^[[:space:]]*##.*$"