Commit a3367137 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

comment fixes, plus an explanation of the "include" command

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 27 additions and 21 deletions
+27 -21
...@@ -170,17 +170,17 @@ ...@@ -170,17 +170,17 @@
## ##
## syntax "short description" ["filename regex" ...] ## syntax "short description" ["filename regex" ...]
## ##
## (The "none" syntax is reserved; specifying it on the command line is ## The "none" syntax is reserved; specifying it on the command line is
## the same as not having a syntax at all. The "default" syntax is ## the same as not having a syntax at all. The "default" syntax is
## special: it takes no filename regexes, and applies to files that ## special: it takes no filename regexes, and applies to files that
## don't match any other syntax's filename regexes.) ## don't match any other syntax's filename regexes.
## ##
## color foreground,background "regex" ["regex"...] ## color foreground,background "regex" ["regex"...]
## or ## or
## icolor foreground,background "regex" ["regex"...] ## icolor foreground,background "regex" ["regex"...]
## ##
## ("color" will do case sensitive matches, while "icolor" will do case ## "color" will do case sensitive matches, while "icolor" will do case
## insensitive matches.) ## insensitive matches.
## ##
## Legal colors: white, black, red, blue, green, yellow, magenta, cyan. ## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
## You may use the prefix "bright" to mean a stronger color highlight ## You may use the prefix "bright" to mean a stronger color highlight
...@@ -193,6 +193,12 @@ ...@@ -193,6 +193,12 @@
## color will use a transparent color. If you don't want this, be sure ## color will use a transparent color. If you don't want this, be sure
## to set the background color to black or white. ## to set the background color to black or white.
## ##
## If you wish, you may put your syntaxes in separate files. You can
## make use of such files (which can only include "syntax", "color", and
## "icolor" commands) as follows:
##
## include "syntax file"
##
## All regexes should be extended regular expressions. ## All regexes should be extended regular expressions.
## ##
# syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$" # syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$"
...@@ -206,39 +212,39 @@ ...@@ -206,39 +212,39 @@
# color brightcyan "^[[:space:]]*#[[:space:]]*(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-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" # color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
## ##
## GCC builtins ## GCC builtins.
## ##
# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" # color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
## ##
## You will in general want your comments and strings to come last, ## String highlighting. You will in general want your comments and
## because syntax highlighting rules will be applied in the order they ## strings to come last, because syntax highlighting rules will be
## are read in. ## applied in the order they are read in.
## ##
# color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" # color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
## ##
## This string is VERY resource intensive! ## This string is VERY resource intensive!
# color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" # color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## ##
## And we want to have some nice comment highlighting too ## Comment highlighting.
# color brightblue "//.*" # color brightblue "//.*"
# color brightblue start="/\*" end="\*/" # color brightblue start="/\*" end="\*/"
## 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 "&[^;[[:space:]]]*;" # 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$"
# icolor green "\\.|\\[A-Z]*" # icolor green "\\.|\\[A-Z]*"
# color magenta "[{}]" # color magenta "[{}]"
# color blue "%.*" # color blue "%.*"
## Here is an example for quoted emails (under e.g. mutt) ## Here is an example for quoted emails (under e.g. mutt).
# syntax "mutt" # syntax "mutt"
# color green "^>.*" # color green "^>.*"
## Here is an example for groff ## Here is an example for groff.
## ##
# syntax "groff" "\.m[ems]$" "\.tmac$" "^tmac." ".rof" # syntax "groff" "\.m[ems]$" "\.tmac$" "^tmac." ".rof"
## The argument of .nr or .ds ## The argument of .nr or .ds
...@@ -268,7 +274,7 @@ ...@@ -268,7 +274,7 @@
## Macro arguments ## Macro arguments
# color brightcyan "\\\\\$[1-9]" # color brightcyan "\\\\\$[1-9]"
## 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))\>" "\<(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 "\<(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)\>"
...@@ -280,7 +286,7 @@ ...@@ -280,7 +286,7 @@
# color green "#.*" # color green "#.*"
# color yellow start="<< 'STOP'" end="STOP" # color yellow start="<< 'STOP'" end="STOP"
## Here is an example for Python ## Here is an example for Python.
## ##
# syntax "python" "\.py$" # syntax "python" "\.py$"
# icolor brightblue "def [A-Z_0-9]+" # icolor brightblue "def [A-Z_0-9]+"
...@@ -289,7 +295,7 @@ ...@@ -289,7 +295,7 @@
# color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''" # color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
# color brightred "#.*$" # color brightred "#.*$"
## Here is an example for Java source ## Here is an example for Java source.
## ##
# syntax "Java source" "\.java$" # syntax "Java source" "\.java$"
# color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" # color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
...@@ -302,7 +308,7 @@ ...@@ -302,7 +308,7 @@
# color brightblue start="/\*\*" end="\*/" # color brightblue start="/\*\*" end="\*/"
# color brightgreen,green "[[:space:]]+$" # color brightgreen,green "[[:space:]]+$"
## Here is an example for patch files ## Here is an example for patch files.
## ##
# syntax "patch" "\.(patch|diff)$" # syntax "patch" "\.(patch|diff)$"
# color brightgreen "^\+.*" # color brightgreen "^\+.*"
...@@ -313,7 +319,7 @@ ...@@ -313,7 +319,7 @@
# color brightyellow "^@@.*" # color brightyellow "^@@.*"
# color magenta "^diff.*" # color magenta "^diff.*"
## Here is an example for manpages ## Here is an example for manpages.
## ##
# syntax "manpage" "\.[1-9]x?$" # syntax "manpage" "\.[1-9]x?$"
# color green "\.(S|T)H.*$" # color green "\.(S|T)H.*$"
...@@ -323,7 +329,7 @@ ...@@ -323,7 +329,7 @@
# color brightwhite "\\f[BIPR]" # color brightwhite "\\f[BIPR]"
# color yellow "\.(br|DS|RS|RE|PD)" # color yellow "\.(br|DS|RS|RE|PD)"
## Here is an example for assembler ## Here is an example for assembler.
## ##
# syntax "asm-file" "\.(S|s|asm)$" # syntax "asm-file" "\.(S|s|asm)$"
# color red "\<[A-Z_]{2,}\>" # color red "\<[A-Z_]{2,}\>"
...@@ -339,7 +345,7 @@ ...@@ -339,7 +345,7 @@
# color brightblue "//.*" # color brightblue "//.*"
# color brightblue start="/\*" end="\*/" # color brightblue start="/\*" end="\*/"
## Here is an example for Bourne shell scripts ## Here is an example for Bourne shell scripts.
## ##
# syntax "shellscript" "\.sh$" # syntax "shellscript" "\.sh$"
# icolor brightgreen "^[_A-Z0-9]+\(\)" # icolor brightgreen "^[_A-Z0-9]+\(\)"
...@@ -352,7 +358,7 @@ ...@@ -352,7 +358,7 @@
# color yellow "#.*$" # color yellow "#.*$"
# color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" # color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
## Here is an example for your .nanorc ## Here is an example for your .nanorc.
## ##
# syntax "nanorc" "(\.|/|)nanorc$" # syntax "nanorc" "(\.|/|)nanorc$"
## highlight possible errors and parameters ## highlight possible errors and parameters
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment