From 06049f514110ab44f8d8fcf1206ccfa603f87397 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 17 Nov 2017 21:40:54 +0100 Subject: [PATCH] docs: update references to the nanorc files for the XDG changes --- doc/nano.1 | 15 ++++++++------- doc/nano.texi | 22 +++++++++++----------- doc/nanorc.5 | 12 +++++++----- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/doc/nano.1 b/doc/nano.1 index 2394e9ac..5411cbb3 100644 --- a/doc/nano.1 +++ b/doc/nano.1 @@ -60,7 +60,7 @@ stride. .PP 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 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). .SH OPTIONS @@ -94,11 +94,11 @@ Read a file into a new buffer by default. Use vim-style file locking when editing files. .TP .BR \-H ", " \-\-historylog -Log search and replace strings to \fI~/.nano/search_history\fP, so they can be -retrieved in later sessions. +Save the last hundred search strings and replacement strings and +executed commands, so they can be easily reused in later sessions. .TP .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 .BR \-K ", " \-\-rebindkeypad 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. .SH INITIALIZATION FILE -\fBnano\fP will read initialization files in the following order: -the system's \fBnanorc\fP (if it exists), and then the user's -\fB~/.nanorc\fP (if it exists). Please see +\fBnano\fR will read two configuration files: first the system's +\fInanorc\fR (if it exists), and then the user's \fInanorc\fR (if it +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) for more information on the possible contents of those files. diff --git a/doc/nano.texi b/doc/nano.texi index 93c40f68..df1db10c 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -130,7 +130,7 @@ adding it with a comma. So a more complete command synopsis is: @sp 1 @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} (making @command{nano} remember the cursor position when you close a file), you will rarely need to specify a line number. @@ -183,12 +183,12 @@ Enable vim-style file locking when editing files. @item -H @itemx --historylog -Log search and replace strings to @file{~/.nano/search_history}, -so they can be retrieved in later sessions. +Save the last hundred search strings and replacement strings and +executed commands, so they can be easily reused in later sessions. @item -I @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 @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, @command{nano} will first read the system-wide settings, from /etc/nanorc (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 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 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 -file in your own @file{~/.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 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. @item set historylog -Enable the use of @file{~/.nano/search_history} for saving and reading -search/replace strings. +Save the last hundred search strings and replacement strings and +executed commands, so they can be easily reused in later sessions. @item set justifytrim 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 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 type the first few characters and then use @kbd{Tab} to cycle through the matching strings. A retrieved string can subsequently be edited. @item Position History 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 again when you later reopen the file. diff --git a/doc/nanorc.5 b/doc/nanorc.5 index 2de48b9d..eb9372fe 100644 --- a/doc/nanorc.5 +++ b/doc/nanorc.5 @@ -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 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 -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 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 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 -\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. .PP 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. .TP .B set historylog -Enable the use of \fB~/.nano/search_history\fP for saving and reading -search/replace strings. +Save the last hundred search strings and replacement strings and +executed commands, so they can be easily reused in later sessions. .TP .B set justifytrim 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 System-wide configuration file. .TP -.B ~/.nanorc +.BR ~/.nanorc " or " \fI$XDG_CONFIG_HOME\fB/nano/nanorc " or " ~/.config/nano/nanorc Per-user configuration file. .SH SEE ALSO