2020-01-15 10:42:38 +00:00
|
|
|
.\" Copyright (C) 2003-2011, 2013-2020 Free Software Foundation, Inc.
|
2003-02-09 01:28:40 +00:00
|
|
|
.\"
|
2007-08-23 04:34:35 +00:00
|
|
|
.\" This document is dual-licensed. You may distribute and/or modify it
|
|
|
|
.\" under the terms of either of the following licenses:
|
|
|
|
.\"
|
|
|
|
.\" * The GNU General Public License, as published by the Free Software
|
|
|
|
.\" Foundation, version 3 or (at your option) any later version. You
|
|
|
|
.\" should have received a copy of the GNU General Public License
|
|
|
|
.\" along with this program. If not, see
|
2018-11-11 11:28:40 +00:00
|
|
|
.\" <https://www.gnu.org/licenses/>.
|
2007-08-23 04:34:35 +00:00
|
|
|
.\"
|
|
|
|
.\" * The GNU Free Documentation License, as published by the Free
|
|
|
|
.\" Software Foundation, version 1.2 or (at your option) any later
|
|
|
|
.\" version, with no Invariant Sections, no Front-Cover Texts, and no
|
|
|
|
.\" Back-Cover Texts. You should have received a copy of the GNU Free
|
|
|
|
.\" Documentation License along with this program. If not, see
|
2018-11-11 11:28:40 +00:00
|
|
|
.\" <https://www.gnu.org/licenses/>.
|
2003-02-09 01:28:40 +00:00
|
|
|
.\"
|
2020-02-07 09:42:06 +00:00
|
|
|
.TH NANORC 5 "version 4.8" "February 2020"
|
2016-10-22 20:07:02 +00:00
|
|
|
|
2003-02-09 01:28:40 +00:00
|
|
|
.SH NAME
|
2016-10-22 20:07:02 +00:00
|
|
|
nanorc \- GNU nano's configuration file
|
|
|
|
|
2003-02-09 01:28:40 +00:00
|
|
|
.SH DESCRIPTION
|
2020-03-12 18:03:02 +00:00
|
|
|
The \fInanorc\fP files contain the default settings for \fBnano\fP,
|
|
|
|
a small and friendly editor. During startup, if \fB\-\-rcfile\fR
|
|
|
|
is not given, \fBnano\fR will read two files: first the
|
2019-03-25 14:31:47 +00:00
|
|
|
system-wide settings, from \fI/etc/nanorc\fP (the exact path might be
|
2017-11-17 20:40:54 +00:00
|
|
|
different on your system), and then the user-specific settings, either
|
2019-03-25 14:31:47 +00:00
|
|
|
from \fI~/.nanorc\fR or from \fI$XDG_CONFIG_HOME/nano/nanorc\fR
|
|
|
|
or from \fI~/.config/nano/nanorc\fR, whichever is encountered first.
|
2020-01-19 12:27:41 +00:00
|
|
|
If \fB\-\-rcfile\fR is given, \fBnano\fR will read just the specified
|
|
|
|
settings file.
|
2003-02-09 01:28:40 +00:00
|
|
|
|
2020-02-06 14:15:36 +00:00
|
|
|
.SH NOTICE
|
|
|
|
Since version 4.0, \fBnano\fR by default:
|
|
|
|
.sp
|
|
|
|
.RS 4
|
|
|
|
\(bu does not automatically hard-wrap lines that become overlong,
|
|
|
|
.br
|
|
|
|
\(bu includes the line below the title bar in the editing area,
|
|
|
|
.br
|
|
|
|
\(bu does linewise (smooth) scrolling.
|
|
|
|
.RE
|
|
|
|
.sp
|
|
|
|
To get the old, Pico behavior back, you can use \fBset breaklonglines\fR,
|
|
|
|
\fBset emptyline\fR, and \fBset jumpyscrolling\fR.
|
|
|
|
|
2003-02-09 01:28:40 +00:00
|
|
|
.SH OPTIONS
|
2006-04-05 13:40:56 +00:00
|
|
|
The configuration file accepts a series of \fBset\fP and \fBunset\fP
|
|
|
|
commands, which can be used to configure nano on startup without using
|
2014-05-05 19:32:42 +00:00
|
|
|
command-line options. Additionally, there are some commands to define
|
|
|
|
syntax highlighting and to rebind keys -- see the two separate sections
|
|
|
|
on those. \fBnano\fP reads one command per line.
|
2019-12-12 18:17:22 +00:00
|
|
|
All commands and keywords should be written in lowercase.
|
2019-04-01 15:31:35 +00:00
|
|
|
.sp
|
2009-12-02 03:36:22 +00:00
|
|
|
Options in \fInanorc\fP files take precedence over nano's defaults, and
|
2014-08-03 20:57:15 +00:00
|
|
|
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
|
2017-11-17 20:40:54 +00:00
|
|
|
\fInanorc\fR file in your own \fInanorc\fR. Options that take an
|
2014-08-03 20:57:15 +00:00
|
|
|
argument cannot be unset.
|
2019-04-01 15:31:35 +00:00
|
|
|
.sp
|
2019-06-07 09:15:02 +00:00
|
|
|
Quotes inside the \fIcharacters\fR parameters below should not be escaped.
|
|
|
|
The last double quote on the line will be seen as the closing quote.
|
2019-04-01 15:31:35 +00:00
|
|
|
.sp
|
2003-02-09 01:28:40 +00:00
|
|
|
The supported commands and arguments are:
|
|
|
|
|
|
|
|
.TP 3
|
2018-04-30 20:10:27 +00:00
|
|
|
.B set afterends
|
|
|
|
Make Ctrl+Right stop at word ends instead of beginnings.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set allow_insecure_backup
|
2010-06-21 03:10:10 +00:00
|
|
|
When backing up files, allow the backup to succeed even if its permissions
|
2014-06-20 18:40:34 +00:00
|
|
|
can't be (re)set due to special OS considerations. You should
|
2010-06-21 03:10:10 +00:00
|
|
|
NOT enable this option unless you are sure you need it.
|
|
|
|
.TP
|
2017-03-07 16:36:43 +00:00
|
|
|
.B set atblanks
|
|
|
|
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.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set autoindent
|
2018-05-30 08:19:57 +00:00
|
|
|
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).
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set backup
|
2015-06-07 18:45:34 +00:00
|
|
|
When saving a file, create a backup file by adding a tilde (\fB~\fP) to
|
|
|
|
the file's name.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2005-06-17 18:00:16 +00:00
|
|
|
.B set backupdir "\fIdirectory\fP"
|
2015-06-07 18:45:34 +00:00
|
|
|
Make and keep not just one backup file, but make and keep a uniquely
|
2017-07-14 13:21:30 +00:00
|
|
|
numbered one every time a file is saved -- when backups are enabled
|
2015-06-07 18:45:34 +00:00
|
|
|
with \fBset backup\fR or \fB\-\-backup\fR or \fB\-B\fR.
|
|
|
|
The uniquely numbered files are stored in the specified \fIdirectory\fR.
|
2005-06-16 18:48:30 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set boldtext
|
2017-06-18 17:53:18 +00:00
|
|
|
Use bold instead of reverse video for the title bar, status bar, key combos,
|
2017-07-29 18:24:42 +00:00
|
|
|
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.
|
2006-04-12 15:27:40 +00:00
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set brackets """ characters """
|
2006-05-23 16:23:10 +00:00
|
|
|
Set the characters treated as closing brackets when justifying
|
2014-05-06 20:43:00 +00:00
|
|
|
paragraphs. This may not include blank characters. Only closing
|
2018-06-01 13:31:32 +00:00
|
|
|
punctuation (see \fBset punct\fP), optionally followed by the specified
|
2014-05-06 20:43:00 +00:00
|
|
|
closing brackets, can end sentences. The default value is "\fB"')>]}\fP".
|
2004-02-28 16:24:31 +00:00
|
|
|
.TP
|
2019-02-19 18:05:28 +00:00
|
|
|
.B set breaklonglines
|
|
|
|
Automatically hard-wrap the current line when it becomes overlong.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set casesensitive
|
2014-05-05 19:32:42 +00:00
|
|
|
Do case-sensitive searches by default.
|
2005-06-16 18:48:30 +00:00
|
|
|
.TP
|
2015-07-15 19:40:37 +00:00
|
|
|
.B set constantshow
|
2003-02-15 13:34:03 +00:00
|
|
|
Constantly display the cursor position in the status bar.
|
2017-06-24 17:11:29 +00:00
|
|
|
This overrides the option \fBquickblank\fR.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2017-07-14 14:06:52 +00:00
|
|
|
.B set cutfromcursor
|
|
|
|
Use cut-from-cursor-to-end-of-line by default, instead of cutting the whole line.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2019-02-19 18:05:28 +00:00
|
|
|
.B set emptyline
|
|
|
|
Do not use the line below the title bar, leaving it entirely blank.
|
|
|
|
.TP
|
2018-02-24 12:31:15 +00:00
|
|
|
.B set errorcolor \fIfgcolor\fR,\fIbgcolor\fR
|
2018-02-20 08:50:54 +00:00
|
|
|
Use this color combination for the status bar when an error message is displayed.
|
2019-06-07 09:24:51 +00:00
|
|
|
The default value is \fBbrightwhite,red\fR.
|
2018-02-20 08:50:54 +00:00
|
|
|
See \fBset titlecolor\fR for valid color names.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set fill \fInumber\fR
|
2019-01-26 09:44:03 +00:00
|
|
|
Set the target width for justifying and automatic hard-wrapping at this
|
|
|
|
\fInumber\fR of columns. If the value is 0 or less, wrapping will occur
|
|
|
|
at the width of the screen minus \fInumber\fR columns, allowing the wrap
|
|
|
|
point to vary along with the width of the screen if the screen is resized.
|
2019-06-07 09:24:51 +00:00
|
|
|
The default value is \fB\-8\fR.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-05-04 10:24:34 +00:00
|
|
|
.B set functioncolor \fIfgcolor\fR,\fIbgcolor\fR
|
|
|
|
Specify the color combination to use for the function descriptions
|
|
|
|
in the two help lines at the bottom of the screen.
|
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2019-04-16 08:05:35 +00:00
|
|
|
.B set guidestripe \fInumber
|
|
|
|
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 \fBset stripecolor\fR.)
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set historylog
|
2017-11-17 20:40:54 +00:00
|
|
|
Save the last hundred search strings and replacement strings and
|
|
|
|
executed commands, so they can be easily reused in later sessions.
|
2003-06-29 02:25:46 +00:00
|
|
|
.TP
|
2019-02-19 18:05:28 +00:00
|
|
|
.B set jumpyscrolling
|
|
|
|
Scroll the buffer contents per half-screen instead of per line.
|
|
|
|
.TP
|
2014-05-04 10:24:34 +00:00
|
|
|
.B set keycolor \fIfgcolor\fR,\fIbgcolor\fR
|
|
|
|
Specify the color combination to use for the shortcut key combos
|
|
|
|
in the two help lines at the bottom of the screen.
|
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2016-10-20 08:44:29 +00:00
|
|
|
.B set linenumbers
|
|
|
|
Display line numbers to the left of the text area.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set locking
|
2013-01-01 03:24:39 +00:00
|
|
|
Enable vim-style lock-files for when editing files.
|
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set matchbrackets """ characters """
|
2006-01-06 21:51:10 +00:00
|
|
|
Set the opening and closing brackets that can be found by bracket
|
2014-05-06 20:43:00 +00:00
|
|
|
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 "\fB(<[{)>]}\fP".
|
2006-01-06 21:51:10 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set morespace
|
2019-02-20 15:23:25 +00:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset emptyline\fR instead.
|
2005-01-17 05:24:26 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set mouse
|
2006-05-24 20:55:44 +00:00
|
|
|
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
|
2014-05-05 19:32:42 +00:00
|
|
|
System, and on the console when gpm is running. Text can still be
|
2014-05-06 20:43:00 +00:00
|
|
|
selected through dragging by holding down the Shift key.
|
2005-01-17 05:24:26 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set multibuffer
|
2020-03-13 15:40:34 +00:00
|
|
|
When reading in a file with \fB^R\fR, insert it into a new buffer by default.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set noconvert
|
2003-02-09 01:28:40 +00:00
|
|
|
Don't convert files from DOS/Mac format.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set nohelp
|
2014-05-05 19:32:42 +00:00
|
|
|
Don't display the two help lines at the bottom of the screen.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set nonewlines
|
2019-06-04 17:54:58 +00:00
|
|
|
Don't automatically add a newline when a text does not end with one.
|
|
|
|
(This can cause you to save non-POSIX text files.)
|
2005-11-05 17:35:44 +00:00
|
|
|
.TP
|
2017-03-06 21:07:57 +00:00
|
|
|
.B set nopauses
|
2019-10-13 14:17:04 +00:00
|
|
|
Obsolete option. Ignored.
|
2017-03-06 21:07:57 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set nowrap
|
2019-02-20 15:23:25 +00:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset breaklonglines\fR instead.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2016-10-20 08:07:48 +00:00
|
|
|
.B set numbercolor \fIfgcolor\fR,\fIbgcolor\fR
|
|
|
|
Specify the color combination to use for line numbers.
|
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2005-06-17 18:00:16 +00:00
|
|
|
.B set operatingdir "\fIdirectory\fP"
|
2003-02-15 13:34:03 +00:00
|
|
|
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
2003-08-31 16:44:10 +00:00
|
|
|
subdirectories. Also, the current directory is changed to here, so
|
2011-02-24 02:14:30 +00:00
|
|
|
files are inserted from this directory. By default, the operating
|
2006-04-27 18:52:50 +00:00
|
|
|
directory feature is turned off.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2015-07-15 19:50:55 +00:00
|
|
|
.B set positionlog
|
2014-03-03 18:49:52 +00:00
|
|
|
Save the cursor position of files between editing sessions.
|
2016-01-25 20:51:00 +00:00
|
|
|
The cursor position is remembered for the 200 most-recently edited files.
|
2014-03-03 18:49:52 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set preserve
|
2020-03-13 15:40:34 +00:00
|
|
|
Preserve the XON and XOFF keys (\fB^Q\fR and \fB^S\fR).
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set punct """ characters """
|
2006-05-23 16:23:10 +00:00
|
|
|
Set the characters treated as closing punctuation when justifying
|
2014-05-06 20:43:00 +00:00
|
|
|
paragraphs. This may not include blank characters. Only the
|
|
|
|
specfified closing punctuation, optionally followed by closing brackets
|
|
|
|
(see \fBbrackets\fP), can end sentences. The default value is "\fB!.?\fP".
|
2004-05-29 16:38:57 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set quickblank
|
2017-06-18 17:53:18 +00:00
|
|
|
Do quick status-bar blanking: status-bar messages will disappear after 1
|
2017-06-24 17:11:29 +00:00
|
|
|
keystroke instead of 25. The option \fBconstantshow\fR overrides this.
|
2005-06-17 19:06:25 +00:00
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set quotestr """ regex """
|
2019-01-23 18:57:17 +00:00
|
|
|
Set the regular expression for matching the quoting part of a line.
|
2019-06-08 15:07:34 +00:00
|
|
|
The default value is "\fB^([\ \\t]*([!#%:;>|}]|//))+\fP".
|
2019-01-23 18:57:17 +00:00
|
|
|
(Note that \fB\\t\fR 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.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2018-12-28 18:20:40 +00:00
|
|
|
.B set rawsequences
|
|
|
|
Interpret escape sequences directly (instead of asking \fBncurses\fR to
|
|
|
|
translate them). If you need this option to get your keyboard to work
|
|
|
|
properly, please report a bug. Using this option disables \fBnano\fR's
|
|
|
|
mouse support.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set rebinddelete
|
2018-12-28 18:37:02 +00:00
|
|
|
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.
|
2003-08-31 16:44:10 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set regexp
|
2019-06-06 13:00:34 +00:00
|
|
|
Do regular-expression searches by default.
|
|
|
|
Regular expressions in \fBnano\fR are of the extended type (ERE).
|
2005-06-16 18:48:30 +00:00
|
|
|
.TP
|
2017-07-29 18:24:42 +00:00
|
|
|
.B set selectedcolor \fIfgcolor\fR,\fIbgcolor\fR
|
|
|
|
Specify the color combination to use for selected text.
|
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2016-09-11 07:41:09 +00:00
|
|
|
.B set showcursor
|
|
|
|
Put the cursor on the highlighted item in the file browser, to aid
|
|
|
|
braille users.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set smarthome
|
2004-05-22 20:15:20 +00:00
|
|
|
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.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set smooth
|
2019-02-20 15:23:25 +00:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset jumpyscrolling\fR instead.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set softwrap
|
2013-01-21 03:40:08 +00:00
|
|
|
Enable soft line wrapping for easier viewing of very long lines.
|
2009-08-17 07:52:10 +00:00
|
|
|
.TP
|
2020-02-04 11:23:58 +00:00
|
|
|
.B set speller """\fIprogram\fR [\fIargument \fR...]\fB"""
|
2019-11-25 16:38:50 +00:00
|
|
|
Use the given \fIprogram\fR to do spell checking and correcting, instead of
|
|
|
|
using the built-in corrector that calls \fBhunspell\fR or GNU \fBspell\fR.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-05-04 10:24:34 +00:00
|
|
|
.B set statuscolor \fIfgcolor\fR,\fIbgcolor\fR
|
2017-06-18 17:53:18 +00:00
|
|
|
Specify the color combination to use for the status bar.
|
2014-05-04 10:24:34 +00:00
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2019-03-03 10:38:53 +00:00
|
|
|
.B set stripecolor \fIfgcolor\fR,\fIbgcolor\fR
|
|
|
|
Specify the color combination to use for the vertical guiding stripe.
|
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2020-03-13 15:34:41 +00:00
|
|
|
.B set suspendable
|
|
|
|
Allow \fBnano\fP to be suspended (with \fB^Z\fR by default).
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set tabsize \fInumber\fR
|
|
|
|
Use a tab size of \fInumber\fR columns. The value of \fInumber\fP must be
|
|
|
|
greater than 0. The default value is \fB8\fR.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set tabstospaces
|
2005-06-15 23:20:56 +00:00
|
|
|
Convert typed tabs to spaces.
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set tempfile
|
2003-02-09 01:28:40 +00:00
|
|
|
Save automatically on exit, don't prompt.
|
|
|
|
.TP
|
2014-05-04 10:24:34 +00:00
|
|
|
.B set titlecolor \fIfgcolor\fR,\fIbgcolor\fR
|
2017-06-18 17:53:18 +00:00
|
|
|
Specify the color combination to use for the title bar.
|
2016-10-29 18:47:37 +00:00
|
|
|
Valid names for the foreground and background colors are:
|
2018-03-27 17:32:08 +00:00
|
|
|
.BR white ", " black ", " blue ", " green ", " red ", "
|
|
|
|
.BR cyan ", " yellow ", " magenta ", and " normal
|
|
|
|
-- where \fBnormal\fR means the default foreground or background color.
|
2016-10-29 18:47:37 +00:00
|
|
|
The name of the foreground color may be prefixed with \fBbright\fR.
|
2014-05-04 10:24:34 +00:00
|
|
|
And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out.
|
|
|
|
.TP
|
2017-12-02 13:02:26 +00:00
|
|
|
.B set trimblanks
|
|
|
|
Remove trailing whitespace from wrapped lines when automatic
|
|
|
|
hard-wrapping occurs or when text is justified.
|
|
|
|
.TP
|
2015-08-04 18:49:57 +00:00
|
|
|
.B set unix
|
|
|
|
Save a file by default in Unix format. This overrides nano's
|
|
|
|
default behavior of saving a file in the format that it had.
|
|
|
|
(This option has no effect when you also use \fBset noconvert\fR.)
|
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set view
|
2018-10-23 17:26:45 +00:00
|
|
|
Disallow file modification: read-only mode.
|
|
|
|
This mode allows the user to open also other files for viewing,
|
2019-03-24 10:32:01 +00:00
|
|
|
unless \fB\-\-restricted\fR is given on the command line.
|
2003-02-09 01:28:40 +00:00
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set whitespace """ characters """
|
2014-05-05 19:32:42 +00:00
|
|
|
Set the two characters used to indicate the presence of tabs and
|
2017-07-02 15:47:30 +00:00
|
|
|
spaces. They must be single-column characters. The default pair
|
2017-07-03 10:31:53 +00:00
|
|
|
for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR".
|
2004-05-29 16:25:30 +00:00
|
|
|
.TP
|
2014-08-03 20:57:15 +00:00
|
|
|
.B set wordbounds
|
2016-06-30 16:02:45 +00:00
|
|
|
Detect word boundaries differently by treating punctuation
|
2006-06-26 04:39:31 +00:00
|
|
|
characters as parts of words.
|
2016-06-30 16:02:45 +00:00
|
|
|
.TP
|
2019-06-07 09:15:02 +00:00
|
|
|
.BI "set wordchars """ characters """
|
2016-06-30 16:02:45 +00:00
|
|
|
Specify which other characters (besides the normal alphanumeric ones)
|
|
|
|
should be considered as parts of words. This overrides the option
|
|
|
|
\fBwordbounds\fR.
|
2018-10-24 09:02:08 +00:00
|
|
|
.TP
|
|
|
|
.B set zap
|
|
|
|
Let an unmodified Backspace or Delete erase the marked region
|
|
|
|
(instead of a single character, and without affecting the cutbuffer).
|
2014-05-05 19:32:42 +00:00
|
|
|
|
|
|
|
.SH SYNTAX HIGHLIGHTING
|
|
|
|
Coloring the different syntactic elements of a file
|
2015-03-07 21:30:36 +00:00
|
|
|
is done via regular expressions (see the \fBcolor\fR 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 \fBnano\fR.
|
|
|
|
.sp
|
2019-08-09 17:16:16 +00:00
|
|
|
All regular expressions in \fBnano\fR are POSIX extended regular expressions.
|
2019-06-06 13:00:34 +00:00
|
|
|
This means that \fB.\fR, \fB?\fR, \fB*\fR, \fB+\fR, \fB^\fR, \fB$\fR, and
|
|
|
|
several other characters are special.
|
|
|
|
The period \fB.\fR matches any single character,
|
|
|
|
\fB?\fR means the preceding item is optional,
|
|
|
|
\fB*\fR means the preceding item may be matched zero or more times,
|
|
|
|
\fB+\fR means the preceding item must be matched one or more times,
|
|
|
|
\fB^\fR matches the beginning of a line, and \fB$\fR the end,
|
|
|
|
\fB\\<\fR matches the start of a word, and \fB\\>\fR the end,
|
|
|
|
and \fB\\s\fR matches a blank.
|
|
|
|
It also means that lookahead and lookbehind are not possible.
|
2019-06-09 10:30:35 +00:00
|
|
|
A complete explanation can be found in the manual page of GNU grep:
|
|
|
|
\fBman grep\fR.
|
2019-06-06 13:00:34 +00:00
|
|
|
.sp
|
2017-07-14 13:21:30 +00:00
|
|
|
For each kind of file a separate syntax can be defined
|
2015-03-07 21:30:36 +00:00
|
|
|
via the following commands:
|
2005-08-10 22:51:49 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI syntax " name \fR[" """" fileregex """ " \fR...]
|
2017-07-14 13:21:30 +00:00
|
|
|
Start the definition of a syntax with this \fIname\fR.
|
|
|
|
All subsequent \fBcolor\fR and other such commands
|
|
|
|
will be added to this syntax, until a new \fBsyntax\fR
|
|
|
|
command is encountered.
|
2005-08-01 05:08:01 +00:00
|
|
|
|
2017-07-14 13:21:30 +00:00
|
|
|
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
|
2019-03-24 10:32:01 +00:00
|
|
|
activated by using the \fB\-Y\fR or \fB\-\-syntax\fR
|
2017-07-14 13:21:30 +00:00
|
|
|
command-line option followed by the \fIname\fR.
|
|
|
|
|
2018-05-31 09:25:21 +00:00
|
|
|
The syntax \fBdefault\fP is special: it takes no \fIfileregex\fR,
|
2017-07-14 13:21:30 +00:00
|
|
|
and applies to files that don't match any syntax's regexes.
|
2018-05-31 09:25:21 +00:00
|
|
|
The syntax \fBnone\fP is reserved; specifying it on the command line
|
2017-07-14 13:21:30 +00:00
|
|
|
is the same as not having a syntax at all.
|
2003-02-13 04:01:49 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "header """ regex """ \fR...
|
2017-07-15 10:32:57 +00:00
|
|
|
If from all defined syntaxes no \fIfileregex\fR matched, then compare
|
|
|
|
this \fIregex\fR (or regexes) against the first line of the current file,
|
|
|
|
to determine whether this syntax should be used for it.
|
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "magic """ regex """ \fR...
|
2017-07-15 10:32:57 +00:00
|
|
|
If no \fIfileregex\fR matched and no \fBheader\fR regex matched
|
|
|
|
either, then compare this \fIregex\fR (or regexes) against the
|
|
|
|
result of querying the \fBmagic\fP database about the current
|
|
|
|
file, to determine whether this syntax should be used for it.
|
|
|
|
(This functionality only works when \fBlibmagic\fP is installed on the
|
|
|
|
system and will be silently ignored otherwise.)
|
|
|
|
.TP
|
2020-02-04 11:23:58 +00:00
|
|
|
.BI formatter " program " \fR[ "argument " \fR...]
|
2019-10-11 17:41:01 +00:00
|
|
|
Run the given \fIprogram\fR on the full contents of the current buffer.
|
|
|
|
(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.)
|
|
|
|
.TP
|
2020-02-04 11:23:58 +00:00
|
|
|
.BI linter " program " \fR[ "argument " \fR...]
|
2018-05-30 17:57:28 +00:00
|
|
|
Use the given \fIprogram\fR to run a syntax check on the current buffer.
|
2014-02-24 10:18:15 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "comment """ string """
|
|
|
|
Use the given \fIstring\fR for commenting and uncommenting lines.
|
2017-07-06 19:35:07 +00:00
|
|
|
If the string contains a vertical bar or pipe character (\fB|\fR),
|
|
|
|
this designates bracket-style comments; for example, "\fB/*|*/\fR" for
|
2016-05-25 20:13:50 +00:00
|
|
|
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
|
2017-07-06 19:35:07 +00:00
|
|
|
character is present, the full string is prepended; for example, "\fB#\fR"
|
|
|
|
for Python files. If empty double quotes are specified, the comment/uncomment
|
|
|
|
function is disabled; for example, "" for JSON.
|
2017-07-02 15:47:30 +00:00
|
|
|
The default value is "\fB#\fP".
|
2016-05-25 20:13:50 +00:00
|
|
|
.TP
|
2019-09-22 10:31:12 +00:00
|
|
|
.BI "tabgives """ string """
|
|
|
|
Make the <Tab> key produce the given \fIstring\fR. Useful for languages like
|
|
|
|
Python that want to see only spaces for indentation.
|
|
|
|
This overrides the setting of the \fBtabstospaces\fR option.
|
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "color " fgcolor , bgcolor " """ regex """ " \fR...
|
2019-08-09 17:16:16 +00:00
|
|
|
Paint all pieces of text that match the extended regular expression
|
|
|
|
\fIregex\fP with the given foreground and background colors, at least
|
|
|
|
one of which must be specified. Valid color names are:
|
2018-08-10 17:32:45 +00:00
|
|
|
.BR white ", " black ", " blue ", " green ", " red ", "
|
|
|
|
.BR cyan ", " yellow ", " magenta ", and " normal
|
|
|
|
-- where \fBnormal\fR means the default foreground or background color.
|
2019-08-09 17:16:16 +00:00
|
|
|
You may use the prefix \fBbright\fR for the foreground color to get a
|
|
|
|
stronger highlight. If your terminal supports transparency, not specifying
|
|
|
|
a \fIbgcolor\fP tells \fBnano\fP to attempt to use a transparent background.
|
2019-10-06 12:27:29 +00:00
|
|
|
.sp
|
|
|
|
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.
|
2005-06-08 21:30:50 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "icolor " fgcolor , bgcolor " """ regex """ " \fR...
|
2017-04-21 09:27:12 +00:00
|
|
|
Same as above, except that the matching is case insensitive.
|
2005-06-27 03:07:10 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "color " fgcolor , bgcolor " start=""" fromrx """ end=""" torx """
|
2019-08-09 17:16:16 +00:00
|
|
|
Paint all pieces of text whose start matches extended regular expression
|
|
|
|
\fIfromrx\fP and whose end matches extended regular expression \fItorx\fP
|
|
|
|
with the given foreground and background colors,
|
2015-06-02 14:24:19 +00:00
|
|
|
at least one of which must be specified. This means that, after an
|
2017-04-21 09:27:12 +00:00
|
|
|
initial instance of \fIfromrx\fP, all text until the first instance of
|
|
|
|
\fItorx\fP will be colored. This allows syntax highlighting to span
|
2015-06-02 14:24:19 +00:00
|
|
|
multiple lines.
|
2005-06-27 03:07:10 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "icolor " fgcolor , bgcolor " start=""" fromrx """ end=""" torx """
|
2017-04-21 09:27:12 +00:00
|
|
|
Same as above, except that the matching is case insensitive.
|
2006-04-13 02:43:54 +00:00
|
|
|
.TP
|
2018-05-31 10:02:36 +00:00
|
|
|
.BI "include """ syntaxfile """
|
2006-04-13 02:43:54 +00:00
|
|
|
Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
|
2015-06-02 14:24:19 +00:00
|
|
|
\fIsyntaxfile\fP may contain only the above commands, from \fBsyntax\fP
|
2014-05-05 19:32:42 +00:00
|
|
|
to \fBicolor\fP.
|
2014-03-02 05:27:56 +00:00
|
|
|
.TP
|
2020-02-04 11:23:58 +00:00
|
|
|
.BI extendsyntax " name command argument " \fR...
|
2017-07-14 13:21:30 +00:00
|
|
|
Extend the syntax previously defined as \fIname\fR with another
|
|
|
|
\fIcommand\fR. This allows adding a new \fBcolor\fP, \fBicolor\fP,
|
2020-02-04 11:23:58 +00:00
|
|
|
\fBheader\fR, \fBmagic\fR, \fBformatter\fR, \fBlinter\fR, \fBcomment\fR,
|
|
|
|
or \fBtabgives\fR
|
2017-07-14 13:21:30 +00:00
|
|
|
command to an already defined syntax -- useful when you want to
|
2015-06-02 14:24:19 +00:00
|
|
|
slightly improve a syntax defined in one of the system-installed
|
2017-07-14 13:21:30 +00:00
|
|
|
files (which normally are not writable).
|
2017-04-19 18:31:04 +00:00
|
|
|
|
2014-05-05 19:32:42 +00:00
|
|
|
.SH REBINDING KEYS
|
2018-02-27 19:11:17 +00:00
|
|
|
Key bindings can be changed via the following three commands:
|
|
|
|
.RS 3
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-05-04 11:51:10 +00:00
|
|
|
.BI bind " key function menu"
|
2019-10-07 11:01:18 +00:00
|
|
|
Rebinds the given \fIkey\fP to the given \fIfunction\fP in the given \fImenu\fP
|
|
|
|
(or in all menus where the function exists when \fBall\fP is used).
|
2018-02-27 19:11:17 +00:00
|
|
|
.TP
|
|
|
|
.BI bind " key " """" string """" " menu"
|
|
|
|
Makes the given \fIkey\fR produce the given \fIstring\fR in the given
|
|
|
|
\fImenu\fR (or in all menus where the key exists when \fBall\fR is used).
|
|
|
|
The \fIstring\fR can consist of text or commands or a mix of them.
|
|
|
|
(To enter a command into the \fIstring\fR, precede its keystroke
|
2019-03-24 10:32:01 +00:00
|
|
|
with \fBM\-V\fR.)
|
2014-02-27 19:57:52 +00:00
|
|
|
.TP
|
2014-05-04 11:51:10 +00:00
|
|
|
.BI unbind " key menu"
|
2019-10-07 11:01:18 +00:00
|
|
|
Unbinds the given \fIkey\fP from the given \fImenu\fP (or from all
|
|
|
|
menus where the key exists when \fBall\fP is used).
|
2018-02-27 19:11:17 +00:00
|
|
|
.RE
|
2014-02-27 19:57:52 +00:00
|
|
|
|
|
|
|
.TP
|
|
|
|
The format of \fIkey\fP should be one of:
|
2015-03-07 21:48:15 +00:00
|
|
|
.RS 3
|
2020-01-21 15:44:53 +00:00
|
|
|
.TP 7
|
2019-10-07 11:01:18 +00:00
|
|
|
.BI ^ X
|
|
|
|
where \fIX\fR is a Latin letter, or one of several ASCII characters
|
|
|
|
(@, ], \\, ^, _), or the word "Space".
|
2018-07-19 18:11:02 +00:00
|
|
|
Example: ^C.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2019-10-07 11:01:18 +00:00
|
|
|
.BI M\- X
|
|
|
|
where \fIX\fR is any ASCII character except [, or the word "Space".
|
2020-01-21 15:44:53 +00:00
|
|
|
Example: M\-8.
|
|
|
|
.TP
|
|
|
|
.BI Sh\-M\- X
|
|
|
|
where \fIX\fR 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.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2019-10-07 11:01:18 +00:00
|
|
|
.BI F N
|
2019-10-07 14:10:26 +00:00
|
|
|
where \fIN\fR is a numeric value from 1 to 24.
|
2018-07-19 18:11:02 +00:00
|
|
|
Example: F10.
|
2019-10-07 14:10:26 +00:00
|
|
|
(Often, \fBF13\fR to \fBF24\fR can be typed as \fBF1\fR to \fBF12\fR with Shift.)
|
|
|
|
|
2018-06-09 16:54:44 +00:00
|
|
|
.TP
|
2019-10-07 11:01:18 +00:00
|
|
|
.BR Ins " or " Del .
|
2015-03-07 21:48:15 +00:00
|
|
|
.RE
|
2014-02-27 19:57:52 +00:00
|
|
|
|
2019-10-07 11:20:30 +00:00
|
|
|
Rebinding \fB^M\fR (Enter) or \fB^I\fR (Tab) is probably not a good idea.
|
2020-03-10 14:55:19 +00:00
|
|
|
Rebinding \fB^[\fR (Esc) is not possible, because its keycode
|
|
|
|
is the starter byte of escape sequences and Meta keystrokes.
|
2019-10-07 11:20:30 +00:00
|
|
|
On some terminals it's not possible to rebind \fB^H\fR (unless \fB\-\-raw\fR
|
|
|
|
is used) because its keycode is identical to that of the Backspace key.
|
|
|
|
|
2015-03-07 21:48:15 +00:00
|
|
|
.TP
|
2015-08-04 19:51:02 +00:00
|
|
|
Valid \fIfunction\fP names to be bound are:
|
2015-03-07 21:48:15 +00:00
|
|
|
.RS 3
|
2014-02-27 19:57:52 +00:00
|
|
|
.TP 2
|
2008-03-05 07:35:01 +00:00
|
|
|
.B help
|
2014-05-09 21:02:14 +00:00
|
|
|
Invokes the help viewer.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B cancel
|
2014-05-09 21:02:14 +00:00
|
|
|
Cancels the current command.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B exit
|
2014-05-09 21:02:14 +00:00
|
|
|
Exits from the program (or from the help viewer or the file browser).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B writeout
|
2015-07-25 19:25:50 +00:00
|
|
|
Writes the current buffer to disk, asking for a name.
|
|
|
|
.TP
|
|
|
|
.B savefile
|
2017-11-17 20:52:31 +00:00
|
|
|
Writes the current file to disk without prompting.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B insert
|
2015-04-18 16:07:53 +00:00
|
|
|
Inserts a file into the current buffer (at the current cursor position),
|
|
|
|
or into a new buffer when option \fBmultibuffer\fR is set.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B whereis
|
2017-09-17 20:07:25 +00:00
|
|
|
Starts a forward search for text in the current buffer -- or for filenames
|
|
|
|
matching a string in the current list in the file browser.
|
|
|
|
.TP
|
|
|
|
.B wherewas
|
2018-07-28 09:15:41 +00:00
|
|
|
Starts a backward search for text in the current buffer -- or for filenames
|
|
|
|
matching a string in the current list in the file browser.
|
2015-07-26 09:23:24 +00:00
|
|
|
.TP
|
|
|
|
.B findprevious
|
2018-07-28 09:15:41 +00:00
|
|
|
Searches the next occurrence in the backward direction.
|
2015-07-26 09:23:24 +00:00
|
|
|
.TP
|
|
|
|
.B findnext
|
2018-07-28 09:15:41 +00:00
|
|
|
Searches the next occurrence in the forward direction.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B replace
|
2014-05-09 21:02:14 +00:00
|
|
|
Interactively replaces text within the current buffer.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B cut
|
2014-05-09 21:02:14 +00:00
|
|
|
Cuts and stores the current line (or the marked region).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-06-01 10:47:04 +00:00
|
|
|
.B copy
|
2014-05-09 21:02:14 +00:00
|
|
|
Copies the current line (or the marked region) without deleting it.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2018-06-01 10:47:04 +00:00
|
|
|
.B paste
|
|
|
|
Pastes the currently stored text into the current buffer at the
|
2014-05-09 21:02:14 +00:00
|
|
|
current cursor position.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-10-24 02:25:22 +00:00
|
|
|
.B zap
|
2018-12-10 10:57:14 +00:00
|
|
|
Throws away the current line (or the marked region).
|
2018-10-24 09:17:28 +00:00
|
|
|
(This function is bound by default to <Meta+Delete>.)
|
2018-10-24 02:25:22 +00:00
|
|
|
.TP
|
2019-02-24 16:04:17 +00:00
|
|
|
.B chopwordleft
|
2019-02-24 10:00:06 +00:00
|
|
|
Deletes from the cursor position to the beginning of the preceding word.
|
2019-02-24 10:17:31 +00:00
|
|
|
(This function is bound by default to <Shift+Ctrl+Delete>. If your terminal
|
|
|
|
produces \fB^H\fR for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete
|
2020-03-13 15:40:34 +00:00
|
|
|
the word to the left of the cursor by rebinding \fB^H\fR to this function.)
|
2015-07-31 11:52:26 +00:00
|
|
|
.TP
|
2019-02-24 16:04:17 +00:00
|
|
|
.B chopwordright
|
2019-02-24 10:00:06 +00:00
|
|
|
Deletes from the cursor position to the beginning of the next word.
|
2018-07-22 06:32:15 +00:00
|
|
|
(This function is bound by default to <Ctrl+Delete>.)
|
2015-07-31 11:52:26 +00:00
|
|
|
.TP
|
2014-05-05 19:54:34 +00:00
|
|
|
.B cutrestoffile
|
2014-05-09 21:02:14 +00:00
|
|
|
Cuts all text from the cursor position till the end of the buffer.
|
2014-05-05 19:54:34 +00:00
|
|
|
.TP
|
2018-06-01 10:39:34 +00:00
|
|
|
.B mark
|
|
|
|
Sets the mark at the current position, to start selecting text.
|
|
|
|
Or, when it is set, unsets the mark.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B curpos
|
2014-05-09 21:02:14 +00:00
|
|
|
Shows the current cursor position: the line, column, and character positions.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B wordcount
|
2014-05-09 21:02:14 +00:00
|
|
|
Counts the number of words, lines and characters in the current buffer.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2014-04-26 19:33:11 +00:00
|
|
|
.B speller
|
2019-11-25 16:38:50 +00:00
|
|
|
Invokes a spell-checking program, either the default \fBhunspell\fR or GNU
|
|
|
|
\fBspell\fR, or the one defined by \fB\-\-speller\fR or \fBset speller\fR.
|
2014-04-26 19:33:11 +00:00
|
|
|
.TP
|
2019-10-25 15:17:48 +00:00
|
|
|
.B formatter
|
2019-10-11 17:41:01 +00:00
|
|
|
Invokes a full-buffer-processing program (if the active syntax defines one).
|
|
|
|
.TP
|
2015-03-25 19:33:00 +00:00
|
|
|
.B linter
|
2018-12-17 15:05:35 +00:00
|
|
|
Invokes a syntax-checking program (if the active syntax defines one).
|
2015-03-25 19:33:00 +00:00
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B justify
|
2018-05-30 08:28:04 +00:00
|
|
|
Justifies the current paragraph. 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.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B fulljustify
|
2014-05-09 21:02:14 +00:00
|
|
|
Justifies the entire current buffer.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B indent
|
2014-05-09 21:02:14 +00:00
|
|
|
Indents (shifts to the right) the currently marked text.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B unindent
|
2014-05-09 21:02:14 +00:00
|
|
|
Unindents (shifts to the left) the currently marked text.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2016-05-25 20:13:50 +00:00
|
|
|
.B comment
|
|
|
|
Comments or uncomments the current line or marked lines, using the comment
|
|
|
|
style specified in the active syntax.
|
|
|
|
.TP
|
2016-12-07 12:20:36 +00:00
|
|
|
.B complete
|
|
|
|
Completes the fragment before the cursor to a full word found elsewhere
|
|
|
|
in the current buffer.
|
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B left
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes left one position (in the editor or browser).
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B right
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes right one position (in the editor or browser).
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B up
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes one line up (in the editor or browser).
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B down
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes one line down (in the editor or browser).
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B scrollup
|
2018-03-17 13:23:16 +00:00
|
|
|
Scrolls the viewport up one row (meaning that the text slides down)
|
|
|
|
while keeping the cursor in the same text position, if possible.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B scrolldown
|
2018-03-17 13:23:16 +00:00
|
|
|
Scrolls the viewport down one row (meaning that the text slides up)
|
|
|
|
while keeping the cursor in the same text position, if possible.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B prevword
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the beginning of the previous word.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2015-08-04 19:51:02 +00:00
|
|
|
.B nextword
|
|
|
|
Moves the cursor to the beginning of the next word.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B home
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the beginning of the current line.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B end
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the end of the current line.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B beginpara
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the beginning of the current paragraph.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B endpara
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the end of the current paragraph.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2016-06-25 13:16:52 +00:00
|
|
|
.B prevblock
|
|
|
|
Moves the cursor to the beginning of the current or preceding block of text.
|
|
|
|
(Blocks are separated by one or more blank lines.)
|
|
|
|
.TP
|
|
|
|
.B nextblock
|
|
|
|
Moves the cursor to the beginning of the next block of text.
|
|
|
|
.TP
|
2017-10-19 19:57:59 +00:00
|
|
|
.B pageup
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes up one screenful.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2017-10-19 19:57:59 +00:00
|
|
|
.B pagedown
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes down one screenful.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B firstline
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes to the first line of the file.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B lastline
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes to the last line of the file.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
|
|
|
.B gotoline
|
2016-06-20 20:13:14 +00:00
|
|
|
Goes to a specific line (and column if specified). Negative numbers count
|
|
|
|
from the end of the file (and end of the line).
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B findbracket
|
2014-05-09 21:02:14 +00:00
|
|
|
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
2014-05-05 19:32:42 +00:00
|
|
|
(pairs) with the one under the cursor.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B prevbuf
|
2015-04-18 16:07:53 +00:00
|
|
|
Switches to editing/viewing the previous buffer when multiple buffers are open.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B nextbuf
|
2015-04-18 16:07:53 +00:00
|
|
|
Switches to editing/viewing the next buffer when multiple buffers are open.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B verbatim
|
2016-06-27 07:35:05 +00:00
|
|
|
Inserts the next keystroke verbatim into the file.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B tab
|
2014-05-09 21:02:14 +00:00
|
|
|
Inserts a tab at the current cursor location.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B enter
|
2014-05-09 21:02:14 +00:00
|
|
|
Inserts a new line below the current one.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B delete
|
2014-05-09 21:02:14 +00:00
|
|
|
Deletes the character under the cursor.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-05-04 12:20:51 +00:00
|
|
|
.B backspace
|
2014-05-09 21:02:14 +00:00
|
|
|
Deletes the character before the cursor.
|
2014-05-04 12:20:51 +00:00
|
|
|
.TP
|
2017-10-16 19:26:59 +00:00
|
|
|
.B recordmacro
|
|
|
|
Starts the recording of keystrokes -- the keystrokes are stored
|
|
|
|
as a macro. When already recording, the recording is stopped.
|
|
|
|
.TP
|
|
|
|
.B runmacro
|
|
|
|
Replays the keystrokes of the last recorded macro.
|
|
|
|
.TP
|
2008-07-13 01:36:06 +00:00
|
|
|
.B undo
|
2014-05-09 21:02:14 +00:00
|
|
|
Undoes the last performed text action (add text, delete text, etc).
|
2008-07-13 01:36:06 +00:00
|
|
|
.TP
|
2008-10-14 16:46:58 +00:00
|
|
|
.B redo
|
2014-05-09 21:02:14 +00:00
|
|
|
Redoes the last undone action (i.e., it undoes an undo).
|
2008-07-13 01:36:06 +00:00
|
|
|
.TP
|
2014-04-26 20:16:17 +00:00
|
|
|
.B refresh
|
2014-05-09 21:02:14 +00:00
|
|
|
Refreshes the screen.
|
2014-04-26 20:16:17 +00:00
|
|
|
.TP
|
2008-03-14 04:08:51 +00:00
|
|
|
.B suspend
|
2014-05-09 21:02:14 +00:00
|
|
|
Suspends the editor (if the suspending function is enabled, see the
|
2008-03-16 23:57:14 +00:00
|
|
|
"suspendenable" entry below).
|
2008-03-14 04:08:51 +00:00
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B casesens
|
2018-08-26 07:40:09 +00:00
|
|
|
Toggles whether searching/replacing ignores or respects the case of
|
|
|
|
the given characters.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B regexp
|
2018-08-26 07:40:09 +00:00
|
|
|
Toggles whether searching/replacing uses literal strings or regular expressions.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-05-04 12:20:51 +00:00
|
|
|
.B backwards
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles whether searching/replacing goes forward or backward.
|
2014-05-04 12:20:51 +00:00
|
|
|
.TP
|
2018-10-08 17:27:56 +00:00
|
|
|
.B older
|
|
|
|
Retrieves the previous (earlier) entry at a prompt.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-10-08 17:27:56 +00:00
|
|
|
.B newer
|
|
|
|
Retrieves the next (later) entry at a prompt.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-06-23 18:30:35 +00:00
|
|
|
.B flipreplace
|
|
|
|
Toggles between searching for something and replacing something.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-02-04 09:34:39 +00:00
|
|
|
.B flipgoto
|
|
|
|
Toggles between searching for text and targeting a line number.
|
|
|
|
.TP
|
2014-06-04 19:15:16 +00:00
|
|
|
.B flipexecute
|
|
|
|
Toggles between inserting a file and executing a command.
|
|
|
|
.TP
|
2018-05-26 19:30:50 +00:00
|
|
|
.B flippipe
|
|
|
|
When executing a command, toggles whether the current buffer (or marked
|
|
|
|
region) is piped to the command.
|
|
|
|
.TP
|
2014-06-23 20:03:25 +00:00
|
|
|
.B flipnewbuffer
|
|
|
|
Toggles between inserting into the current buffer and into a new
|
|
|
|
empty buffer.
|
|
|
|
.TP
|
2018-08-19 11:18:26 +00:00
|
|
|
.B flipconvert
|
|
|
|
When reading in a file, toggles between converting and not converting
|
|
|
|
it from DOS/Mac format. Converting is the default.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B dosformat
|
2014-05-09 21:02:14 +00:00
|
|
|
When writing a file, switches to writing a DOS format (CR/LF).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B macformat
|
2014-05-09 21:02:14 +00:00
|
|
|
When writing a file, switches to writing a Mac format.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B append
|
2014-05-09 21:02:14 +00:00
|
|
|
When writing a file, appends to the end instead of overwriting.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B prepend
|
2014-05-09 21:02:14 +00:00
|
|
|
When writing a file, 'prepends' (writes at the beginning) instead of overwriting.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B backup
|
2014-05-09 21:02:14 +00:00
|
|
|
When writing a file, creates a backup of the current file.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2015-12-23 16:34:44 +00:00
|
|
|
.B discardbuffer
|
|
|
|
When about to write a file, discard the current buffer without saving.
|
|
|
|
(This function is bound by default only when option \fB\-\-tempfile\fR
|
|
|
|
is in effect.)
|
|
|
|
.TP
|
2017-10-19 19:57:59 +00:00
|
|
|
.B browser
|
2015-12-23 16:37:04 +00:00
|
|
|
Starts the file browser, allowing to select a file from a list.
|
|
|
|
.TP
|
|
|
|
.B gotodir
|
|
|
|
Goes to a directory to be specified, allowing to browse anywhere
|
|
|
|
in the filesystem.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B firstfile
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes to the first file when using the file browser (reading or writing files).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B lastfile
|
2014-05-09 21:02:14 +00:00
|
|
|
Goes to the last file when using the file browser (reading or writing files).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B nohelp
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-04-28 10:01:23 +00:00
|
|
|
.B constantshow
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles the constant display of the current line, column, and character positions.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-05-09 20:33:49 +00:00
|
|
|
.B softwrap
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles the displaying of overlong lines on multiple screen lines.
|
2014-05-09 20:33:49 +00:00
|
|
|
.TP
|
2018-04-28 09:44:53 +00:00
|
|
|
.B linenumbers
|
|
|
|
Toggles the display of line numbers in front of the text.
|
|
|
|
.TP
|
2008-03-16 23:57:14 +00:00
|
|
|
.B whitespacedisplay
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles the showing of whitespace.
|
2014-03-19 21:30:08 +00:00
|
|
|
.TP
|
|
|
|
.B nosyntax
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles syntax highlighting.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B smarthome
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles the smartness of the Home key.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B autoindent
|
2018-05-30 08:19:57 +00:00
|
|
|
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.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-04-28 10:01:23 +00:00
|
|
|
.B cutfromcursor
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles whether cutting text will cut the whole line or just from the current cursor
|
2008-03-16 23:57:14 +00:00
|
|
|
position to the end of the line.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B nowrap
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles whether long lines will be hard-wrapped to the next line.
|
2014-03-19 21:30:08 +00:00
|
|
|
.TP
|
|
|
|
.B tabstospaces
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles whether typed tabs will be converted to spaces.
|
2014-03-19 21:30:08 +00:00
|
|
|
.TP
|
|
|
|
.B mouse
|
2014-05-09 21:02:14 +00:00
|
|
|
Toggles mouse support.
|
2014-03-19 21:30:08 +00:00
|
|
|
.TP
|
2008-03-14 04:08:51 +00:00
|
|
|
.B suspendenable
|
2020-03-13 14:58:56 +00:00
|
|
|
Toggles whether the suspend keystroke (\fB^Z\fR by default)
|
|
|
|
will actually suspend the editor.
|
2015-03-07 21:51:01 +00:00
|
|
|
.RE
|
2008-03-05 07:35:01 +00:00
|
|
|
|
2015-03-07 21:51:01 +00:00
|
|
|
.TP
|
2014-02-27 19:57:52 +00:00
|
|
|
Valid \fImenu\fP sections are:
|
2015-03-07 21:51:01 +00:00
|
|
|
.RS 3
|
2014-02-27 19:57:52 +00:00
|
|
|
.TP 2
|
2008-03-05 07:35:01 +00:00
|
|
|
.B main
|
2014-05-09 21:02:14 +00:00
|
|
|
The main editor window where text is entered and edited.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B search
|
2008-03-14 04:08:51 +00:00
|
|
|
The search menu (AKA whereis).
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B replace
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'search to replace' menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B replacewith
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'replace with' menu, which comes up after 'search to replace'.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2018-08-05 18:01:47 +00:00
|
|
|
.B yesno
|
|
|
|
The 'yesno' menu, where the Yes/No/All/Cancel question is asked.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B gotoline
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'goto line (and column)' menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B writeout
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'write file' menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B insert
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'insert file' menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B extcmd
|
2014-02-27 19:57:52 +00:00
|
|
|
The menu for inserting output from an external command, reached from the insert menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B help
|
2014-05-05 19:32:42 +00:00
|
|
|
The help-viewer menu.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B spell
|
2019-11-25 16:42:40 +00:00
|
|
|
The menu of the integrated spell checker where the user can edit a misspelled word.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
2014-05-09 21:02:14 +00:00
|
|
|
.B linter
|
|
|
|
The linter menu.
|
|
|
|
.TP
|
2008-03-05 07:35:01 +00:00
|
|
|
.B browser
|
2008-03-14 04:08:51 +00:00
|
|
|
The file browser for inserting or writing a file.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B whereisfile
|
2008-03-14 04:08:51 +00:00
|
|
|
The 'search for a file' menu in the file browser.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B gotodir
|
2014-05-05 19:32:42 +00:00
|
|
|
The 'go to directory' menu in the file browser.
|
2008-03-05 07:35:01 +00:00
|
|
|
.TP
|
|
|
|
.B all
|
2014-06-27 16:27:52 +00:00
|
|
|
A special name that encompasses all menus.
|
|
|
|
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.
|
2015-03-07 21:48:15 +00:00
|
|
|
.RE
|
2009-11-21 16:26:59 +00:00
|
|
|
|
2003-06-11 16:38:35 +00:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
2019-03-25 14:31:47 +00:00
|
|
|
.I /etc/nanorc
|
2014-06-17 20:30:59 +00:00
|
|
|
System-wide configuration file.
|
2003-06-11 16:38:35 +00:00
|
|
|
.TP
|
2019-03-25 14:31:47 +00:00
|
|
|
.IR ~/.nanorc " or " $XDG_CONFIG_HOME/nano/nanorc " or " ~/.config/nano/nanorc
|
2014-06-17 20:30:59 +00:00
|
|
|
Per-user configuration file.
|
2016-10-22 20:07:02 +00:00
|
|
|
|
2003-02-09 01:28:40 +00:00
|
|
|
.SH SEE ALSO
|
2016-10-22 20:07:02 +00:00
|
|
|
.BR nano (1)
|