docs: update references to the nanorc files for the XDG changes

This commit is contained in:
Benno Schulenberg 2017-11-17 21:40:54 +01:00
parent 4220854367
commit 06049f5141
3 changed files with 26 additions and 23 deletions

View File

@ -60,7 +60,7 @@ stride.
.PP .PP
The two lines at the bottom of the screen show some important commands; The two lines at the bottom of the screen show some important commands;
the built-in help (\fB^G\fR) lists all the available ones. the built-in help (\fB^G\fR) lists all the available ones.
The default key bindings can be changed via the .nanorc file -- see The default key bindings can be changed via a \fInanorc\fR file -- see
.BR nanorc (5). .BR nanorc (5).
.SH OPTIONS .SH OPTIONS
@ -94,11 +94,11 @@ Read a file into a new buffer by default.
Use vim-style file locking when editing files. Use vim-style file locking when editing files.
.TP .TP
.BR \-H ", " \-\-historylog .BR \-H ", " \-\-historylog
Log search and replace strings to \fI~/.nano/search_history\fP, so they can be Save the last hundred search strings and replacement strings and
retrieved in later sessions. executed commands, so they can be easily reused in later sessions.
.TP .TP
.BR \-I ", " \-\-ignorercfiles .BR \-I ", " \-\-ignorercfiles
Don't look at the system's \fBnanorc\fP nor at \fB~/.nanorc\fP. Don't look at the system's \fInanorc\fR nor at the user's \fInanorc\fR.
.TP .TP
.BR \-K ", " \-\-rebindkeypad .BR \-K ", " \-\-rebindkeypad
Interpret the numeric keypad keys so that they all work properly. You Interpret the numeric keypad keys so that they all work properly. You
@ -270,9 +270,10 @@ hard-wrapping of long lines, \fBM\-$\fR toggles soft-wrapping,
See at the end of the \fB^G\fR help text for a complete list. See at the end of the \fB^G\fR help text for a complete list.
.SH INITIALIZATION FILE .SH INITIALIZATION FILE
\fBnano\fP will read initialization files in the following order: \fBnano\fR will read two configuration files: first the system's
the system's \fBnanorc\fP (if it exists), and then the user's \fInanorc\fR (if it exists), and then the user's \fInanorc\fR (if it
\fB~/.nanorc\fP (if it exists). Please see exists), either \fB~/.nanorc\fR or \fI$XDG_CONFIG_HOME\fB/nano/nanorc\fR
or \fB~/.config/nano/nanorc\fR, whichever is encountered first. See
.BR nanorc (5) .BR nanorc (5)
for more information on the possible contents of those files. for more information on the possible contents of those files.

View File

@ -130,7 +130,7 @@ adding it with a comma. So a more complete command synopsis is:
@sp 1 @sp 1
@end iftex @end iftex
Normally, however, you set your preferred options in a @file{.nanorc} Normally, however, you set your preferred options in a @file{nanorc}
file (@pxref{Nanorc Files}). And when using @code{set positionlog} file (@pxref{Nanorc Files}). And when using @code{set positionlog}
(making @command{nano} remember the cursor position when you close a file), (making @command{nano} remember the cursor position when you close a file),
you will rarely need to specify a line number. you will rarely need to specify a line number.
@ -183,12 +183,12 @@ Enable vim-style file locking when editing files.
@item -H @item -H
@itemx --historylog @itemx --historylog
Log search and replace strings to @file{~/.nano/search_history}, Save the last hundred search strings and replacement strings and
so they can be retrieved in later sessions. executed commands, so they can be easily reused in later sessions.
@item -I @item -I
@itemx --ignorercfiles @itemx --ignorercfiles
Don't look at the system's nanorc file nor at the user's @file{~/.nanorc}. Don't look at the system's nanorc file nor at the user's nanorc.
@item -K @item -K
@itemx --rebindkeypad @itemx --rebindkeypad
@ -649,7 +649,8 @@ The nanorc files contain the default settings for @command{nano}. They
should be in Unix format, not in DOS or Mac format. During startup, should be in Unix format, not in DOS or Mac format. During startup,
@command{nano} will first read the system-wide settings, from /etc/nanorc @command{nano} will first read the system-wide settings, from /etc/nanorc
(the exact path might be different), and then the user-specific settings, (the exact path might be different), and then the user-specific settings,
from @file{~/.nanorc}. either from @file{~/.nanorc} or from @file{$XDG_CONFIG_HOME/nano/nanorc}
or from @file{.config/nano/nanorc}, whichever exists first.
A nanorc file accepts a series of "set" and "unset" commands, which can A nanorc file accepts a series of "set" and "unset" commands, which can
be used to configure @command{nano} on startup without using command-line be used to configure @command{nano} on startup without using command-line
@ -661,8 +662,7 @@ Options in nanorc files take precedence over @command{nano}'s defaults, and
command-line options override nanorc settings. Also, options that do not command-line options override nanorc settings. Also, options that do not
take an argument are unset by default. So using the @code{unset} command 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 @file{~/.nanorc}. Options that take an argument cannot file in your own nanorc. Options that take an argument cannot be unset.
be unset.
Quotes inside string parameters don't have to be escaped with Quotes inside string parameters don't have to be escaped with
backslashes. The last double quote in the string will be treated as its backslashes. The last double quote in the string will be treated as its
@ -750,8 +750,8 @@ The name of the foreground color may be prefixed with @code{bright}.
And either @var{fgcolor} or ,@var{bgcolor} may be left out. And either @var{fgcolor} or ,@var{bgcolor} may be left out.
@item set historylog @item set historylog
Enable the use of @file{~/.nano/search_history} for saving and reading Save the last hundred search strings and replacement strings and
search/replace strings. executed commands, so they can be easily reused in later sessions.
@item set justifytrim @item set justifytrim
When justifying text, trailing whitespace will automatically be removed. When justifying text, trailing whitespace will automatically be removed.
@ -1474,14 +1474,14 @@ ask any more), or Cancel (stop with replacing).
@item Search and Replace History @item Search and Replace History
When the option @option{-H} or @option{--historylog} is given (or set in When the option @option{-H} or @option{--historylog} is given (or set in
the .nanorc file), text entered as search or replace strings is stored. the a nanorc file), text entered as search or replace strings is stored.
These strings can be accessed with the up/down arrow keys, or you can These strings can be accessed with the up/down arrow keys, or you can
type the first few characters and then use @kbd{Tab} to cycle through the type the first few characters and then use @kbd{Tab} to cycle through the
matching strings. A retrieved string can subsequently be edited. matching strings. A retrieved string can subsequently be edited.
@item Position History @item Position History
When the option @option{-P} or @option{--positionlog} is given (or set in When the option @option{-P} or @option{--positionlog} is given (or set in
the .nanorc file), @command{nano} will store the position of the cursor a nanorc file), @command{nano} will store the position of the cursor
when you close a file, and will place the cursor in that position when you close a file, and will place the cursor in that position
again when you later reopen the file. again when you later reopen the file.

