$FreeBSD$ --- nanorc.sample.orig Sat Dec 27 17:35:21 2003 +++ nanorc.sample Thu Jul 1 00:19:16 2004 @@ -107,9 +107,9 @@ ## to set the background color to black or white. ## # syntax "c-file" "\.(c|h)$" -# color red "\<[A-Z_]{2,}\>" -# color green "\<(float|char|int|void|static|const|struct)\>" -# color brightyellow "\<(if|while|do|else|case|switch)\>" +# color red "[[:<:]][A-Z_]{2,}[[:>:]]" +# color green "[[:<:]](float|char|int|void|static|const|struct)[[:>:]]" +# color brightyellow "[[:<:]](if|while|do|else|case|switch)[[:>:]]" # color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)" ## ## You will in general want your comments and strings to come last, @@ -173,8 +173,8 @@ ## Here is an example for perl ## # 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)|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|seekdir|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 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 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|seekdir|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 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 yellow "".*"|qq\|.*\|" # color white "[sm]/.*/" @@ -185,11 +185,11 @@ ## Here is an example for Java source ## # syntax "Java source" "\.java$" -# color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" -# color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" -# color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" +# color green "[[:<:]](boolean|byte|char|double|float|int|long|new|short|this|transient|void)[[:>:]]" +# color red "[[:<:]](break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)[[:>:]]" +# color cyan "[[:<:]](abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)[[:>:]]" # color red ""[^\"]*"" -# color yellow "\<(true|false|null)\>" +# color yellow "[[:<:]](true|false|null)[[:>:]]" # color blue "//.*" # color blue start="/\*" end="\*/" # color brightblue start="/\*\*" end="\*/" @@ -201,8 +201,8 @@ # color white "^ *(set|unset).*$" # color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)" # color brightwhite "^ *syntax [^ ]*" -# color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>" -# color white "^ *color\>.*" -# color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>" -# color magenta "^ *color\>" +# color brightblue "^ *set[[:>:]]" "^ *unset[[:>:]]" "^ *syntax[[:>:]]" +# color white "^ *color[[:>:]].*" +# color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)[[:>:]]" +# color magenta "^ *color[[:>:]]" # color green "^#.*$"