docs: reword the beginning of the chapter on nanorc files
Also, move the text about valid color names to another item, for shorter cross references.master
parent
440f39e558
commit
ad13746da9
104
doc/nano.texi
104
doc/nano.texi
|
@ -393,7 +393,7 @@ The uniquely numbered files are stored in the specified directory.
|
||||||
For the interface, use bold instead of reverse video. This will be overridden
|
For the interface, use bold instead of reverse video. This will be overridden
|
||||||
by setting the options @code{titlecolor}, @code{statuscolor}, @code{keycolor},
|
by setting the options @code{titlecolor}, @code{statuscolor}, @code{keycolor},
|
||||||
@code{functioncolor}, @code{numbercolor}, and/or @code{selectedcolor} in your
|
@code{functioncolor}, @code{numbercolor}, and/or @code{selectedcolor} in your
|
||||||
nanorc file. @xref{@code{set functioncolor}} for details.
|
nanorc file. @xref{@code{set keycolor}} for details.
|
||||||
|
|
||||||
@item -E
|
@item -E
|
||||||
@itemx --tabstospaces
|
@itemx --tabstospaces
|
||||||
|
@ -766,27 +766,27 @@ for more details). The following global toggles are available:
|
||||||
@node Nanorc Files
|
@node Nanorc Files
|
||||||
@chapter Nanorc Files
|
@chapter Nanorc Files
|
||||||
|
|
||||||
The nanorc files contain the default settings for @command{nano}. During
|
Nanorc files can be used to configure @command{nano} to your liking
|
||||||
startup, if @option{--rcfile} is not given, @command{nano} will read two files:
|
without using command-line options. During startup @command{nano} will
|
||||||
first the system-wide settings, from @file{/etc/nanorc} (the exact path
|
normally read two files: first the system-wide file, @file{/etc/nanorc}
|
||||||
might be different on your system), and then the user-specific settings,
|
(the exact path may be different on your system), and then the user-specific
|
||||||
either from @file{~/.nanorc} or from @file{$XDG_CONFIG_HOME/nano/nanorc}
|
file, either @file{~/.nanorc} or @file{$XDG_CONFIG_HOME/nano/nanorc} or
|
||||||
or from @file{.config/nano/nanorc}, whichever exists first.
|
@file{.config/nano/nanorc}, whichever exists first.
|
||||||
If @option{--rcfile} is given, @command{nano} will read just the
|
However, if @option{--rcfile} is given, @command{nano} will skip the
|
||||||
specified settings file.
|
above files and will read just the specified settings file.
|
||||||
|
|
||||||
A nanorc file accepts a series of "set" and "unset" commands, which can
|
A nanorc file can contain @command{set} and @command{unset} commands for
|
||||||
be used to configure @command{nano} on startup without using command-line
|
various options (@pxref{Settings}). It can also contain commands that
|
||||||
options. Additionally, there are some commands to define syntax highlighting
|
define syntax highlighting (@pxref{Syntax Highlighting}) and commands
|
||||||
and to rebind keys --- @pxref{Syntax Highlighting} and @ref{Rebinding Keys}.
|
that rebind keys (@ref{Rebinding Keys}). Each command should be on a
|
||||||
@command{nano} will read one command per line.
|
separate line, and all commands should be written in lowercase.
|
||||||
All commands and keywords should be written in lowercase.
|
|
||||||
|
|
||||||
Options in nanorc files take precedence over @command{nano}'s defaults, and
|
Options that do not take an argument are unset by default. So using
|
||||||
command-line options override nanorc settings. Also, options that do not
|
the @code{unset} command is only needed when wanting to override a
|
||||||
take an argument are unset by default. So using the @code{unset} command
|
setting from the system's nanorc file in your own nanorc. Options that
|
||||||
is only needed when wanting to override a setting of the system's nanorc
|
take an argument cannot be unset, but can be assigned the empty string.
|
||||||
file in your own nanorc. Options that take an argument cannot be unset.
|
|
||||||
|
Any command-line option overrides its nanorc setting, of course.
|
||||||
|
|
||||||
Quotes inside the @var{characters} parameters below should not be escaped.
|
Quotes inside the @var{characters} parameters below should not be escaped.
|
||||||
The last double quote on the line will be seen as the closing quote.
|
The last double quote on the line will be seen as the closing quote.
|
||||||
|
@ -868,7 +868,7 @@ Do not use the line below the title bar, leaving it entirely blank.
|
||||||
@item set errorcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set errorcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the status bar when an error message is displayed.
|
Use this color combination for the status bar when an error message is displayed.
|
||||||
The default value is @t{bold,white,red}.
|
The default value is @t{bold,white,red}.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set fill @var{number}
|
@item set fill @var{number}
|
||||||
Set the target width for justifying and automatic hard-wrapping at this
|
Set the target width for justifying and automatic hard-wrapping at this
|
||||||
|
@ -877,10 +877,31 @@ at the width of the screen minus @var{number} columns, allowing the wrap
|
||||||
point to vary along with the width of the screen if the screen is resized.
|
point to vary along with the width of the screen if the screen is resized.
|
||||||
The default value is @t{-8}.
|
The default value is @t{-8}.
|
||||||
|
|
||||||
@anchor{@code{set functioncolor}}
|
|
||||||
@item set functioncolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set functioncolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the concise function descriptions
|
Use this color combination for the concise function descriptions
|
||||||
in the two help lines at the bottom of the screen.
|
in the two help lines at the bottom of the screen.
|
||||||
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
|
@item set guidestripe @var{number}
|
||||||
|
Draw a vertical stripe at the given column, to help judge the width of the
|
||||||
|
text. (The color of the stripe can be changed with @code{set stripecolor}.)
|
||||||
|
|
||||||
|
@item set historylog
|
||||||
|
Save the last hundred search strings and replacement strings and
|
||||||
|
executed commands, so they can be easily reused in later sessions.
|
||||||
|
|
||||||
|
@item set indicator
|
||||||
|
Display a "scrollbar" on the righthand side of the edit window.
|
||||||
|
It shows the position of the viewport in the buffer
|
||||||
|
and how much of the buffer is covered by the viewport.
|
||||||
|
|
||||||
|
@item set jumpyscrolling
|
||||||
|
Scroll the buffer contents per half-screen instead of per line.
|
||||||
|
|
||||||
|
@anchor{@code{set keycolor}}
|
||||||
|
@item set keycolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
|
Use this color combination for the shortcut key combos
|
||||||
|
in the two help lines at the bottom of the screen.
|
||||||
Valid names for the foreground and background colors are:
|
Valid names for the foreground and background colors are:
|
||||||
@code{red}, @code{green}, @code{blue},
|
@code{red}, @code{green}, @code{blue},
|
||||||
@code{magenta}, @code{yellow}, @code{cyan},
|
@code{magenta}, @code{yellow}, @code{cyan},
|
||||||
|
@ -901,27 +922,6 @@ and the pair may be preceded by @code{bold} and/or @code{italic}
|
||||||
(separated by commas) to get a bold and/or slanting typeface,
|
(separated by commas) to get a bold and/or slanting typeface,
|
||||||
if your terminal can do those.
|
if your terminal can do those.
|
||||||
|
|
||||||
@item set guidestripe @var{number}
|
|
||||||
Draw a vertical stripe at the given column, to help judge the width of the
|
|
||||||
text. (The color of the stripe can be changed with @code{set stripecolor}.)
|
|
||||||
|
|
||||||
@item set historylog
|
|
||||||
Save the last hundred search strings and replacement strings and
|
|
||||||
executed commands, so they can be easily reused in later sessions.
|
|
||||||
|
|
||||||
@item set indicator
|
|
||||||
Display a "scrollbar" on the righthand side of the edit window.
|
|
||||||
It shows the position of the viewport in the buffer
|
|
||||||
and how much of the buffer is covered by the viewport.
|
|
||||||
|
|
||||||
@item set jumpyscrolling
|
|
||||||
Scroll the buffer contents per half-screen instead of per line.
|
|
||||||
|
|
||||||
@item set keycolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
|
||||||
Use this color combination for the shortcut key combos
|
|
||||||
in the two help lines at the bottom of the screen.
|
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
|
||||||
|
|
||||||
@item set linenumbers
|
@item set linenumbers
|
||||||
Display line numbers to the left of the text area.
|
Display line numbers to the left of the text area.
|
||||||
(Any line with an anchor additionally gets a mark in the margin.)
|
(Any line with an anchor additionally gets a mark in the margin.)
|
||||||
|
@ -962,7 +962,7 @@ The state flags are displayed only when @code{set stateflags} is used.
|
||||||
@item set minicolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set minicolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the minibar.
|
Use this color combination for the minibar.
|
||||||
(When this option is not specified, the colors of the title bar are used.)
|
(When this option is not specified, the colors of the title bar are used.)
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set mouse
|
@item set mouse
|
||||||
Enable mouse support, so that mouse clicks can be used to place the
|
Enable mouse support, so that mouse clicks can be used to place the
|
||||||
|
@ -987,7 +987,7 @@ When needed, use @code{unset breaklonglines} instead.
|
||||||
|
|
||||||
@item set numbercolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set numbercolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for line numbers.
|
Use this color combination for line numbers.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set operatingdir "@var{directory}"
|
@item set operatingdir "@var{directory}"
|
||||||
@command{nano} will only read and write files inside "directory" and its
|
@command{nano} will only read and write files inside "directory" and its
|
||||||
|
@ -1005,7 +1005,7 @@ Preserve the XON and XOFF keys (@kbd{^Q} and @kbd{^S}).
|
||||||
@item set promptcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set promptcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the prompt bar.
|
Use this color combination for the prompt bar.
|
||||||
(When this option is not specified, the colors of the title bar are used.)
|
(When this option is not specified, the colors of the title bar are used.)
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set punct "@var{characters}"
|
@item set punct "@var{characters}"
|
||||||
Set the characters treated as closing punctuation when justifying
|
Set the characters treated as closing punctuation when justifying
|
||||||
|
@ -1048,11 +1048,11 @@ Save a changed buffer automatically on exit (@kbd{^X}); don't prompt.
|
||||||
Use this color combination for the indicator alias "scrollbar".
|
Use this color combination for the indicator alias "scrollbar".
|
||||||
(On terminal emulators that link to a libvte older than version 0.55,
|
(On terminal emulators that link to a libvte older than version 0.55,
|
||||||
using a background color here does not work correctly.)
|
using a background color here does not work correctly.)
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set selectedcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set selectedcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for selected text.
|
Use this color combination for selected text.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set showcursor
|
@item set showcursor
|
||||||
Put the cursor on the highlighted item in the file browser, and show
|
Put the cursor on the highlighted item in the file browser, and show
|
||||||
|
@ -1078,7 +1078,7 @@ Use the given program to do spell checking and correcting.
|
||||||
@item set spotlightcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set spotlightcolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for highlighting a search match.
|
Use this color combination for highlighting a search match.
|
||||||
The default value is @t{black,lightyellow}.
|
The default value is @t{black,lightyellow}.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set stateflags
|
@item set stateflags
|
||||||
Use the top-right corner of the screen for showing some state flags:
|
Use the top-right corner of the screen for showing some state flags:
|
||||||
|
@ -1090,11 +1090,11 @@ filename in the center of the title bar.
|
||||||
|
|
||||||
@item set statuscolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set statuscolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the status bar.
|
Use this color combination for the status bar.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set stripecolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set stripecolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the vertical guiding stripe.
|
Use this color combination for the vertical guiding stripe.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set suspendable
|
@item set suspendable
|
||||||
Allow @command{nano} to be suspended (with @kbd{^Z} by default).
|
Allow @command{nano} to be suspended (with @kbd{^Z} by default).
|
||||||
|
@ -1109,7 +1109,7 @@ that a tab at that position would take up.
|
||||||
|
|
||||||
@item set titlecolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
@item set titlecolor [bold,][italic,]@var{fgcolor},@var{bgcolor}
|
||||||
Use this color combination for the title bar.
|
Use this color combination for the title bar.
|
||||||
@xref{@code{set functioncolor}} for valid color names.
|
@xref{@code{set keycolor}} for valid color names.
|
||||||
|
|
||||||
@item set trimblanks
|
@item set trimblanks
|
||||||
Remove trailing whitespace from wrapped lines when automatic
|
Remove trailing whitespace from wrapped lines when automatic
|
||||||
|
|
Loading…
Reference in New Issue