This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
nano-7.2/doc/nanorc.5.html

1646 lines
56 KiB
HTML

<!-- Creator : groff version 1.22.4 -->
<!-- CreationDate: Wed Jan 18 08:48:55 2023 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>NANORC</title>
</head>
<body>
<h1 align="center">NANORC</h1>
<a href="#NAME">NAME</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#SYNTAX HIGHLIGHTING">SYNTAX HIGHLIGHTING</a><br>
<a href="#REBINDING KEYS">REBINDING KEYS</a><br>
<a href="#FILES">FILES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">nanorc - GNU
nano&rsquo;s configuration file</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<i>nanorc</i> files contain the default settings for
<b>nano</b>, a small and friendly editor. During startup, if
<b>--rcfile</b> is not given, <b>nano</b> will read two
files: first the system-wide settings, from
<i>/etc/nanorc</i> (the exact path might be different on
your system), and then the user-specific settings, either
from <i>~/.nanorc</i> or from
<i>$XDG_CONFIG_HOME/nano/nanorc</i> or from
<i>~/.config/nano/nanorc</i>, whichever is encountered
first. If <b>--rcfile</b> is given, <b>nano</b> will read
just the specified settings file.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
configuration file accepts a series of <b>set</b> and
<b>unset</b> commands, which can be used to configure nano
on startup without using command-line options. Additionally,
there are some commands to define syntax highlighting and to
rebind keys -- see the two separate sections on those.
<b>nano</b> reads one command per line. All commands and
keywords should be written in lowercase.</p>
<p style="margin-left:11%; margin-top: 1em">Options in
<i>nanorc</i> files take precedence over nano&rsquo;s
defaults, and command-line options override <i>nanorc</i>
settings. Also, options that do not take an argument are
unset by default. So using the <b>unset</b> command is only
needed when wanting to override a setting of the
system&rsquo;s <i>nanorc</i> file in your own <i>nanorc</i>.
Options that take an argument cannot be unset.</p>
<p style="margin-left:11%; margin-top: 1em">Quotes inside
the <i>characters</i> parameters below should not be
escaped. The last double quote on the line will be seen as
the closing quote.</p>
<p style="margin-left:11%; margin-top: 1em">The supported
commands and arguments are: <b><br>
set afterends</b></p>
<p style="margin-left:15%;">Make Ctrl+Right and Ctrl+Delete
stop at word ends instead of beginnings.</p>
<p style="margin-left:11%;"><b>set
allow_insecure_backup</b></p>
<p style="margin-left:15%;">When backing up files, allow
the backup to succeed even if its permissions can&rsquo;t be
(re)set due to special OS considerations. You should NOT
enable this option unless you are sure you need it.</p>
<p style="margin-left:11%;"><b>set atblanks</b></p>
<p style="margin-left:15%;">When soft line wrapping is
enabled, make it wrap lines at blank characters (tabs and
spaces) instead of always at the edge of the screen.</p>
<p style="margin-left:11%;"><b>set autoindent</b></p>
<p style="margin-left:15%;">Automatically indent a newly
created line to the same number of tabs and/or spaces as the
previous line (or as the next line if the previous line is
the beginning of a paragraph).</p>
<p style="margin-left:11%;"><b>set backup</b></p>
<p style="margin-left:15%;">When saving a file, create a
backup file by adding a tilde (<b>~</b>) to the file&rsquo;s
name.</p>
<p style="margin-left:11%;"><b>set backupdir</b>
<i>directory</i></p>
<p style="margin-left:15%;">Make and keep not just one
backup file, but make and keep a uniquely numbered one every
time a file is saved -- when backups are enabled with <b>set
backup</b> or <b>--backup</b> or <b>-B</b>. The uniquely
numbered files are stored in the specified
<i>directory</i>.</p>
<p style="margin-left:11%;"><b>set boldtext</b></p>
<p style="margin-left:15%;">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 <b>titlecolor</b>,
<b>statuscolor</b>, <b>keycolor</b>, <b>functioncolor</b>,
<b>numbercolor</b>, and <b>selectedcolor</b>.</p>
<p style="margin-left:11%;"><b>set bookstyle</b></p>
<p style="margin-left:15%;">When justifying, treat any line
that starts with whitespace as the beginning of a paragraph
(unless auto-indenting is on).</p>
<p style="margin-left:11%;"><b>set brackets
&quot;</b><i>characters</i><b>&quot;</b></p>
<p style="margin-left:15%;">Set the characters treated as
closing brackets when justifying paragraphs. This may not
include blank characters. Only closing punctuation (see
<b>set punct</b>), optionally followed by the specified
closing brackets, can end sentences. The default value is
&quot;<b>&quot;&rsquo;)&gt;]}</b>&quot;.</p>
<p style="margin-left:11%;"><b>set breaklonglines</b></p>
<p style="margin-left:15%;">Automatically hard-wrap the
current line when it becomes overlong.</p>
<p style="margin-left:11%;"><b>set casesensitive</b></p>
<p style="margin-left:15%;">Do case-sensitive searches by
default.</p>
<p style="margin-left:11%;"><b>set constantshow</b></p>
<p style="margin-left:15%;">Constantly display the cursor
position in the status bar. This overrides the option
<b>quickblank</b>.</p>
<p style="margin-left:11%;"><b>set cutfromcursor</b></p>
<p style="margin-left:15%;">Use
cut-from-cursor-to-end-of-line by default, instead of
cutting the whole line.</p>
<p style="margin-left:11%;"><b>set emptyline</b></p>
<p style="margin-left:15%;">Do not use the line below the
title bar, leaving it entirely blank.</p>
<p style="margin-left:11%;"><b>set errorcolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the status bar when an error message is displayed. The
default value is <b>bold,white,red</b>. See <b>set
titlecolor</b> for valid color names.</p>
<p style="margin-left:11%;"><b>set fill</b>
<i>number</i></p>
<p style="margin-left:15%;">Set the target width for
justifying and automatic hard-wrapping at this <i>number</i>
of columns. If the value is 0 or less, wrapping will occur
at the width of the screen minus <i>number</i> columns,
allowing the wrap point to vary along with the width of the
screen if the screen is resized. The default value is
<b>-8</b>.</p>
<p style="margin-left:11%;"><b>set functioncolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the concise function descriptions in the two help lines at
the bottom of the screen. See <b>set titlecolor</b> for more
details.</p>
<p style="margin-left:11%;"><b>set guidestripe</b>
<i>number</i></p>
<p style="margin-left:15%;">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 <b>set
stripecolor</b>.)</p>
<p style="margin-left:11%;"><b>set historylog</b></p>
<p style="margin-left:15%;">Save the last hundred search
strings and replacement strings and executed commands, so
they can be easily reused in later sessions.</p>
<p style="margin-left:11%;"><b>set indicator</b></p>
<p style="margin-left:15%;">Display a &quot;scrollbar&quot;
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.</p>
<p style="margin-left:11%;"><b>set jumpyscrolling</b></p>
<p style="margin-left:15%;">Scroll the buffer contents per
half-screen instead of per line.</p>
<p style="margin-left:11%;"><b>set keycolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the shortcut key combos in the two help lines at the bottom
of the screen. See <b>set titlecolor</b> for more
details.</p>
<p style="margin-left:11%;"><b>set linenumbers</b></p>
<p style="margin-left:15%;">Display line numbers to the
left of the text area. (Any line with an anchor additionally
gets a mark in the margin.)</p>
<p style="margin-left:11%;"><b>set locking</b></p>
<p style="margin-left:15%;">Enable vim-style lock-files for
when editing files.</p>
<p style="margin-left:11%;"><b>set magic</b></p>
<p style="margin-left:15%;">When neither the file&rsquo;s
name nor its first line give a clue, try using libmagic to
determine the applicable syntax. (Calling libmagic can be
relatively time consuming. It is therefore not done by
default.)</p>
<p style="margin-left:11%;"><b>set matchbrackets
&quot;</b><i>characters</i><b>&quot;</b></p>
<p style="margin-left:15%;">Specify the opening and closing
brackets that can be found by bracket 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.
The default value is &quot;<b>(&lt;[{)&gt;]}</b>&quot;.</p>
<p style="margin-left:11%;"><b>set minibar</b></p>
<p style="margin-left:15%;">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 &quot;minibar&quot; 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), the same flags as are shown by <b>set
stateflags</b>, and a percentage that expresses how far the
cursor is into the file (linewise). When a file is loaded or
saved, and also when switching between buffers, the number
of lines in the buffer is displayed after the filename. This
number is cleared upon the next keystroke, or replaced with
an [i/n] counter when multiple buffers are open. The line
plus column numbers and the character code are displayed
only when <b>set constantshow</b> is used, and can be
toggled on and off with <b>M-C</b>. The state flags are
displayed only when <b>set stateflags</b> is used.</p>
<p style="margin-left:11%;"><b>set minicolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the minibar. (When this option is not specified, the colors
of the title bar are used.) See <b>set titlecolor</b> for
more details.</p>
<p style="margin-left:11%;"><b>set mouse</b></p>
<p style="margin-left:15%;">Enable mouse support, if
available for your system. When enabled, mouse clicks can be
used to place the cursor, set the mark (with a double
click), and execute shortcuts. The mouse will work in the X
Window System, and on the console when gpm is running. Text
can still be selected through dragging by holding down the
Shift key.</p>
<p style="margin-left:11%;"><b>set multibuffer</b></p>
<p style="margin-left:15%;">When reading in a file with
<b>^R</b>, insert it into a new buffer by default.</p>
<p style="margin-left:11%;"><b>set noconvert</b></p>
<p style="margin-left:15%;">Don&rsquo;t convert files from
DOS/Mac format.</p>
<p style="margin-left:11%;"><b>set nohelp</b></p>
<p style="margin-left:15%;">Don&rsquo;t display the two
help lines at the bottom of the screen.</p>
<p style="margin-left:11%;"><b>set nonewlines</b></p>
<p style="margin-left:15%;">Don&rsquo;t automatically add a
newline when a text does not end with one. (This can cause
you to save non-POSIX text files.)</p>
<p style="margin-left:11%;"><b>set nowrap</b></p>
<p style="margin-left:15%;">Deprecated option since it has
become the default setting. When needed, use <b>unset
breaklonglines</b> instead.</p>
<p style="margin-left:11%;"><b>set numbercolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
line numbers. See <b>set titlecolor</b> for more
details.</p>
<p style="margin-left:11%;"><b>set operatingdir</b>
<i>directory</i></p>
<p style="margin-left:15%;"><b>nano</b> will only read and
write files inside <i>directory</i> and its subdirectories.
Also, the current directory is changed to here, so files are
inserted from this directory. By default, the operating
directory feature is turned off.</p>
<p style="margin-left:11%;"><b>set positionlog</b></p>
<p style="margin-left:15%;">Save the cursor position of
files between editing sessions. The cursor position is
remembered for the 200 most-recently edited files.</p>
<p style="margin-left:11%;"><b>set preserve</b></p>
<p style="margin-left:15%;">Preserve the XON and XOFF keys
(<b>^Q</b> and <b>^S</b>).</p>
<p style="margin-left:11%;"><b>set promptcolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the prompt bar. (When this option is not specified, the
colors of the title bar are used.) See <b>set titlecolor</b>
for more details.</p>
<p style="margin-left:11%;"><b>set punct
&quot;</b><i>characters</i><b>&quot;</b></p>
<p style="margin-left:15%;">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 (see
<b>brackets</b>), can end sentences. The default value is
&quot;<b>!.?</b>&quot;.</p>
<p style="margin-left:11%;"><b>set quickblank</b></p>
<p style="margin-left:15%;">Make status-bar messages
disappear after 1 keystroke instead of after 20. Note that
option <b>constantshow</b> overrides this. When option
<b>minibar</b> or <b>zero</b> is in effect,
<b>quickblank</b> makes a message disappear after 0.8
seconds instead of after the default 1.5 seconds.</p>
<p style="margin-left:11%;"><b>set quotestr
&quot;</b><i>regex</i><b>&quot;</b></p>
<p style="margin-left:15%;">Set the regular expression for
matching the quoting part of a line. The default value is
&quot;<b>^([&nbsp;\t]*([!#%:;&gt;|}]|//))+</b>&quot;. (Note
that <b>\t</b> stands for an actual Tab character.) This
makes it possible to rejustify blocks of quoted text when
composing email, and to rewrap blocks of line comments when
writing source code.</p>
<p style="margin-left:11%;"><b>set rawsequences</b></p>
<p style="margin-left:15%;">Interpret escape sequences
directly, instead of asking <b>ncurses</b> to translate
them. (If you need this option to get some keys to work
properly, it means that the terminfo terminal description
that is used does not fully match the actual behavior of
your terminal. This can happen when you ssh into a BSD
machine, for example.) Using this option disables
<b>nano</b>&rsquo;s mouse support.</p>
<p style="margin-left:11%;"><b>set rebinddelete</b></p>
<p style="margin-left:15%;">Interpret the Delete and
Backspace keys differently so that both Backspace and Delete
work properly. You should only use this option when on your
system either Backspace acts like Delete or Delete acts like
Backspace.</p>
<p style="margin-left:11%;"><b>set regexp</b></p>
<p style="margin-left:15%;">Do regular-expression searches
by default. Regular expressions in <b>nano</b> are of the
extended type (ERE).</p>
<p style="margin-left:11%;"><b>set saveonexit</b></p>
<p style="margin-left:15%;">Save a changed buffer
automatically on exit (<b>^X</b>); don&rsquo;t prompt.</p>
<p style="margin-left:11%;"><b>set scrollercolor</b>
<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the indicator alias &quot;scrollbar&quot;. (On terminal
emulators that link to a libvte older than version 0.55,
using a background color here does not work correctly.) See
<b>set titlecolor</b> for more details.</p>
<p style="margin-left:11%;"><b>set selectedcolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
selected text. See <b>set titlecolor</b> for more
details.</p>
<p style="margin-left:11%;"><b>set showcursor</b></p>
<p style="margin-left:15%;">Put the cursor on the
highlighted item in the file browser, and show the cursor in
the help viewer, to aid braille users and people with poor
vision.</p>
<p style="margin-left:11%;"><b>set smarthome</b></p>
<p style="margin-left:15%;">Make the Home key smarter. When
Home is pressed anywhere but at the very beginning of
non-whitespace characters on a line, the cursor will jump to
that beginning (either forwards or backwards). If the cursor
is already at that position, it will jump to the true
beginning of the line.</p>
<p style="margin-left:11%;"><b>set softwrap</b></p>
<p style="margin-left:15%;">Display lines that exceed the
screen&rsquo;s width over multiple screen lines. (You can
make this soft-wrapping occur at whitespace instead of
rudely at the screen&rsquo;s edge, by using also <b>set
atblanks</b>.)</p>
<p style="margin-left:11%;"><b>set speller
&quot;</b><i>program</i> [<i>argument</i>
...]<b>&quot;</b></p>
<p style="margin-left:15%;">Use the given <i>program</i> to
do spell checking and correcting, instead of using the
built-in corrector that calls <b>hunspell</b>(1) or
<b>spell</b>(1).</p>
<p style="margin-left:11%;"><b>set spotlightcolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
highlighting a search match. The default value is
<b>black,lightyellow</b>. See <b>set titlecolor</b> for
valid color names.</p>
<p style="margin-left:11%;"><b>set stateflags</b></p>
<p style="margin-left:15%;">Use the top-right corner of the
screen for showing some state flags: <b>I</b> when
auto-indenting, <b>M</b> when the mark is on, <b>L</b> when
hard-wrapping (breaking long lines), <b>R</b> when recording
a macro, and <b>S</b> when soft-wrapping. When the buffer is
modified, a star (<b>*</b>) is shown after the filename in
the center of the title bar.</p>
<p style="margin-left:11%;"><b>set statuscolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the status bar. See <b>set titlecolor</b> for more
details.</p>
<p style="margin-left:11%;"><b>set stripecolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the vertical guiding stripe. See <b>set titlecolor</b> for
more details.</p>
<p style="margin-left:11%;"><b>set tabsize</b>
<i>number</i></p>
<p style="margin-left:15%;">Use a tab size of <i>number</i>
columns. The value of <i>number</i> must be greater than 0.
The default value is <b>8</b>.</p>
<p style="margin-left:11%;"><b>set tabstospaces</b></p>
<p style="margin-left:15%;">Convert each typed tab to
spaces -- to the number of spaces that a tab at that
position would take up.</p>
<p style="margin-left:11%;"><b>set titlecolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i></p>
<p style="margin-left:15%;">Use this color combination for
the title bar. Valid names for the foreground and background
colors are: <b>red</b>, <b>green</b>, <b>blue</b>,
<b>magenta</b>, <b>yellow</b>, <b>cyan</b>, <b>white</b>,
and <b>black</b>. Each of these eight names may be prefixed
with the word <b>light</b> to get a brighter version of that
color. The word <b>grey</b> or <b>gray</b> may be used as a
synonym for <b>lightblack</b>. On terminal emulators that
can do at least 256 colors, other valid (but unprefixable)
color names are: <b>pink</b>, <b>purple</b>, <b>mauve</b>,
<b>lagoon</b>, <b>mint</b>, <b>lime</b>, <b>peach</b>,
<b>orange</b>, <b>latte</b>, <b>rosy</b>, <b>beet</b>,
<b>plum</b>, <b>sea</b>, <b>sky</b>, <b>slate</b>,
<b>teal</b>, <b>sage</b>, <b>brown</b>, <b>ocher</b>,
<b>sand</b>, <b>tawny</b>, <b>brick</b>, <b>crimson</b>, and
<b>normal</b> -- where <b>normal</b> means the default
foreground or background color. On such emulators, the color
may also be specified as a three-digit hexadecimal number
prefixed with <b>#</b>, with the digits representing the
amounts of red, green, and blue, respectively. This tells
<b>nano</b> to select from the available palette the color
that approximates the given values.</p>
<p style="margin-left:15%; margin-top: 1em">Either
&quot;<i>fgcolor</i>&quot; or
&quot;<b>,</b><i>bgcolor</i>&quot; may be left out, and the
pair may be preceded by <b>bold</b> and/or <b>italic</b>
(separated by commas) to get a bold and/or slanting
typeface, if your terminal can do those.</p>
<p style="margin-left:11%;"><b>set trimblanks</b></p>
<p style="margin-left:15%;">Remove trailing whitespace from
wrapped lines when automatic hard-wrapping occurs or when
text is justified.</p>
<p style="margin-left:11%;"><b>set unix</b></p>
<p style="margin-left:15%;">Save a file by default in Unix
format. This overrides nano&rsquo;s default behavior of
saving a file in the format that it had. (This option has no
effect when you also use <b>set noconvert</b>.)</p>
<p style="margin-left:11%;"><b>set whitespace
&quot;</b><i>characters</i><b>&quot;</b></p>
<p style="margin-left:15%;">Set the two characters used to
indicate the presence of tabs and spaces. They must be
single-column characters. The default pair for a UTF-8
locale is &quot;<b>&raquo;&sdot;</b>&quot;, and for other
locales &quot;<b>&gt;.</b>&quot;.</p>
<p style="margin-left:11%;"><b>set wordbounds</b></p>
<p style="margin-left:15%;">Detect word boundaries
differently by treating punctuation characters as parts of
words.</p>
<p style="margin-left:11%;"><b>set wordchars
&quot;</b><i>characters</i><b>&quot;</b></p>
<p style="margin-left:15%;">Specify which other characters
(besides the normal alphanumeric ones) should be considered
as parts of words. When using this option, you probably want
to unset <b>wordbounds</b>.</p>
<p style="margin-left:11%;"><b>set zap</b></p>
<p style="margin-left:15%;">Let an unmodified Backspace or
Delete erase the marked region (instead of a single
character, and without affecting the cutbuffer).</p>
<p style="margin-left:11%;"><b>set zero</b></p>
<p style="margin-left:15%;">Hide all elements of the
interface (title bar, status bar, and help lines) and use
all rows of the terminal for showing the contents of the
buffer. The status bar appears only when there is a
significant message, and disappears after 1.5 seconds or
upon the next keystroke. With <b>M-Z</b> the title bar plus
status bar can be toggled. With <b>M-X</b> the help
lines.</p>
<h2>NOTES
<a name="NOTES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Option <b>set
suspendable</b> has been removed. Suspension is enabled by
default, reachable via <b>^T^Z</b>. (If you want a plain
<b>^Z</b> to suspend nano, add <b>bind ^Z suspend main</b>
to your nanorc.)</p>
<h2>SYNTAX HIGHLIGHTING
<a name="SYNTAX HIGHLIGHTING"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Coloring the
different syntactic elements of a file is done via regular
expressions (see the <b>color</b> command below). This is
inherently imperfect, because regular expressions are not
powerful enough to fully parse a file. Nevertheless, regular
expressions can do a lot and are easy to make, so they are a
good fit for a small editor like <b>nano</b>.</p>
<p style="margin-left:11%; margin-top: 1em">All regular
expressions in <b>nano</b> are POSIX extended regular
expressions. This means that <b>.</b>, <b>?</b>, <b>*</b>,
<b>+</b>, <b>^</b>, <b>$</b>, and several other characters
are special. The period <b>.</b> matches any single
character, <b>?</b> means the preceding item is optional,
<b>*</b> means the preceding item may be matched zero or
more times, <b>+</b> means the preceding item must be
matched one or more times, <b>^</b> matches the beginning of
a line, and <b>$</b> the end, <b>\&lt;</b> matches the start
of a word, and <b>\&gt;</b> the end, and <b>\s</b> matches a
blank. It also means that lookahead and lookbehind are not
possible. A complete explanation can be found in the manual
page of GNU grep: <b>man grep</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Each regular
expression in a <b>nanorc</b> file should be wrapped in
double quotes (<b>&quot;&quot;</b>). Multiple regular
expressions can follow each other on a line by separating
them with blanks. This means that a regular expression
cannot contain a double quote followed by a blank. When you
need this combination inside a regular expression, then
either the double quote or the blank should be put between
square brackets (<b>[]</b>).</p>
<p style="margin-left:11%; margin-top: 1em">For each kind
of file a separate syntax can be defined via the following
commands: <b><br>
syntax</b> <i>name</i>
[<b>&quot;</b><i>fileregex</i><b>&quot;</b> ...]</p>
<p style="margin-left:22%;">Start the definition of a
syntax with this <i>name</i>. All subsequent <b>color</b>
and other such commands will be added to this syntax, until
a new <b>syntax</b> command is encountered.</p>
<p style="margin-left:22%; margin-top: 1em">When
<b>nano</b> is run, this syntax will be automatically
activated if the current filename matches the extended
regular expression <i>fileregex</i>. Or the syntax can be
explicitly activated by using the <b>-Y</b> or
<b>--syntax</b> command-line option followed by the
<i>name</i>.</p>
<p style="margin-left:22%; margin-top: 1em">The syntax
<b>default</b> is special: it takes no <i>fileregex</i>, and
applies to files that don&rsquo;t match any syntax&rsquo;s
regexes. The syntax <b>none</b> is reserved; specifying it
on the command line is the same as not having a syntax at
all.</p>
<p style="margin-left:11%;"><b>header
&quot;</b><i>regex</i><b>&quot;</b> ...</p>
<p style="margin-left:22%;">If from all defined syntaxes no
<i>fileregex</i> matched, then compare this <i>regex</i> (or
regexes) against the first line of the current file, to
determine whether this syntax should be used for it.</p>
<p style="margin-left:11%;"><b>magic
&quot;</b><i>regex</i><b>&quot;</b> ...</p>
<p style="margin-left:22%;">If no <i>fileregex</i> matched
and no <b>header</b> regex matched either, then compare this
<i>regex</i> (or regexes) against the result of querying the
<b>magic</b> database about the current file, to determine
whether this syntax should be used for it. (This
functionality only works when <b>libmagic</b> is installed
on the system and will be silently ignored otherwise.)</p>
<p style="margin-left:11%;"><b>formatter</b> <i>program</i>
[<i>argument</i> ...]</p>
<p style="margin-left:22%;">Run the given <i>program</i> on
the full contents of the current buffer.</p>
<p style="margin-left:11%;"><b>linter</b> <i>program</i>
[<i>argument</i> ...]</p>
<p style="margin-left:22%;">Use the given <i>program</i> to
run a syntax check on the current buffer.</p>
<p style="margin-left:11%;"><b>comment
&quot;</b><i>string</i><b>&quot;</b></p>
<p style="margin-left:22%;">Use the given <i>string</i> for
commenting and uncommenting lines. If the string contains a
vertical bar or pipe character (<b>|</b>), this designates
bracket-style comments; for example,
&quot;<b>/*|*/</b>&quot; for CSS files. The characters
before the pipe are prepended to the line and the characters
after the pipe are appended at the end of the line. If no
pipe character is present, the full string is prepended; for
example, &quot;<b>#</b>&quot; for Python files. If empty
double quotes are specified, the comment/uncomment function
is disabled; for example, &quot;&quot; for JSON. The default
value is &quot;<b>#</b>&quot;.</p>
<p style="margin-left:11%;"><b>tabgives
&quot;</b><i>string</i><b>&quot;</b></p>
<p style="margin-left:22%;">Make the &lt;Tab&gt; key
produce the given <i>string</i>. Useful for languages like
Python that want to see only spaces for indentation. This
overrides the setting of the <b>tabstospaces</b> option.</p>
<p style="margin-left:11%;"><b>color</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i>
<b>&quot;</b><i>regex</i><b>&quot;</b> ...</p>
<p style="margin-left:22%;">Paint all pieces of text that
match the extended regular expression <i>regex</i> with the
given foreground and background colors, at least one of
which must be specified. Valid color names are: <b>red</b>,
<b>green</b>, <b>blue</b>, <b>magenta</b>, <b>yellow</b>,
<b>cyan</b>, <b>white</b>, and <b>black</b>. Each of these
eight names may be prefixed with the word <b>light</b> to
get a brighter version of that color. The word <b>grey</b>
or <b>gray</b> may be used as a synonym for
<b>lightblack</b>. On terminal emulators that can do at
least 256 colors, other valid (but unprefixable) color names
are: <b>pink</b>, <b>purple</b>, <b>mauve</b>,
<b>lagoon</b>, <b>mint</b>, <b>lime</b>, <b>peach</b>,
<b>orange</b>, <b>latte</b>, <b>rosy</b>, <b>beet</b>,
<b>plum</b>, <b>sea</b>, <b>sky</b>, <b>slate</b>,
<b>teal</b>, <b>sage</b>, <b>brown</b>, <b>ocher</b>,
<b>sand</b>, <b>tawny</b>, <b>brick</b>, <b>crimson</b>, and
<b>normal</b> -- where <b>normal</b> means the default
foreground or background color. On such emulators, the color
may also be specified as a three-digit hexadecimal number
prefixed with <b>#</b>, with the digits representing the
amounts of red, green, and blue, respectively. This tells
<b>nano</b> to select from the available palette the color
that approximates the given values.</p>
<p style="margin-left:22%; margin-top: 1em">The color pair
may be preceded by <b>bold</b> and/or <b>italic</b>
(separated by commas) to get a bold and/or slanting
typeface, if your terminal can do those.</p>
<p style="margin-left:22%; margin-top: 1em">All coloring
commands are applied in the order in which they are
specified, which means that later commands can recolor stuff
that was colored earlier.</p>
<p style="margin-left:11%;"><b>icolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i>
<b>&quot;</b><i>regex</i><b>&quot;</b> ...</p>
<p style="margin-left:22%;">Same as above, except that the
matching is case insensitive.</p>
<p style="margin-left:11%;"><b>color</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i>
<b>start=&quot;</b><i>fromrx</i><b>&quot;
end=&quot;</b><i>torx</i><b>&quot;</b></p>
<p style="margin-left:22%;">Paint all pieces of text whose
start matches extended regular expression <i>fromrx</i> and
whose end matches extended regular expression <i>torx</i>
with the given foreground and background colors, at least
one of which must be specified. This means that, after an
initial instance of <i>fromrx</i>, all text until the first
instance of <i>torx</i> will be colored. This allows syntax
highlighting to span multiple lines.</p>
<p style="margin-left:11%;"><b>icolor</b>
[<b>bold,</b>][<b>italic,</b>]<i>fgcolor</i><b>,</b><i>bgcolor</i>
<b>start=&quot;</b><i>fromrx</i><b>&quot;
end=&quot;</b><i>torx</i><b>&quot;</b></p>
<p style="margin-left:22%;">Same as above, except that the
matching is case insensitive.</p>
<p style="margin-left:11%;"><b>include
&quot;</b><i>syntaxfile</i><b>&quot;</b></p>
<p style="margin-left:22%;">Read in self-contained color
syntaxes from <i>syntaxfile</i>. Note that <i>syntaxfile</i>
may contain only the above commands, from <b>syntax</b> to
<b>icolor</b>.</p>
<p style="margin-left:11%;"><b>extendsyntax</b> <i>name
command argument</i> ...</p>
<p style="margin-left:22%;">Extend the syntax previously
defined as <i>name</i> with another <i>command</i>. This
allows adding a new <b>color</b>, <b>icolor</b>,
<b>header</b>, <b>magic</b>, <b>formatter</b>,
<b>linter</b>, <b>comment</b>, or <b>tabgives</b> command to
an already defined syntax -- useful when you want to
slightly improve a syntax defined in one of the
system-installed files (which normally are not
writable).</p>
<h2>REBINDING KEYS
<a name="REBINDING KEYS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Key bindings
can be changed via the following three commands:</p>
<p style="margin-left:15%;"><b>bind</b> <i>key function
menu</i></p>
<p style="margin-left:26%;">Rebinds the given <i>key</i> to
the given <i>function</i> in the given <i>menu</i> (or in
all menus where the function exists when <b>all</b> is
used).</p>
<p style="margin-left:15%;"><b>bind</b> <i>key</i>
<b>&quot;</b><i>string</i><b>&quot;</b> <i>menu</i></p>
<p style="margin-left:26%;">Makes the given <i>key</i>
produce the given <i>string</i> in the given <i>menu</i> (or
in all menus where the key exists when <b>all</b> is used).
Besides literal text and/or control codes, the <i>string</i>
may contain function names between braces. These functions
will be invoked when the key is typed. To include a literal
opening brace, use <b>{{}</b>.</p>
<p style="margin-left:15%;"><b>unbind</b> <i>key
menu</i></p>
<p style="margin-left:26%;">Unbinds the given <i>key</i>
from the given <i>menu</i> (or from all menus where the key
exists when <b>all</b> is used).</p>
<p style="margin-left:11%; margin-top: 1em">Note that
<b>bind</b> <i>key</i>
<b>&quot;{</b><i>function</i><b>}&quot;</b> <i>menu</i> is
equivalent to <b>bind</b> <i>key function menu</i>, except
that for the latter form <b>nano</b> will check the
availabilty of the <i>function</i> in the given <i>menu</i>
at startup time (and report an error if it does not exist
there), whereas for the first form <b>nano</b> will check at
execution time that the <i>function</i> exists but not
whether it makes any sense in the current menu. The user has
to take care that a function name between braces (or any
sequence of them) is appropriate. Strange behavior can
result when it is not. <br>
The format of <i>key</i> should be one of:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td>
<td width="10%">
<p><b>^</b><i>X</i></p></td>
<td width="1%"></td>
<td width="74%">
<p>where <i>X</i> is a Latin letter, or one of several
ASCII characters (@, ], \, ^, _), or the word
&quot;Space&quot;. Example: ^C.</p></td></tr>
<tr valign="top" align="left">
<td width="15%"></td>
<td width="10%">
<p><b>M-</b><i>X</i></p></td>
<td width="1%"></td>
<td width="74%">
<p>where <i>X</i> is any ASCII character except [, or the
word &quot;Space&quot;. Example: M-8.</p></td></tr>
<tr valign="top" align="left">
<td width="15%"></td>
<td width="10%">
<p><b>Sh-M-</b><i>X</i></p></td>
<td width="1%"></td>
<td width="74%">
<p>where <i>X</i> is a Latin letter. Example: Sh-M-U. By
default, each Meta+letter keystroke does the same as the
corresponding Shift+Meta+letter. But when any Shift+Meta
bind is made, that will no longer be the case, for all
letters.</p> </td></tr>
<tr valign="top" align="left">
<td width="15%"></td>
<td width="10%">
<p><b>F</b><i>N</i></p></td>
<td width="1%"></td>
<td width="74%">
<p>where <i>N</i> is a numeric value from 1 to 24. Example:
F10. (Often, <b>F13</b> to <b>F24</b> can be typed as
<b>F1</b> to <b>F12</b> with Shift.)</p></td></tr>
</table>
<p style="margin-left:15%;"><b>Ins</b> or <b>Del</b>.</p>
<p style="margin-left:11%; margin-top: 1em">Rebinding
<b>^M</b> (Enter) or <b>^I</b> (Tab) is probably not a good
idea. Rebinding <b>^[</b> (Esc) is not possible, because its
keycode is the starter byte of Meta keystrokes and escape
sequences. Rebinding any of the dedicated cursor-moving keys
(the arrows, Home, End, PageUp and PageDown) is not
possible. On some terminals it&rsquo;s not possible to
rebind <b>^H</b> (unless <b>--raw</b> is used) because its
keycode is identical to that of the Backspace key. <br>
Valid <i>function</i> names to be bound are:</p>
<p style="margin-left:15%;"><b>help</b></p>
<p style="margin-left:18%;">Invokes the help viewer.</p>
<p style="margin-left:15%;"><b>cancel</b></p>
<p style="margin-left:18%;">Cancels the current
command.</p>
<p style="margin-left:15%;"><b>exit</b></p>
<p style="margin-left:18%;">Exits from the program (or from
the help viewer or file browser).</p>
<p style="margin-left:15%;"><b>writeout</b></p>
<p style="margin-left:18%;">Writes the current buffer to
disk, asking for a name.</p>
<p style="margin-left:15%;"><b>savefile</b></p>
<p style="margin-left:18%;">Writes the current file to disk
without prompting.</p>
<p style="margin-left:15%;"><b>insert</b></p>
<p style="margin-left:18%;">Inserts a file into the current
buffer (at the current cursor position), or into a new
buffer when option <b>multibuffer</b> is set.</p>
<p style="margin-left:15%;"><b>whereis</b></p>
<p style="margin-left:18%;">Starts a forward search for
text in the current buffer -- or for filenames matching a
string in the current list in the file browser.</p>
<p style="margin-left:15%;"><b>wherewas</b></p>
<p style="margin-left:18%;">Starts a backward search for
text in the current buffer -- or for filenames matching a
string in the current list in the file browser.</p>
<p style="margin-left:15%;"><b>findprevious</b></p>
<p style="margin-left:18%;">Searches the next occurrence in
the backward direction.</p>
<p style="margin-left:15%;"><b>findnext</b></p>
<p style="margin-left:18%;">Searches the next occurrence in
the forward direction.</p>
<p style="margin-left:15%;"><b>replace</b></p>
<p style="margin-left:18%;">Interactively replaces text
within the current buffer.</p>
<p style="margin-left:15%;"><b>cut</b></p>
<p style="margin-left:18%;">Cuts and stores the current
line (or the marked region).</p>
<p style="margin-left:15%;"><b>copy</b></p>
<p style="margin-left:18%;">Copies the current line (or the
marked region) without deleting it.</p>
<p style="margin-left:15%;"><b>paste</b></p>
<p style="margin-left:18%;">Pastes the currently stored
text into the current buffer at the current cursor
position.</p>
<p style="margin-left:15%;"><b>zap</b></p>
<p style="margin-left:18%;">Throws away the current line
(or the marked region). (This function is bound by default
to &lt;Meta+Delete&gt;.)</p>
<p style="margin-left:15%;"><b>chopwordleft</b></p>
<p style="margin-left:18%;">Deletes from the cursor
position to the beginning of the preceding word. (This
function is bound by default to &lt;Shift+Ctrl+Delete&gt;.
If your terminal produces <b>^H</b> for
&lt;Ctrl+Backspace&gt;, you can make &lt;Ctrl+Backspace&gt;
delete the word to the left of the cursor by rebinding
<b>^H</b> to this function.)</p>
<p style="margin-left:15%;"><b>chopwordright</b></p>
<p style="margin-left:18%;">Deletes from the cursor
position to the beginning of the next word. (This function
is bound by default to &lt;Ctrl+Delete&gt;.)</p>
<p style="margin-left:15%;"><b>cutrestoffile</b></p>
<p style="margin-left:18%;">Cuts all text from the cursor
position till the end of the buffer.</p>
<p style="margin-left:15%;"><b>mark</b></p>
<p style="margin-left:18%;">Sets the mark at the current
position, to start selecting text. Or, when it is set,
unsets the mark.</p>
<p style="margin-left:15%;"><b>location</b></p>
<p style="margin-left:18%;">Reports the current position of
the cursor in the buffer: the line, column, and character
positions.</p>
<p style="margin-left:15%;"><b>wordcount</b></p>
<p style="margin-left:18%;">Counts and reports on the
status bar the number of lines, words, and characters in the
current buffer (or in the marked region).</p>
<p style="margin-left:15%;"><b>execute</b></p>
<p style="margin-left:18%;">Prompts for a program to
execute. The program&rsquo;s output will be inserted into
the current buffer (or into a new buffer when <b>M-F</b> is
toggled).</p>
<p style="margin-left:15%;"><b>speller</b></p>
<p style="margin-left:18%;">Invokes a spell-checking
program, either the default <b>hunspell</b>(1) or GNU
<b>spell</b>(1), or the one defined by <b>--speller</b> or
<b>set speller</b>.</p>
<p style="margin-left:15%;"><b>formatter</b></p>
<p style="margin-left:18%;">Invokes a
full-buffer-processing program (if the active syntax defines
one). (The current buffer is written out to a temporary
file, the program is run on it, and then the temporary file
is read back in, replacing the contents of the buffer.)</p>
<p style="margin-left:15%;"><b>linter</b></p>
<p style="margin-left:18%;">Invokes a syntax-checking
program (if the active syntax defines one). If this program
produces lines of the form &quot;filename:linenum:charnum:
some message&quot;, then the cursor will be put at the
indicated position in the mentioned file while showing
&quot;some message&quot; on the status bar. You can move
from message to message with &lt;PgUp&gt; and &lt;PgDn&gt;,
and leave linting mode with <b>^C</b> or &lt;Enter&gt;.</p>
<p style="margin-left:15%;"><b>justify</b></p>
<p style="margin-left:18%;">Justifies the current paragraph
(or the marked region). A paragraph is a group of contiguous
lines that, apart from possibly the first line, all have the
same indentation. The beginning of a paragraph is detected
by either this lone line with a differing indentation or by
a preceding blank line.</p>
<p style="margin-left:15%;"><b>fulljustify</b></p>
<p style="margin-left:18%;">Justifies the entire current
buffer (or the marked region).</p>
<p style="margin-left:15%;"><b>indent</b></p>
<p style="margin-left:18%;">Indents (shifts to the right)
the current line or the marked lines.</p>
<p style="margin-left:15%;"><b>unindent</b></p>
<p style="margin-left:18%;">Unindents (shifts to the left)
the current line or the marked lines.</p>
<p style="margin-left:15%;"><b>comment</b></p>
<p style="margin-left:18%;">Comments or uncomments the
current line or the marked lines, using the comment style
specified in the active syntax.</p>
<p style="margin-left:15%;"><b>complete</b></p>
<p style="margin-left:18%;">Completes (when possible) the
fragment before the cursor to a full word found elsewhere in
the current buffer.</p>
<p style="margin-left:15%;"><b>left</b></p>
<p style="margin-left:18%;">Goes left one position (in the
editor or browser).</p>
<p style="margin-left:15%;"><b>right</b></p>
<p style="margin-left:18%;">Goes right one position (in the
editor or browser).</p>
<p style="margin-left:15%;"><b>up</b></p>
<p style="margin-left:18%;">Goes one line up (in the editor
or browser).</p>
<p style="margin-left:15%;"><b>down</b></p>
<p style="margin-left:18%;">Goes one line down (in the
editor or browser).</p>
<p style="margin-left:15%;"><b>scrollup</b></p>
<p style="margin-left:18%;">Scrolls the viewport up one row
(meaning that the text slides down) while keeping the cursor
in the same text position, if possible. (This function is
bound by default to &lt;Alt+Up&gt;. If &lt;Alt+Up&gt; does
nothing on your Linux console, see the FAQ:
<a href="https://nano-editor.org/dist/latest/faq.html#4.1">https://nano-editor.org/dist/latest/faq.html#4.1</a>.)</p>
<p style="margin-left:15%;"><b>scrolldown</b></p>
<p style="margin-left:18%;">Scrolls the viewport down one
row (meaning that the text slides up) while keeping the
cursor in the same text position, if possible. (This
function is bound by default to &lt;Alt+Down&gt;.)</p>
<p style="margin-left:15%;"><b>center</b></p>
<p style="margin-left:18%;">Scrolls the line with the
cursor to the middle of the screen.</p>
<p style="margin-left:15%;"><b>prevword</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the previous word.</p>
<p style="margin-left:15%;"><b>nextword</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the next word.</p>
<p style="margin-left:15%;"><b>home</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the current line.</p>
<p style="margin-left:15%;"><b>end</b></p>
<p style="margin-left:18%;">Moves the cursor to the end of
the current line.</p>
<p style="margin-left:15%;"><b>beginpara</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the current paragraph.</p>
<p style="margin-left:15%;"><b>endpara</b></p>
<p style="margin-left:18%;">Moves the cursor to the end of
the current paragraph.</p>
<p style="margin-left:15%;"><b>prevblock</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the current or preceding block of text. (Blocks
are separated by one or more blank lines.)</p>
<p style="margin-left:15%;"><b>nextblock</b></p>
<p style="margin-left:18%;">Moves the cursor to the
beginning of the next block of text.</p>
<p style="margin-left:15%;"><b>pageup</b></p>
<p style="margin-left:18%;">Goes up one screenful.</p>
<p style="margin-left:15%;"><b>pagedown</b></p>
<p style="margin-left:18%;">Goes down one screenful.</p>
<p style="margin-left:15%;"><b>firstline</b></p>
<p style="margin-left:18%;">Goes to the first line of the
file.</p>
<p style="margin-left:15%;"><b>lastline</b></p>
<p style="margin-left:18%;">Goes to the last line of the
file.</p>
<p style="margin-left:15%;"><b>gotoline</b></p>
<p style="margin-left:18%;">Goes to a specific line (and
column if specified). Negative numbers count from the end of
the file (and end of the line).</p>
<p style="margin-left:15%;"><b>findbracket</b></p>
<p style="margin-left:18%;">Moves the cursor to the bracket
(or brace or parenthesis, etc.) that matches (pairs) with
the one under the cursor. See <b>set matchbrackets</b>.</p>
<p style="margin-left:15%;"><b>anchor</b></p>
<p style="margin-left:18%;">Places an anchor at the current
line, or removes it when already present. (An anchor is
visible when line numbers are activated.)</p>
<p style="margin-left:15%;"><b>prevanchor</b></p>
<p style="margin-left:18%;">Goes to the first anchor before
the current line.</p>
<p style="margin-left:15%;"><b>nextanchor</b></p>
<p style="margin-left:18%;">Goes to the first anchor after
the current line.</p>
<p style="margin-left:15%;"><b>prevbuf</b></p>
<p style="margin-left:18%;">Switches to editing/viewing the
previous buffer when multiple buffers are open.</p>
<p style="margin-left:15%;"><b>nextbuf</b></p>
<p style="margin-left:18%;">Switches to editing/viewing the
next buffer when multiple buffers are open.</p>
<p style="margin-left:15%;"><b>verbatim</b></p>
<p style="margin-left:18%;">Inserts the next keystroke
verbatim into the file, or begins Unicode input when a
hexadecimal digit is typed.</p>
<p style="margin-left:15%;"><b>tab</b></p>
<p style="margin-left:18%;">Inserts a tab at the current
cursor location.</p>
<p style="margin-left:15%;"><b>enter</b></p>
<p style="margin-left:18%;">Inserts a new line below the
current one.</p>
<p style="margin-left:15%;"><b>delete</b></p>
<p style="margin-left:18%;">Deletes the character under the
cursor.</p>
<p style="margin-left:15%;"><b>backspace</b></p>
<p style="margin-left:18%;">Deletes the character before
the cursor.</p>
<p style="margin-left:15%;"><b>recordmacro</b></p>
<p style="margin-left:18%;">Starts the recording of
keystrokes -- the keystrokes are stored as a macro. When
already recording, the recording is stopped.</p>
<p style="margin-left:15%;"><b>runmacro</b></p>
<p style="margin-left:18%;">Replays the keystrokes of the
last recorded macro.</p>
<p style="margin-left:15%;"><b>undo</b></p>
<p style="margin-left:18%;">Undoes the last performed text
action (add text, delete text, etc).</p>
<p style="margin-left:15%;"><b>redo</b></p>
<p style="margin-left:18%;">Redoes the last undone action
(i.e., it undoes an undo).</p>
<p style="margin-left:15%;"><b>refresh</b></p>
<p style="margin-left:18%;">Refreshes the screen.</p>
<p style="margin-left:15%;"><b>suspend</b></p>
<p style="margin-left:18%;">Suspends the editor and returns
control to the shell (until you tell the process to resume
execution with <b>fg</b>).</p>
<p style="margin-left:15%;"><b>casesens</b></p>
<p style="margin-left:18%;">Toggles whether
searching/replacing ignores or respects the case of the
given characters.</p>
<p style="margin-left:15%;"><b>regexp</b></p>
<p style="margin-left:18%;">Toggles whether
searching/replacing uses literal strings or regular
expressions.</p>
<p style="margin-left:15%;"><b>backwards</b></p>
<p style="margin-left:18%;">Toggles whether
searching/replacing goes forward or backward.</p>
<p style="margin-left:15%;"><b>older</b></p>
<p style="margin-left:18%;">Retrieves the previous
(earlier) entry at a prompt.</p>
<p style="margin-left:15%;"><b>newer</b></p>
<p style="margin-left:18%;">Retrieves the next (later)
entry at a prompt.</p>
<p style="margin-left:15%;"><b>flipreplace</b></p>
<p style="margin-left:18%;">Toggles between searching for
something and replacing something.</p>
<p style="margin-left:15%;"><b>flipgoto</b></p>
<p style="margin-left:18%;">Toggles between searching for
text and targeting a line number.</p>
<p style="margin-left:15%;"><b>flipexecute</b></p>
<p style="margin-left:18%;">Toggles between inserting a
file and executing a command.</p>
<p style="margin-left:15%;"><b>flippipe</b></p>
<p style="margin-left:18%;">When executing a command,
toggles whether the current buffer (or marked region) is
piped to the command.</p>
<p style="margin-left:15%;"><b>flipnewbuffer</b></p>
<p style="margin-left:18%;">Toggles between inserting into
the current buffer and into a new empty buffer.</p>
<p style="margin-left:15%;"><b>flipconvert</b></p>
<p style="margin-left:18%;">When reading in a file, toggles
between converting and not converting it from DOS/Mac
format. Converting is the default.</p>
<p style="margin-left:15%;"><b>dosformat</b></p>
<p style="margin-left:18%;">When writing a file, switches
to writing a DOS format (CR/LF).</p>
<p style="margin-left:15%;"><b>macformat</b></p>
<p style="margin-left:18%;">When writing a file, switches
to writing a Mac format.</p>
<p style="margin-left:15%;"><b>append</b></p>
<p style="margin-left:18%;">When writing a file, appends to
the end instead of overwriting.</p>
<p style="margin-left:15%;"><b>prepend</b></p>
<p style="margin-left:18%;">When writing a file,
&rsquo;prepends&rsquo; (writes at the beginning) instead of
overwriting.</p>
<p style="margin-left:15%;"><b>backup</b></p>
<p style="margin-left:18%;">When writing a file, creates a
backup of the current file.</p>
<p style="margin-left:15%;"><b>discardbuffer</b></p>
<p style="margin-left:18%;">When about to write a file,
discard the current buffer without saving. (This function is
bound by default only when option <b>--saveonexit</b> is in
effect.)</p>
<p style="margin-left:15%;"><b>browser</b></p>
<p style="margin-left:18%;">Starts the file browser (in the
Read File and Write Out menus), allowing to select a file
from a list.</p>
<p style="margin-left:15%;"><b>gotodir</b></p>
<p style="margin-left:18%;">Goes to a directory to be
specified, allowing to browse anywhere in the
filesystem.</p>
<p style="margin-left:15%;"><b>firstfile</b></p>
<p style="margin-left:18%;">Goes to the first file in the
list when using the file browser.</p>
<p style="margin-left:15%;"><b>lastfile</b></p>
<p style="margin-left:18%;">Goes to the last file in the
list when using the file browser.</p>
<p style="margin-left:15%;"><b>nohelp</b></p>
<p style="margin-left:18%;">Toggles the presence of the
two-line list of key bindings at the bottom of the screen.
(This toggle is special: it is available in all menus except
the help viewer and the linter. All further toggles are
available in the main menu only.)</p>
<p style="margin-left:15%;"><b>zero</b></p>
<p style="margin-left:18%;">Toggles the presence of title
bar and status bar.</p>
<p style="margin-left:15%;"><b>constantshow</b></p>
<p style="margin-left:18%;">Toggles the constant display of
the current line, column, and character positions.</p>
<p style="margin-left:15%;"><b>softwrap</b></p>
<p style="margin-left:18%;">Toggles the displaying of
overlong lines on multiple screen lines.</p>
<p style="margin-left:15%;"><b>linenumbers</b></p>
<p style="margin-left:18%;">Toggles the display of line
numbers in front of the text.</p>
<p style="margin-left:15%;"><b>whitespacedisplay</b></p>
<p style="margin-left:18%;">Toggles the showing of
whitespace.</p>
<p style="margin-left:15%;"><b>nosyntax</b></p>
<p style="margin-left:18%;">Toggles syntax
highlighting.</p>
<p style="margin-left:15%;"><b>smarthome</b></p>
<p style="margin-left:18%;">Toggles the smartness of the
Home key.</p>
<p style="margin-left:15%;"><b>autoindent</b></p>
<p style="margin-left:18%;">Toggles whether a newly created
line will contain the same amount of leading whitespace as
the preceding line -- or as the next line if the preceding
line is the beginning of a paragraph.</p>
<p style="margin-left:15%;"><b>cutfromcursor</b></p>
<p style="margin-left:18%;">Toggles whether cutting text
will cut the whole line or just from the current cursor
position to the end of the line.</p>
<p style="margin-left:15%;"><b>breaklonglines</b></p>
<p style="margin-left:18%;">Toggles whether long lines will
be hard-wrapped to the next line. (The old name of this
function, &rsquo;nowrap&rsquo;, is deprecated.)</p>
<p style="margin-left:15%;"><b>tabstospaces</b></p>
<p style="margin-left:18%;">Toggles whether typed tabs will
be converted to spaces.</p>
<p style="margin-left:15%;"><b>mouse</b></p>
<p style="margin-left:18%;">Toggles mouse support.</p>
<p style="margin-left:11%;">Valid <i>menu</i> sections
are:</p>
<p style="margin-left:15%;"><b>main</b></p>
<p style="margin-left:18%;">The main editor window where
text is entered and edited.</p>
<p style="margin-left:15%;"><b>help</b></p>
<p style="margin-left:18%;">The help-viewer menu.</p>
<p style="margin-left:15%;"><b>search</b></p>
<p style="margin-left:18%;">The search menu (AKA
whereis).</p>
<p style="margin-left:15%;"><b>replace</b></p>
<p style="margin-left:18%;">The &rsquo;search to
replace&rsquo; menu.</p>
<p style="margin-left:15%;"><b>replacewith</b></p>
<p style="margin-left:18%;">The &rsquo;replace with&rsquo;
menu, which comes up after &rsquo;search to
replace&rsquo;.</p>
<p style="margin-left:15%;"><b>yesno</b></p>
<p style="margin-left:18%;">The &rsquo;yesno&rsquo; menu,
where the Yes/No/All/Cancel question is asked.</p>
<p style="margin-left:15%;"><b>gotoline</b></p>
<p style="margin-left:18%;">The &rsquo;goto line (and
column)&rsquo; menu.</p>
<p style="margin-left:15%;"><b>writeout</b></p>
<p style="margin-left:18%;">The &rsquo;write file&rsquo;
menu.</p>
<p style="margin-left:15%;"><b>insert</b></p>
<p style="margin-left:18%;">The &rsquo;insert file&rsquo;
menu.</p>
<p style="margin-left:15%;"><b>browser</b></p>
<p style="margin-left:18%;">The &rsquo;file browser&rsquo;
menu, for selecting a file to be opened or inserted or
written to.</p>
<p style="margin-left:15%;"><b>whereisfile</b></p>
<p style="margin-left:18%;">The &rsquo;search for a
file&rsquo; menu in the file browser.</p>
<p style="margin-left:15%;"><b>gotodir</b></p>
<p style="margin-left:18%;">The &rsquo;go to
directory&rsquo; menu in the file browser.</p>
<p style="margin-left:15%;"><b>execute</b></p>
<p style="margin-left:18%;">The menu for inserting the
output from an external command, or for filtering the buffer
(or the marked region) through an external command, or for
executing one of several tools.</p>
<p style="margin-left:15%;"><b>spell</b></p>
<p style="margin-left:18%;">The menu of the integrated
spell checker where the user can edit a misspelled word.</p>
<p style="margin-left:15%;"><b>linter</b></p>
<p style="margin-left:18%;">The linter menu, which allows
jumping through the linting messages.</p>
<p style="margin-left:15%;"><b>all</b></p>
<p style="margin-left:18%;">A special name that encompasses
all menus. For <b>bind</b> it means all menus where the
specified <i>function</i> exists; for <b>unbind</b> it means
all menus where the specified <i>key</i> exists.</p>
<h2>FILES
<a name="FILES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i>/etc/nanorc</i></p>
<p style="margin-left:22%;">System-wide configuration
file.</p>
<p style="margin-left:11%;"><i>~/.nanorc</i> or
<i>$XDG_CONFIG_HOME/nano/nanorc</i> or
<i>~/.config/nano/nanorc</i></p>
<p style="margin-left:22%;">Per-user configuration
file.</p>
<p style="margin-left:11%;"><i>/usr/share/nano/*</i></p>
<p style="margin-left:22%;">Syntax definitions for the
syntax coloring of common file types (and for less common
file types in the <i>extra/</i> subdirectory).</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>nano</b>(1)
<i><br>
https://nano-editor.org/cheatsheet.html</i></p>
<p style="margin-left:22%;">An overview of the default key
bindings.</p>
<hr>
</body>
</html>