summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man5/nanorc.5
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/archlinux/man5/nanorc.5
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/archlinux/man5/nanorc.5')
-rw-r--r--upstream/archlinux/man5/nanorc.584
1 files changed, 61 insertions, 23 deletions
diff --git a/upstream/archlinux/man5/nanorc.5 b/upstream/archlinux/man5/nanorc.5
index 4416b7dd..672f6e16 100644
--- a/upstream/archlinux/man5/nanorc.5
+++ b/upstream/archlinux/man5/nanorc.5
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2003-2011, 2013-2023 Free Software Foundation, Inc.
+.\" Copyright (C) 2003-2011, 2013-2024 Free Software Foundation, Inc.
.\"
.\" This document is dual-licensed. You may distribute and/or modify it
.\" under the terms of either of the following licenses:
@@ -16,14 +16,14 @@
.\" Documentation License along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
-.TH NANORC 5 "version 7.2" "January 2023"
+.TH NANORC 5 "version 8.0" "May 2024"
.SH NAME
nanorc \- GNU nano's configuration file
.SH DESCRIPTION
The \fInanorc\fP files contain the default settings for \fBnano\fP,
-a small and friendly editor. During startup, if \fB\-\-rcfile\fR
+a small and friendly text editor. During startup, if \fB\-\-rcfile\fR
is not given, \fBnano\fR will read two files: first the
system-wide settings, from \fI/etc/nanorc\fP (the exact path might be
different on your system), and then the user-specific settings, either
@@ -32,6 +32,24 @@ or from \fI~/.config/nano/nanorc\fR, whichever is encountered first.
If \fB\-\-rcfile\fR is given, \fBnano\fR will read just the specified
settings file.
+.SH NOTICE
+Since version 8.0, to be newcomer friendly, \fB^F\fR starts a forward search,
+\fB^B\fR starts a backward search, \fBM\-F\fR searches the next occurrence
+forward, and \fBM\-B\fR searches the next occurrence backward. If you want
+those keystrokes to do what they did before version 8.0, add the following
+lines at the end of your \fInanorc\fR file:
+.sp
+.RS 4
+.B bind ^F forward main
+.br
+.B bind ^B back main
+.br
+.B bind M\-F formatter main
+.br
+.B bind M\-B linter main
+.RE
+.sp
+
.SH OPTIONS
The configuration file accepts a series of \fBset\fP and \fBunset\fP
commands, which can be used to configure nano on startup without using
@@ -80,10 +98,12 @@ with \fBset backup\fR or \fB\-\-backup\fR or \fB\-B\fR.
The uniquely numbered files are stored in the specified \fIdirectory\fR.
.TP
.B set boldtext
-Use bold instead of reverse video for the title bar, status bar, key combos,
-function tags, line numbers, and selected text. This can be overridden by
-setting the options \fBtitlecolor\fP, \fBstatuscolor\fP, \fBkeycolor\fP,
-\fBfunctioncolor\fP, \fBnumbercolor\fP, and \fBselectedcolor\fP.
+Use bold instead of reverse video for the title bar, status bar,
+prompt bar, mini bar, key combos, function tags, line numbers,
+and selected text. This can be overridden by setting the options
+\fBtitlecolor\fP, \fBstatuscolor\fP,
+\fBpromptcolor\fP, \fBminicolor\fP, \fBkeycolor\fP, \fBfunctioncolor\fP,
+\fBnumbercolor\fP, and/or \fBselectedcolor\fP.
.TP
.B set bookstyle
When justifying, treat any line that starts with whitespace as the
@@ -171,7 +191,7 @@ The default value is "\fB(<[{)>]}\fP".
.B set minibar
Suppress the title bar and instead show information about
the current buffer at the bottom of the screen, in the space
-for the status bar. In this "minibar" the filename is shown
+for the status bar. In this "mini bar" the filename is shown
on the left, followed by an asterisk if the buffer has been modified.
On the right are displayed the current line and column number, the
code of the character under the cursor (in Unicode format: U+xxxx),
@@ -186,7 +206,7 @@ The line plus column numbers and the character code are displayed only when
The state flags are displayed only when \fBset stateflags\fR is used.
.TP
.B set minicolor \fR[\fBbold,\fR][\fBitalic,\fR]\fIfgcolor\fB,\fIbgcolor\fR
-Use this color combination for the minibar.
+Use this color combination for the mini bar.
(When this option is not specified, the colors of the title bar are used.)
See \fBset titlecolor\fR for more details.
.TP
@@ -239,7 +259,7 @@ See \fBset titlecolor\fR for more details.
.BI "set punct """ characters """
Set the characters treated as closing punctuation when justifying
paragraphs. This may not include blank characters. Only the
-specfified closing punctuation, optionally followed by closing brackets
+specified closing punctuation, optionally followed by closing brackets
(see \fBbrackets\fP), can end sentences. The default value is "\fB!.?\fP".
.TP
.B set quickblank
@@ -278,8 +298,6 @@ Save a changed buffer automatically on exit (\fB^X\fR); don't prompt.
.TP
.B set scrollercolor \fIfgcolor\fB,\fIbgcolor\fR
Use this color combination for the indicator alias "scrollbar".
-(On terminal emulators that link to a libvte older than version 0.55,
-using a background color here does not work correctly.)
See \fBset titlecolor\fR for more details.
.TP
.B set selectedcolor \fR[\fBbold,\fR][\fBitalic,\fR]\fIfgcolor\fB,\fIbgcolor\fR
@@ -335,6 +353,7 @@ greater than 0. The default value is \fB8\fR.
.B set tabstospaces
Convert each typed tab to spaces -- to the number of spaces
that a tab at that position would take up.
+(Note: pasted tabs are not converted.)
.TP
.B set titlecolor \fR[\fBbold,\fR][\fBitalic,\fR]\fIfgcolor\fB,\fIbgcolor\fR
Use this color combination for the title bar.
@@ -345,6 +364,8 @@ Each of these eight names may be prefixed with the word \fBlight\fR
to get a brighter version of that color.
The word \fBgrey\fR or \fBgray\fR may be used
as a synonym for \fBlightblack\fR.
+On a Linux console, \fBlight\fR does not have
+any effect for a background color.
On terminal emulators that can do at least 256 colors,
other valid (but unprefixable) color names are:
.BR pink ", " purple ", " mauve ", " lagoon ", " mint ", "
@@ -398,12 +419,6 @@ and disappears after 1.5 seconds or upon the next keystroke.
With \fBM\-Z\fR the title bar plus status bar can be toggled.
With \fBM\-X\fR the help lines.
-.SH NOTES
-Option \fBset suspendable\fR has been removed.
-Suspension is enabled by default, reachable via \fB^T^Z\fR.
-(If you want a plain \fB^Z\fR to suspend nano,
-add \fBbind ^Z suspend main\fR to your nanorc.)
-
.SH SYNTAX HIGHLIGHTING
Coloring the different syntactic elements of a file
is done via regular expressions (see the \fBcolor\fR command below).
@@ -444,9 +459,10 @@ will be added to this syntax, until a new \fBsyntax\fR
command is encountered.
.sp
When \fBnano\fR is run, this syntax will be automatically
-activated if the current filename matches the extended regular
-expression \fIfileregex\fR. Or the syntax can be explicitly
-activated by using the \fB\-Y\fR or \fB\-\-syntax\fR
+activated (for the relevant buffer) if the absolute filename
+matches the extended regular expression \fIfileregex\fR.
+Or the syntax can be explicitly activated (for all buffers)
+by using the \fB\-Y\fR or \fB\-\-syntax\fR
command-line option followed by the \fIname\fR.
.sp
The syntax \fBdefault\fP is special: it takes no \fIfileregex\fR,
@@ -499,6 +515,8 @@ Each of these eight names may be prefixed with the word \fBlight\fR
to get a brighter version of that color.
The word \fBgrey\fR or \fBgray\fR may be used
as a synonym for \fBlightblack\fR.
+On a Linux console, \fBlight\fR does not have
+any effect for a background color.
On terminal emulators that can do at least 256 colors,
other valid (but unprefixable) color names are:
.BR pink ", " purple ", " mauve ", " lagoon ", " mint ", "
@@ -570,7 +588,7 @@ menus where the key exists when \fBall\fP is used).
.sp
Note that \fBbind \fIkey\fR \fB"{\fIfunction\fB}"\fR \fImenu\fR is equivalent
to \fBbind \fIkey\fR \fIfunction\fR \fImenu\fR, except that for the latter form
-\fBnano\fR will check the availabilty of the \fIfunction\fR in the given \fImenu\fR
+\fBnano\fR will check the availability of the \fIfunction\fR in the given \fImenu\fR
at startup time (and report an error if it does not exist there), whereas for the
first form \fBnano\fR will check at execution time that the \fIfunction\fR exists
but not whether it makes any sense in the current menu. The user has to take care
@@ -791,6 +809,12 @@ Moves the cursor to the beginning of the current or preceding block of text.
.B nextblock
Moves the cursor to the beginning of the next block of text.
.TP
+.B toprow
+Moves the cursor to the first row in the viewport.
+.TP
+.B bottomrow
+Moves the cursor to the last row in the viewport.
+.TP
.B pageup
Goes up one screenful.
.TP
@@ -886,7 +910,7 @@ Toggles between searching for something and replacing something.
Toggles between searching for text and targeting a line number.
.TP
.B flipexecute
-Toggles between inserting a file and executing a command.
+Switches from inserting a file to executing a command.
.TP
.B flippipe
When executing a command, toggles whether the current buffer (or marked
@@ -1038,6 +1062,20 @@ For \fBbind\fR it means all menus where the specified \fIfunction\fR exists;
for \fBunbind\fR it means all menus where the specified \fIkey\fR exists.
.RE
+.SH EXAMPLES
+To make \fBCtrl+Z\fR suspend nano:
+.sp
+.RS
+.B bind ^Z suspend main
+.RE
+.sp
+To make \fBShift+Alt+C\fR copy the marked region to the system's clipboard:
+.sp
+.RS
+.B bind Sh-M-C """{execute}| xsel -ib {enter}{undo}""" main
+.RE
+.sp
+
.SH FILES
.TP
.I /etc/nanorc