in nanorc.sample, banish " " whever possible in favor of "[[:space:]]"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
9d658cec7a
commit
bec2606ce2
|
@ -356,6 +356,12 @@ CVS code -
|
||||||
- Add "cxx" and "hxx" to the list of extensions that the
|
- Add "cxx" and "hxx" to the list of extensions that the
|
||||||
"c-file" regexes apply to, and add "warning" and "error" to
|
"c-file" regexes apply to, and add "warning" and "error" to
|
||||||
them as well. (Mike Frysinger)
|
them as well. (Mike Frysinger)
|
||||||
|
- In the preprocessor directives regex string in the "c-file"
|
||||||
|
regexes, cover more whitespace characters than just " " by
|
||||||
|
using "[[:space:]]" instead. (Mike Frysinger) DLR: Extend
|
||||||
|
this to other regex strings whenever possible.
|
||||||
|
- Move some overly long split-up regex strings that cover
|
||||||
|
similar areas onto the same line. (DLR)
|
||||||
- nanorc.5:
|
- nanorc.5:
|
||||||
- Update the description of how the "color" regex works. (DLR)
|
- Update the description of how the "color" regex works. (DLR)
|
||||||
- Clarify descriptions of the characters that aren't allowed
|
- Clarify descriptions of the characters that aren't allowed
|
||||||
|
|
|
@ -162,17 +162,17 @@
|
||||||
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||||
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
|
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
|
||||||
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||||
# color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||||
# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
|
# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
|
||||||
##
|
##
|
||||||
## You will in general want your comments and strings to come last,
|
## You will in general want your comments and strings to come last,
|
||||||
## because syntax highlighting rules will be applied in the order they
|
## because syntax highlighting rules will be applied in the order they
|
||||||
## are read in.
|
## are read in.
|
||||||
##
|
##
|
||||||
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
|
# color brightyellow "<[^=[[:space:]]]*>" ""(\\.|[^\"])*""
|
||||||
##
|
##
|
||||||
## This string is VERY resource intensive!!!
|
## This string is VERY resource intensive!!!
|
||||||
# color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
|
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
|
||||||
##
|
##
|
||||||
## And we want to have some nice comment highlighting too
|
## And we want to have some nice comment highlighting too
|
||||||
# color brightblue "//.*"
|
# color brightblue "//.*"
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
## Here is a short example for HTML
|
## Here is a short example for HTML
|
||||||
# syntax "HTML" "\.html$"
|
# syntax "HTML" "\.html$"
|
||||||
# color blue start="<" end=">"
|
# color blue start="<" end=">"
|
||||||
# color red "&[^; ]*;"
|
# color red "&[^;[[:space:]]]*;"
|
||||||
|
|
||||||
## Here is a short example for TeX files
|
## Here is a short example for TeX files
|
||||||
# syntax "TeX" "\.tex$"
|
# syntax "TeX" "\.tex$"
|
||||||
|
@ -197,8 +197,8 @@
|
||||||
##
|
##
|
||||||
# syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
|
# syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
|
||||||
## The argument of .nr or .ds
|
## The argument of .nr or .ds
|
||||||
# color cyan "^\.ds [^ ]*"
|
# color cyan "^\.ds [^[[:space:]]]*"
|
||||||
# color cyan "^\.nr [^ ]*"
|
# color cyan "^\.nr [^[[:space:]]]*"
|
||||||
## Single character escapes
|
## Single character escapes
|
||||||
# color brightmagenta "\\."
|
# color brightmagenta "\\."
|
||||||
## Highlight the argument of \f or \s in the same color
|
## Highlight the argument of \f or \s in the same color
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
# color cyan "(\\|\\\\)n\(.."
|
# color cyan "(\\|\\\\)n\(.."
|
||||||
# color cyan start="(\\|\\\\)n\[" end="]"
|
# color cyan start="(\\|\\\\)n\[" end="]"
|
||||||
## Requests
|
## Requests
|
||||||
# color brightgreen "^\. *[^ ]*"
|
# color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
|
||||||
## Comments
|
## Comments
|
||||||
# color yellow "^\.\\\".*$"
|
# color yellow "^\.\\\".*$"
|
||||||
## Strings
|
## Strings
|
||||||
|
@ -226,11 +226,7 @@
|
||||||
## Here is an example for perl
|
## Here is an example for perl
|
||||||
##
|
##
|
||||||
# syntax "perl" "\.p[lm]$"
|
# syntax "perl" "\.p[lm]$"
|
||||||
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>"
|
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
||||||
# color red "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>"
|
|
||||||
# color red "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>"
|
|
||||||
# color red "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>"
|
|
||||||
# color red "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
|
||||||
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
|
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
|
||||||
# color cyan start="[$@%]" end="( |\\W|-)"
|
# color cyan start="[$@%]" end="( |\\W|-)"
|
||||||
# color yellow "".*"|qq\|.*\|"
|
# color yellow "".*"|qq\|.*\|"
|
||||||
|
@ -250,7 +246,7 @@
|
||||||
# color blue "//.*"
|
# color blue "//.*"
|
||||||
# color blue start="/\*" end="\*/"
|
# color blue start="/\*" end="\*/"
|
||||||
# color brightblue start="/\*\*" end="\*/"
|
# color brightblue start="/\*\*" end="\*/"
|
||||||
# color brightgreen,green " +$"
|
# color brightgreen,green "[[:space:]]+$"
|
||||||
|
|
||||||
## Here is an example for patch files
|
## Here is an example for patch files
|
||||||
##
|
##
|
||||||
|
@ -277,15 +273,14 @@
|
||||||
##
|
##
|
||||||
# syntax "nanorc" "(\.|/|)nanorc$"
|
# syntax "nanorc" "(\.|/|)nanorc$"
|
||||||
## highlight possible errors and parameters
|
## highlight possible errors and parameters
|
||||||
# color brightwhite "^ *(set|unset|syntax|color).*$"
|
# color brightwhite "^[[:space:]]*(set|unset|syntax|color).*$"
|
||||||
## set, unset and syntax
|
## set, unset and syntax
|
||||||
# color cyan "^ *(set|unset) +(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete|regexp|smarthome|smooth)\>"
|
# color cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
|
||||||
# color cyan "^ *(set|unset) +(speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)"
|
# color green "^[[:space:]]*(set|unset|syntax)\>"
|
||||||
# color green "^ *(set|unset|syntax)\>"
|
|
||||||
## colors
|
## colors
|
||||||
# color yellow "^ *color *(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
# color yellow "^[[:space:]]*color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
|
||||||
# color magenta "^ *color\>" "\<(start|end)="
|
# color magenta "^[[:space:]]*color\>" "\<(start|end)="
|
||||||
## strings
|
## strings
|
||||||
# color white "\"(\\.|[^\"])*\""
|
# color white "\"(\\.|[^\"])*\""
|
||||||
## comments
|
## comments
|
||||||
# color blue " *#.*$"
|
# color blue "[[:space:]]*#.*$"
|
||||||
|
|
Loading…
Reference in New Issue