View File

@ -26,7 +26,9 @@ The \fInanorc\fP file contains the default settings for \fBnano\fP, a
small and friendly editor. The file should be in Unix format, not in small and friendly editor. The file should be in Unix format, not in
DOS or Mac format. During startup, \fBnano\fP will first read the DOS or Mac format. During startup, \fBnano\fP will first read the
system-wide settings, from \fB/etc/nanorc\fP (the exact path might be system-wide settings, from \fB/etc/nanorc\fP (the exact path might be
different), and then the user-specific settings, from \fB~/.nanorc\fP. different on your system), and then the user-specific settings, either
from \fB~/.nanorc\fR or from \fI$XDG_CONFIG_HOME\fB/nano/nanorc\fR
or from \fB~/.config/nano/nanorc\fR, whichever is encountered first.
.SH OPTIONS .SH OPTIONS
The configuration file accepts a series of \fBset\fP and \fBunset\fP The configuration file accepts a series of \fBset\fP and \fBunset\fP
@ -39,7 +41,7 @@ Options in \fInanorc\fP files take precedence over nano's defaults, and
command-line options override \fInanorc\fP settings. Also, options that command-line options override \fInanorc\fP settings. Also, options that
do not take an argument are unset by default. So using the \fBunset\fR do not take an argument are unset by default. So using the \fBunset\fR
command is only needed when wanting to override a setting of the system's command is only needed when wanting to override a setting of the system's
\fInanorc\fR file in your own \fB~/.nanorc\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.
.PP .PP
Below, the \fIstring\fR parameters need to be enclosed in double quotes. Below, the \fIstring\fR parameters need to be enclosed in double quotes.
@ -113,8 +115,8 @@ in the two help lines at the bottom of the screen.
See \fBset titlecolor\fR for more details. See \fBset titlecolor\fR for more details.
.TP .TP
.B set historylog .B set historylog
Enable the use of \fB~/.nano/search_history\fP for saving and reading Save the last hundred search strings and replacement strings and
search/replace strings. executed commands, so they can be easily reused in later sessions.
.TP .TP
.B set justifytrim .B set justifytrim
When justifying text, trailing whitespace will automatically be removed. When justifying text, trailing whitespace will automatically be removed.
@ -797,7 +799,7 @@ for \fBunbind\fR it means all menus where the specified \fIkey\fR exists.
.B /etc/nanorc .B /etc/nanorc
System-wide configuration file. System-wide configuration file.
.TP .TP
.B ~/.nanorc .BR ~/.nanorc " or " \fI$XDG_CONFIG_HOME\fB/nano/nanorc " or " ~/.config/nano/nanorc
Per-user configuration file. Per-user configuration file.
.SH SEE ALSO .SH SEE ALSO