docs: harmonize the nanorc man page and Info document a bit

And make the strings after "start=" and  "end=" more readable.
master
Benno Schulenberg 2017-04-21 11:27:12 +02:00
parent 9a4c384afa
commit ac1444578c
2 changed files with 20 additions and 20 deletions

View File

@ -893,12 +893,12 @@ via the following commands in a nanorc file:
@table @code @table @code
@item syntax "str" ["fileregex" @dots{}] @item syntax "name" ["fileregex" @dots{}]
Defines a syntax named "str" which can be activated via the @code{-Y/--syntax} Defines a syntax named "name" which can be activated via the @code{-Y/--syntax}
command-line option, or will be automatically activated if the current command-line option, or will be automatically activated if the current
filename matches the extended regular expression "fileregex". All filename matches the extended regular expression "fileregex". All
subsequent @code{color}, @code{icolor}, @code{header} and other such subsequent @code{color}, @code{icolor}, @code{header} and other such
statements will apply to this "str" syntax until a new @code{syntax} statements will apply to this "name" syntax until a new @code{syntax}
command is encountered. command is encountered.
The "none" syntax is reserved; specifying it on the command line is the The "none" syntax is reserved; specifying it on the command line is the
@ -947,26 +947,26 @@ terminal supports transparency, not specifying a "bgcolor" tells @code{nano}
to attempt to use a transparent background. to attempt to use a transparent background.
@item icolor fgcolor,bgcolor "regex" @dots{} @item icolor fgcolor,bgcolor "regex" @dots{}
Same as above, except that the text matching is case insensitive. Same as above, except that the matching is case insensitive.
@item color fgcolor,bgcolor start="sr" end="er" @item color fgcolor,bgcolor start="fromrx" end="torx"
Display all pieces of text whose start matches extended regular expression Display all pieces of text whose start matches extended regular expression
"sr" and whose end matches extended regular expression "er" with foreground "fromrx" and whose end matches extended regular expression "torx" with
color "fgcolor" and background color "bgcolor", at least one of which foreground color "fgcolor" and background color "bgcolor", at least one of
must be specified. This means that, after an initial instance of "sr", which must be specified. This means that, after an initial instance of
all text will be highlighted until the first instance of "er". "fromrx", all text until the first instance of "torx" will be colored.
This allows syntax highlighting to span multiple lines. This allows syntax highlighting to span multiple lines.
@item icolor fgcolor,bgcolor start="sr" end="er" @item icolor fgcolor,bgcolor start="fromrx" end="torx"
Same as above, except that the text matching is case insensitive. Same as above, except that the matching is case insensitive.
@item include "syntaxfile" @item include "syntaxfile"
Read in self-contained color syntaxes from "syntaxfile". Note that Read in self-contained color syntaxes from "syntaxfile". Note that
"syntaxfile" may contain only the above commands, from @code{syntax} "syntaxfile" may contain only the above commands, from @code{syntax}
to @code{icolor}. to @code{icolor}.
@item extendsyntax str directive [arg @dots{}] @item extendsyntax name directive [arg @dots{}]
Extend the syntax previously defined as str to include new information. Extend the syntax previously defined as "name" to include new information.
This allows you to add a new @code{color}, @code{icolor}, @code{header}, This allows you to add a new @code{color}, @code{icolor}, @code{header},
@code{magic}, @code{comment}, @code{linter}, or @code{formatter} directive to an already @code{magic}, @code{comment}, @code{linter}, or @code{formatter} directive to an already
defined syntax --- useful when you want to slightly improve a syntax defined defined syntax --- useful when you want to slightly improve a syntax defined

View File

@ -346,19 +346,19 @@ foreground. If your terminal supports transparency, not specifying a
background. background.
.TP .TP
.B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ... .B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
Same as above, except that the text matching is case insensitive. Same as above, except that the matching is case insensitive.
.TP .TP
.BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR"" .BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIfromrx\fR"" " end= """\fItorx\fR""
Display all pieces of text whose start matches extended regular expression Display all pieces of text whose start matches extended regular expression
\fIsr\fP and whose end matches extended regular expression \fIer\fP with \fIfromrx\fP and whose end matches extended regular expression \fItorx\fP with
foreground color \fIfgcolor\fP and background color \fIbgcolor\fP, foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
at least one of which must be specified. This means that, after an at least one of which must be specified. This means that, after an
initial instance of \fIsr\fP, all text will be highlighted until the initial instance of \fIfromrx\fP, all text until the first instance of
first instance of \fIer\fP. This allows syntax highlighting to span \fItorx\fP will be colored. This allows syntax highlighting to span
multiple lines. multiple lines.
.TP .TP
.BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR"" .BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIfromrx\fR"" " end= """\fItorx\fR""
Same as above, except that the text matching is case insensitive. Same as above, except that the matching is case insensitive.
.TP .TP
.BR include " ""\fIsyntaxfile\fR""" .BR include " ""\fIsyntaxfile\fR"""
Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that