1
1

docs: show double quotes where they are needed

Instead of saying that string parameters should be enclosed in
double quotes, just show the quotes in the relevant commands.

Also, rename the parameters, to better fit the subsequent description.
Этот коммит содержится в:
Benno Schulenberg 2019-06-07 11:15:02 +02:00
родитель 0b257fe558
Коммит c4e04eb682
3 изменённых файлов: 17 добавлений и 24 удалений

Просмотреть файл

@ -690,10 +690,8 @@ take an argument are unset by default. So using the @code{unset} command
is only needed when wanting to override a setting of the system's nanorc is only needed when wanting to override a setting of the system's nanorc
file in your own nanorc. Options that take an argument cannot be unset. file in your own nanorc. Options that take an argument cannot be unset.
Quotes inside string parameters don't have to be escaped with Quotes inside the @var{characters} parameters below should not be escaped.
backslashes. The last double quote in the string will be treated as its The last double quote on the line will be seen as the closing quote.
end. For example, for the @code{brackets} option, @t{""')>]@}"} will match
@code{"}, @code{'}, @code{)}, @code{>}, @code{]}, and @code{@}}.
@menu @menu
* Settings:: * Settings::
@ -741,7 +739,7 @@ function tags, line numbers, and selected text. This can be overridden by
setting the options @code{titlecolor}, @code{statuscolor}, @code{keycolor}, setting the options @code{titlecolor}, @code{statuscolor}, @code{keycolor},
@code{functioncolor}, @code{numbercolor}, and @code{selectedcolor}. @code{functioncolor}, @code{numbercolor}, and @code{selectedcolor}.
@item set brackets "@var{string}" @item set brackets "@var{characters}"
Set the characters treated as closing brackets when justifying Set the characters treated as closing brackets when justifying
paragraphs. This may not include blank characters. Only closing paragraphs. This may not include blank characters. Only closing
punctuation (see @code{set punct}), optionally followed by the specified punctuation (see @code{set punct}), optionally followed by the specified
@ -808,7 +806,7 @@ Display line numbers to the left of the text area.
@item set locking @item set locking
Enable vim-style lock-files for when editing files. Enable vim-style lock-files for when editing files.
@item set matchbrackets "@var{string}" @item set matchbrackets "@var{characters}"
Set the opening and closing brackets that can be found by bracket Set the opening and closing brackets that can be found by bracket
searches. This may not include blank characters. The opening set must searches. This may not include blank characters. The opening set must
come before the closing set, and the two sets must be in the same order. come before the closing set, and the two sets must be in the same order.
@ -860,7 +858,7 @@ The cursor position is remembered for the 200 most-recently edited files.
@item set preserve @item set preserve
Preserve the XON and XOFF keys (@kbd{^Q} and @kbd{^S}). Preserve the XON and XOFF keys (@kbd{^Q} and @kbd{^S}).
@item set punct "@var{string}" @item set punct "@var{characters}"
Set the characters treated as closing punctuation when justifying Set the characters treated as closing punctuation when justifying
paragraphs. This may not include blank characters. Only the paragraphs. This may not include blank characters. Only the
specified closing punctuation, optionally followed by closing brackets specified closing punctuation, optionally followed by closing brackets
@ -960,7 +958,7 @@ This mode allows the user to open also other files for viewing,
unless @option{--restricted} is given on the command line. unless @option{--restricted} is given on the command line.
@anchor{Whitespace} @anchor{Whitespace}
@item set whitespace "@var{string}" @item set whitespace "@var{characters}"
Set the two characters used to indicate the presence of tabs and Set the two characters used to indicate the presence of tabs and
spaces. They must be single-column characters. The default pair spaces. They must be single-column characters. The default pair
for a UTF-8 locale is @t{"»·"}, and for other locales @t{">."}. for a UTF-8 locale is @t{"»·"}, and for other locales @t{">."}.
@ -969,7 +967,7 @@ for a UTF-8 locale is @t{"»·"}, and for other locales @t{">."}.
Detect word boundaries differently by treating punctuation Detect word boundaries differently by treating punctuation
characters as part of a word. characters as part of a word.
@item set wordchars "@var{string}" @item set wordchars "@var{characters}"
Specify which other characters (besides the normal alphanumeric ones) Specify which other characters (besides the normal alphanumeric ones)
should be considered as parts of words. This overrides the option should be considered as parts of words. This overrides the option
@code{wordbounds}. @code{wordbounds}.

Просмотреть файл

@ -52,11 +52,8 @@ command is only needed when wanting to override a setting of the system's
\fInanorc\fR file in your own \fInanorc\fR. Options that take an \fInanorc\fR file in your own \fInanorc\fR. Options that take an
argument cannot be unset. argument cannot be unset.
.sp .sp
Below, the \fIstring\fR parameters need to be enclosed in double quotes. Quotes inside the \fIcharacters\fR parameters below should not be escaped.
Quotes inside these string parameters don't have to be escaped with The last double quote on the line will be seen as the closing quote.
backslashes. The last double quote in the string will be treated as its
end. For example, for the \fBbrackets\fP option, "\fB"')>]}\fP" will
match \fB"\fP, \fB'\fP, \fB)\fP, \fB>\fP, \fB]\fP, and \fB}\fP.
.sp .sp
The supported commands and arguments are: The supported commands and arguments are:
@ -94,7 +91,7 @@ function tags, line numbers, and selected text. This can be overridden by
setting the options \fBtitlecolor\fP, \fBstatuscolor\fP, \fBkeycolor\fP, setting the options \fBtitlecolor\fP, \fBstatuscolor\fP, \fBkeycolor\fP,
\fBfunctioncolor\fP, \fBnumbercolor\fP, and \fBselectedcolor\fP. \fBfunctioncolor\fP, \fBnumbercolor\fP, and \fBselectedcolor\fP.
.TP .TP
.B set brackets "\fIstring\fP" .BI "set brackets """ characters """
Set the characters treated as closing brackets when justifying Set the characters treated as closing brackets when justifying
paragraphs. This may not include blank characters. Only closing paragraphs. This may not include blank characters. Only closing
punctuation (see \fBset punct\fP), optionally followed by the specified punctuation (see \fBset punct\fP), optionally followed by the specified
@ -154,7 +151,7 @@ Display line numbers to the left of the text area.
.B set locking .B set locking
Enable vim-style lock-files for when editing files. Enable vim-style lock-files for when editing files.
.TP .TP
.B set matchbrackets "\fIstring\fP" .BI "set matchbrackets """ characters """
Set the opening and closing brackets that can be found by bracket Set the opening and closing brackets that can be found by bracket
searches. This may not include blank characters. The opening set must searches. This may not include blank characters. The opening set must
come before the closing set, and the two sets must be in the same order. come before the closing set, and the two sets must be in the same order.
@ -209,7 +206,7 @@ The cursor position is remembered for the 200 most-recently edited files.
.B set preserve .B set preserve
Preserve the XON and XOFF keys (^Q and ^S). Preserve the XON and XOFF keys (^Q and ^S).
.TP .TP
.B set punct "\fIstring\fP" .BI "set punct """ characters """
Set the characters treated as closing punctuation when justifying Set the characters treated as closing punctuation when justifying
paragraphs. This may not include blank characters. Only the paragraphs. This may not include blank characters. Only the
specfified closing punctuation, optionally followed by closing brackets specfified closing punctuation, optionally followed by closing brackets
@ -219,7 +216,7 @@ specfified closing punctuation, optionally followed by closing brackets
Do quick status-bar blanking: status-bar messages will disappear after 1 Do quick status-bar blanking: status-bar messages will disappear after 1
keystroke instead of 25. The option \fBconstantshow\fR overrides this. keystroke instead of 25. The option \fBconstantshow\fR overrides this.
.TP .TP
.B set quotestr "\fIregex\fP" .BI "set quotestr """ regex """
Set the regular expression for matching the quoting part of a line. Set the regular expression for matching the quoting part of a line.
The default value is "\fB^([\ \\t]*([!#%:;>|}]|//|\-\-))+\fP". The default value is "\fB^([\ \\t]*([!#%:;>|}]|//|\-\-))+\fP".
(Note that \fB\\t\fR stands for an actual Tab character.) (Note that \fB\\t\fR stands for an actual Tab character.)
@ -311,7 +308,7 @@ Disallow file modification: read-only mode.
This mode allows the user to open also other files for viewing, This mode allows the user to open also other files for viewing,
unless \fB\-\-restricted\fR is given on the command line. unless \fB\-\-restricted\fR is given on the command line.
.TP .TP
.B set whitespace "\fIstring\fP" .BI "set whitespace """ characters """
Set the two characters used to indicate the presence of tabs and Set the two characters used to indicate the presence of tabs and
spaces. They must be single-column characters. The default pair spaces. They must be single-column characters. The default pair
for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR". for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR".
@ -320,7 +317,7 @@ for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR".
Detect word boundaries differently by treating punctuation Detect word boundaries differently by treating punctuation
characters as parts of words. characters as parts of words.
.TP .TP
.B set wordchars \fIstring\fP .BI "set wordchars """ characters """
Specify which other characters (besides the normal alphanumeric ones) Specify which other characters (besides the normal alphanumeric ones)
should be considered as parts of words. This overrides the option should be considered as parts of words. This overrides the option
\fBwordbounds\fR. \fBwordbounds\fR.

Просмотреть файл

@ -8,10 +8,8 @@
## For the options that take parameters, the default value is given. ## For the options that take parameters, the default value is given.
## Other options are unset by default. ## Other options are unset by default.
## ##
## Quotes inside string parameters don't have to be escaped with ## Inside string parameters, quotes should not be escaped. The last
## backslashes. The last double quote in the string will be treated as ## double quote on the line will be seen as the closing quote.
## its end. For example, for the "brackets" option, ""')>]}" will match
## ", ', ), >, ], and }.
## Make the 'nextword' function (Ctrl+Right) stop at word ends ## Make the 'nextword' function (Ctrl+Right) stop at word ends
## instead of at beginnings. ## instead of at beginnings.