2019-03-11 10:27:19 +03:00
|
|
|
.\" Copyright (C) 2003-2011, 2013-2019 Free Software Foundation, Inc.
|
2003-02-09 04:28:40 +03:00
|
|
|
.\"
|
2007-08-23 08:34:35 +04: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 14:28:40 +03:00
|
|
|
.\" <https://www.gnu.org/licenses/>.
|
2007-08-23 08:34:35 +04: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 14:28:40 +03:00
|
|
|
.\" <https://www.gnu.org/licenses/>.
|
2003-02-09 04:28:40 +03:00
|
|
|
.\"
|
2019-12-22 17:34:04 +03:00
|
|
|
.TH NANORC 5 "version 4.7" "December 2019"
|
2016-10-22 23:07:02 +03:00
|
|
|
|
2003-02-09 04:28:40 +03:00
|
|
|
.SH NAME
|
2016-10-22 23:07:02 +03:00
|
|
|
nanorc \- GNU nano's configuration file
|
|
|
|
|
2019-03-25 17:22:30 +03:00
|
|
|
.SH NOTICE
|
2019-03-18 22:01:11 +03:00
|
|
|
Starting with version 4.0, \fBnano\fR no longer hard-wraps an overlong
|
2019-06-05 20:40:15 +03:00
|
|
|
line by default. It further uses smooth scrolling by default, and by
|
|
|
|
default includes the line below the title bar into the editing area.
|
2019-03-18 22:01:11 +03:00
|
|
|
.sp
|
2019-03-24 12:54:46 +03:00
|
|
|
If you want the old, Pico behavior back, you can use \fBset breaklonglines\fR,
|
2019-04-07 10:40:35 +03:00
|
|
|
\fBset jumpyscrolling\fR, and \fBset emptyline\fR.
|
2019-03-18 22:01:11 +03:00
|
|
|
|
2003-02-09 04:28:40 +03:00
|
|
|
.SH DESCRIPTION
|
2014-05-05 23:32:42 +04:00
|
|
|
The \fInanorc\fP file contains the default settings for \fBnano\fP, a
|
|
|
|
small and friendly editor. The file should be in Unix format, not in
|
|
|
|
DOS or Mac format. During startup, \fBnano\fP will first read the
|
2019-03-25 17:31:47 +03:00
|
|
|
system-wide settings, from \fI/etc/nanorc\fP (the exact path might be
|
2017-11-17 23:40:54 +03:00
|
|
|
different on your system), and then the user-specific settings, either
|
2019-03-25 17:31:47 +03: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.
|
2003-02-09 04:28:40 +03:00
|
|
|
|
|
|
|
.SH OPTIONS
|
2006-04-05 17:40:56 +04: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 23:32:42 +04: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 21:17:22 +03:00
|
|
|
All commands and keywords should be written in lowercase.
|
2019-04-01 18:31:35 +03:00
|
|
|
.sp
|
2009-12-02 06:36:22 +03:00
|
|
|
Options in \fInanorc\fP files take precedence over nano's defaults, and
|
2014-08-04 00:57:15 +04: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 23:40:54 +03:00
|
|
|
\fInanorc\fR file in your own \fInanorc\fR. Options that take an
|
2014-08-04 00:57:15 +04:00
|
|
|
argument cannot be unset.
|
2019-04-01 18:31:35 +03:00
|
|
|
.sp
|
2019-06-07 12:15:02 +03: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 18:31:35 +03:00
|
|
|
.sp
|
2003-02-09 04:28:40 +03:00
|
|
|
The supported commands and arguments are:
|
|
|
|
|
|
|
|
.TP 3
|
2018-04-30 23:10:27 +03:00
|
|
|
.B set afterends
|
|
|
|
Make Ctrl+Right stop at word ends instead of beginnings.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set allow_insecure_backup
|
2010-06-21 07:10:10 +04:00
|
|
|
When backing up files, allow the backup to succeed even if its permissions
|
2014-06-20 22:40:34 +04:00
|
|
|
can't be (re)set due to special OS considerations. You should
|
2010-06-21 07:10:10 +04:00
|
|
|
NOT enable this option unless you are sure you need it.
|
|
|
|
.TP
|
2017-03-07 19:36:43 +03: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-04 00:57:15 +04:00
|
|
|
.B set autoindent
|
2018-05-30 11:19:57 +03: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 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set backup
|
2015-06-07 21:45:34 +03:00
|
|
|
When saving a file, create a backup file by adding a tilde (\fB~\fP) to
|
|
|
|
the file's name.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2005-06-17 22:00:16 +04:00
|
|
|
.B set backupdir "\fIdirectory\fP"
|
2015-06-07 21:45:34 +03:00
|
|
|
Make and keep not just one backup file, but make and keep a uniquely
|
2017-07-14 16:21:30 +03:00
|
|
|
numbered one every time a file is saved -- when backups are enabled
|
2015-06-07 21:45:34 +03: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 22:48:30 +04:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set boldtext
|
2017-06-18 20:53:18 +03:00
|
|
|
Use bold instead of reverse video for the title bar, status bar, key combos,
|
2017-07-29 21:24:42 +03: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 19:27:40 +04:00
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set brackets """ characters """
|
2006-05-23 20:23:10 +04:00
|
|
|
Set the characters treated as closing brackets when justifying
|
2014-05-07 00:43:00 +04:00
|
|
|
paragraphs. This may not include blank characters. Only closing
|
2018-06-01 16:31:32 +03:00
|
|
|
punctuation (see \fBset punct\fP), optionally followed by the specified
|
2014-05-07 00:43:00 +04:00
|
|
|
closing brackets, can end sentences. The default value is "\fB"')>]}\fP".
|
2004-02-28 19:24:31 +03:00
|
|
|
.TP
|
2019-02-19 21:05:28 +03:00
|
|
|
.B set breaklonglines
|
|
|
|
Automatically hard-wrap the current line when it becomes overlong.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set casesensitive
|
2014-05-05 23:32:42 +04:00
|
|
|
Do case-sensitive searches by default.
|
2005-06-16 22:48:30 +04:00
|
|
|
.TP
|
2015-07-15 22:40:37 +03:00
|
|
|
.B set constantshow
|
2003-02-15 16:34:03 +03:00
|
|
|
Constantly display the cursor position in the status bar.
|
2017-06-24 20:11:29 +03:00
|
|
|
This overrides the option \fBquickblank\fR.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2017-07-14 17:06:52 +03:00
|
|
|
.B set cutfromcursor
|
|
|
|
Use cut-from-cursor-to-end-of-line by default, instead of cutting the whole line.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2019-02-19 21:05:28 +03:00
|
|
|
.B set emptyline
|
|
|
|
Do not use the line below the title bar, leaving it entirely blank.
|
|
|
|
.TP
|
2018-02-24 15:31:15 +03:00
|
|
|
.B set errorcolor \fIfgcolor\fR,\fIbgcolor\fR
|
2018-02-20 11:50:54 +03:00
|
|
|
Use this color combination for the status bar when an error message is displayed.
|
2019-06-07 12:24:51 +03:00
|
|
|
The default value is \fBbrightwhite,red\fR.
|
2018-02-20 11:50:54 +03:00
|
|
|
See \fBset titlecolor\fR for valid color names.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set fill \fInumber\fR
|
2019-01-26 12:44:03 +03: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 12:24:51 +03:00
|
|
|
The default value is \fB\-8\fR.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2014-05-04 14:24:34 +04: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 11:05:35 +03: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-04 00:57:15 +04:00
|
|
|
.B set historylog
|
2017-11-17 23:40:54 +03: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 06:25:46 +04:00
|
|
|
.TP
|
2019-02-19 21:05:28 +03:00
|
|
|
.B set jumpyscrolling
|
|
|
|
Scroll the buffer contents per half-screen instead of per line.
|
|
|
|
.TP
|
2014-05-04 14:24:34 +04: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 11:44:29 +03:00
|
|
|
.B set linenumbers
|
|
|
|
Display line numbers to the left of the text area.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set locking
|
2013-01-01 07:24:39 +04:00
|
|
|
Enable vim-style lock-files for when editing files.
|
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set matchbrackets """ characters """
|
2006-01-07 00:51:10 +03:00
|
|
|
Set the opening and closing brackets that can be found by bracket
|
2014-05-07 00:43:00 +04: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-07 00:51:10 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set morespace
|
2019-02-20 18:23:25 +03:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset emptyline\fR instead.
|
2005-01-17 08:24:26 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set mouse
|
2006-05-25 00:55:44 +04: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 23:32:42 +04:00
|
|
|
System, and on the console when gpm is running. Text can still be
|
2014-05-07 00:43:00 +04:00
|
|
|
selected through dragging by holding down the Shift key.
|
2005-01-17 08:24:26 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set multibuffer
|
2015-04-18 19:07:53 +03:00
|
|
|
When reading in a file with ^R, insert it into a new buffer by default.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set noconvert
|
2003-02-09 04:28:40 +03:00
|
|
|
Don't convert files from DOS/Mac format.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set nohelp
|
2014-05-05 23:32:42 +04:00
|
|
|
Don't display the two help lines at the bottom of the screen.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set nonewlines
|
2019-06-04 20:54:58 +03: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 20:35:44 +03:00
|
|
|
.TP
|
2017-03-07 00:07:57 +03:00
|
|
|
.B set nopauses
|
2019-10-13 17:17:04 +03:00
|
|
|
Obsolete option. Ignored.
|
2017-03-07 00:07:57 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set nowrap
|
2019-02-20 18:23:25 +03:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset breaklonglines\fR instead.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2016-10-20 11:07:48 +03: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 22:00:16 +04:00
|
|
|
.B set operatingdir "\fIdirectory\fP"
|
2003-02-15 16:34:03 +03:00
|
|
|
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
2003-08-31 20:44:10 +04:00
|
|
|
subdirectories. Also, the current directory is changed to here, so
|
2011-02-24 05:14:30 +03:00
|
|
|
files are inserted from this directory. By default, the operating
|
2006-04-27 22:52:50 +04:00
|
|
|
directory feature is turned off.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2015-07-15 22:50:55 +03:00
|
|
|
.B set positionlog
|
2014-03-03 22:49:52 +04:00
|
|
|
Save the cursor position of files between editing sessions.
|
2016-01-25 23:51:00 +03:00
|
|
|
The cursor position is remembered for the 200 most-recently edited files.
|
2014-03-03 22:49:52 +04:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set preserve
|
2003-02-09 04:28:40 +03:00
|
|
|
Preserve the XON and XOFF keys (^Q and ^S).
|
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set punct """ characters """
|
2006-05-23 20:23:10 +04:00
|
|
|
Set the characters treated as closing punctuation when justifying
|
2014-05-07 00:43:00 +04: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 20:38:57 +04:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set quickblank
|
2017-06-18 20:53:18 +03:00
|
|
|
Do quick status-bar blanking: status-bar messages will disappear after 1
|
2017-06-24 20:11:29 +03:00
|
|
|
keystroke instead of 25. The option \fBconstantshow\fR overrides this.
|
2005-06-17 23:06:25 +04:00
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set quotestr """ regex """
|
2019-01-23 21:57:17 +03:00
|
|
|
Set the regular expression for matching the quoting part of a line.
|
2019-06-08 18:07:34 +03:00
|
|
|
The default value is "\fB^([\ \\t]*([!#%:;>|}]|//))+\fP".
|
2019-01-23 21:57:17 +03: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 04:28:40 +03:00
|
|
|
.TP
|
2018-12-28 21:20:40 +03: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-04 00:57:15 +04:00
|
|
|
.B set rebinddelete
|
2018-12-28 21:37:02 +03: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 20:44:10 +04:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set regexp
|
2019-06-06 16:00:34 +03:00
|
|
|
Do regular-expression searches by default.
|
|
|
|
Regular expressions in \fBnano\fR are of the extended type (ERE).
|
2005-06-16 22:48:30 +04:00
|
|
|
.TP
|
2017-07-29 21:24:42 +03: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 10:41:09 +03:00
|
|
|
.B set showcursor
|
|
|
|
Put the cursor on the highlighted item in the file browser, to aid
|
|
|
|
braille users.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set smarthome
|
2004-05-23 00:15:20 +04: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-04 00:57:15 +04:00
|
|
|
.B set smooth
|
2019-02-20 18:23:25 +03:00
|
|
|
Deprecated option since it has become the default setting.
|
|
|
|
When needed, use \fBunset jumpyscrolling\fR instead.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set softwrap
|
2013-01-21 07:40:08 +04:00
|
|
|
Enable soft line wrapping for easier viewing of very long lines.
|
2009-08-17 11:52:10 +04:00
|
|
|
.TP
|
2019-08-16 19:46:34 +03:00
|
|
|
.B set speller """\fIprogram\fR [\fIarg\fR...]\fB"""
|
2019-11-25 19:38:50 +03: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 04:28:40 +03:00
|
|
|
.TP
|
2014-05-04 14:24:34 +04:00
|
|
|
.B set statuscolor \fIfgcolor\fR,\fIbgcolor\fR
|
2017-06-18 20:53:18 +03:00
|
|
|
Specify the color combination to use for the status bar.
|
2014-05-04 14:24:34 +04:00
|
|
|
See \fBset titlecolor\fR for more details.
|
|
|
|
.TP
|
2019-03-03 13:38:53 +03: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
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set suspend
|
2006-04-27 22:52:50 +04:00
|
|
|
Allow \fBnano\fP to be suspended.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04: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 04:28:40 +03:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set tabstospaces
|
2005-06-16 03:20:56 +04:00
|
|
|
Convert typed tabs to spaces.
|
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set tempfile
|
2003-02-09 04:28:40 +03:00
|
|
|
Save automatically on exit, don't prompt.
|
|
|
|
.TP
|
2014-05-04 14:24:34 +04:00
|
|
|
.B set titlecolor \fIfgcolor\fR,\fIbgcolor\fR
|
2017-06-18 20:53:18 +03:00
|
|
|
Specify the color combination to use for the title bar.
|
2016-10-29 21:47:37 +03:00
|
|
|
Valid names for the foreground and background colors are:
|
2018-03-27 20:32:08 +03: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 21:47:37 +03:00
|
|
|
The name of the foreground color may be prefixed with \fBbright\fR.
|
2014-05-04 14:24:34 +04:00
|
|
|
And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out.
|
|
|
|
.TP
|
2017-12-02 16:02:26 +03:00
|
|
|
.B set trimblanks
|
|
|
|
Remove trailing whitespace from wrapped lines when automatic
|
|
|
|
hard-wrapping occurs or when text is justified.
|
|
|
|
.TP
|
2015-08-04 21:49:57 +03: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-04 00:57:15 +04:00
|
|
|
.B set view
|
2018-10-23 20:26:45 +03:00
|
|
|
Disallow file modification: read-only mode.
|
|
|
|
This mode allows the user to open also other files for viewing,
|
2019-03-24 13:32:01 +03:00
|
|
|
unless \fB\-\-restricted\fR is given on the command line.
|
2003-02-09 04:28:40 +03:00
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set whitespace """ characters """
|
2014-05-05 23:32:42 +04:00
|
|
|
Set the two characters used to indicate the presence of tabs and
|
2017-07-02 18:47:30 +03:00
|
|
|
spaces. They must be single-column characters. The default pair
|
2017-07-03 13:31:53 +03:00
|
|
|
for a UTF-8 locale is "\fB\[Fc]\[md]\fR", and for other locales "\fB>.\fR".
|
2004-05-29 20:25:30 +04:00
|
|
|
.TP
|
2014-08-04 00:57:15 +04:00
|
|
|
.B set wordbounds
|
2016-06-30 19:02:45 +03:00
|
|
|
Detect word boundaries differently by treating punctuation
|
2006-06-26 08:39:31 +04:00
|
|
|
characters as parts of words.
|
2016-06-30 19:02:45 +03:00
|
|
|
.TP
|
2019-06-07 12:15:02 +03:00
|
|
|
.BI "set wordchars """ characters """
|
2016-06-30 19:02:45 +03: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 12:02:08 +03: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 23:32:42 +04:00
|
|
|
|
|
|
|
.SH SYNTAX HIGHLIGHTING
|
|
|
|
Coloring the different syntactic elements of a file
|
2015-03-08 00:30:36 +03: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 20:16:16 +03:00
|
|
|
All regular expressions in \fBnano\fR are POSIX extended regular expressions.
|
2019-06-06 16:00:34 +03: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 13:30:35 +03:00
|
|
|
A complete explanation can be found in the manual page of GNU grep:
|
|
|
|
\fBman grep\fR.
|
2019-06-06 16:00:34 +03:00
|
|
|
.sp
|
2017-07-14 16:21:30 +03:00
|
|
|
For each kind of file a separate syntax can be defined
|
2015-03-08 00:30:36 +03:00
|
|
|
via the following commands:
|
2005-08-11 02:51:49 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI syntax " name \fR[" """" fileregex """ " \fR...]
|
2017-07-14 16:21:30 +03: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 09:08:01 +04:00
|
|
|
|
2017-07-14 16:21:30 +03: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 13:32:01 +03:00
|
|
|
activated by using the \fB\-Y\fR or \fB\-\-syntax\fR
|
2017-07-14 16:21:30 +03:00
|
|
|
command-line option followed by the \fIname\fR.
|
|
|
|
|
2018-05-31 12:25:21 +03:00
|
|
|
The syntax \fBdefault\fP is special: it takes no \fIfileregex\fR,
|
2017-07-14 16:21:30 +03:00
|
|
|
and applies to files that don't match any syntax's regexes.
|
2018-05-31 12:25:21 +03:00
|
|
|
The syntax \fBnone\fP is reserved; specifying it on the command line
|
2017-07-14 16:21:30 +03:00
|
|
|
is the same as not having a syntax at all.
|
2003-02-13 07:01:49 +03:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "header """ regex """ \fR...
|
2017-07-15 13:32:57 +03: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 13:02:36 +03:00
|
|
|
.BI "magic """ regex """ \fR...
|
2017-07-15 13:32:57 +03: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
|
2019-10-25 18:17:48 +03:00
|
|
|
.BI formatter " program " \fR[ "arg " \fR...]
|
2019-10-11 20:41:01 +03: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
|
2014-05-04 15:51:10 +04:00
|
|
|
.BI linter " program " \fR[ "arg " \fR...]
|
2018-05-30 20:57:28 +03:00
|
|
|
Use the given \fIprogram\fR to run a syntax check on the current buffer.
|
2014-02-24 14:18:15 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "comment """ string """
|
|
|
|
Use the given \fIstring\fR for commenting and uncommenting lines.
|
2017-07-06 22:35:07 +03: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 23:13:50 +03: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 22:35:07 +03: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 18:47:30 +03:00
|
|
|
The default value is "\fB#\fP".
|
2016-05-25 23:13:50 +03:00
|
|
|
.TP
|
2019-09-22 13:31:12 +03: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 13:02:36 +03:00
|
|
|
.BI "color " fgcolor , bgcolor " """ regex """ " \fR...
|
2019-08-09 20:16:16 +03: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 20:32:45 +03: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 20:16:16 +03: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 15:27:29 +03: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-09 01:30:50 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "icolor " fgcolor , bgcolor " """ regex """ " \fR...
|
2017-04-21 12:27:12 +03:00
|
|
|
Same as above, except that the matching is case insensitive.
|
2005-06-27 07:07:10 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "color " fgcolor , bgcolor " start=""" fromrx """ end=""" torx """
|
2019-08-09 20:16:16 +03: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 17:24:19 +03:00
|
|
|
at least one of which must be specified. This means that, after an
|
2017-04-21 12:27:12 +03: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 17:24:19 +03:00
|
|
|
multiple lines.
|
2005-06-27 07:07:10 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "icolor " fgcolor , bgcolor " start=""" fromrx """ end=""" torx """
|
2017-04-21 12:27:12 +03:00
|
|
|
Same as above, except that the matching is case insensitive.
|
2006-04-13 06:43:54 +04:00
|
|
|
.TP
|
2018-05-31 13:02:36 +03:00
|
|
|
.BI "include """ syntaxfile """
|
2006-04-13 06:43:54 +04:00
|
|
|
Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
|
2015-06-02 17:24:19 +03:00
|
|
|
\fIsyntaxfile\fP may contain only the above commands, from \fBsyntax\fP
|
2014-05-05 23:32:42 +04:00
|
|
|
to \fBicolor\fP.
|
2014-03-02 09:27:56 +04:00
|
|
|
.TP
|
2017-07-14 16:21:30 +03:00
|
|
|
.BI extendsyntax " name command " \fR[ "arg " \fR...]
|
|
|
|
Extend the syntax previously defined as \fIname\fR with another
|
|
|
|
\fIcommand\fR. This allows adding a new \fBcolor\fP, \fBicolor\fP,
|
2019-10-25 18:17:48 +03:00
|
|
|
\fBheader\fP, \fBmagic\fP, \fBcomment\fP, \fBlinter\fP, or \fBformatter\fR
|
2017-07-14 16:21:30 +03:00
|
|
|
command to an already defined syntax -- useful when you want to
|
2015-06-02 17:24:19 +03:00
|
|
|
slightly improve a syntax defined in one of the system-installed
|
2017-07-14 16:21:30 +03:00
|
|
|
files (which normally are not writable).
|
2017-04-19 21:31:04 +03:00
|
|
|
|
2014-05-05 23:32:42 +04:00
|
|
|
.SH REBINDING KEYS
|
2018-02-27 22:11:17 +03:00
|
|
|
Key bindings can be changed via the following three commands:
|
|
|
|
.RS 3
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-05-04 15:51:10 +04:00
|
|
|
.BI bind " key function menu"
|
2019-10-07 14:01:18 +03: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 22:11:17 +03: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 13:32:01 +03:00
|
|
|
with \fBM\-V\fR.)
|
2014-02-27 23:57:52 +04:00
|
|
|
.TP
|
2014-05-04 15:51:10 +04:00
|
|
|
.BI unbind " key menu"
|
2019-10-07 14:01:18 +03: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 22:11:17 +03:00
|
|
|
.RE
|
2014-02-27 23:57:52 +04:00
|
|
|
|
|
|
|
.TP
|
|
|
|
The format of \fIkey\fP should be one of:
|
2015-03-08 00:48:15 +03:00
|
|
|
.RS 3
|
2019-10-07 14:01:18 +03:00
|
|
|
.TP 5
|
|
|
|
.BI ^ X
|
|
|
|
where \fIX\fR is a Latin letter, or one of several ASCII characters
|
|
|
|
(@, ], \\, ^, _), or the word "Space".
|
2018-07-19 21:11:02 +03:00
|
|
|
Example: ^C.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2019-10-07 14:01:18 +03:00
|
|
|
.BI M\- X
|
|
|
|
where \fIX\fR is any ASCII character except [, or the word "Space".
|
2019-03-24 13:32:01 +03:00
|
|
|
Example: M\-C.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2019-10-07 14:01:18 +03:00
|
|
|
.BI F N
|
2019-10-07 17:10:26 +03:00
|
|
|
where \fIN\fR is a numeric value from 1 to 24.
|
2018-07-19 21:11:02 +03:00
|
|
|
Example: F10.
|
2019-10-07 17:10:26 +03:00
|
|
|
(Often, \fBF13\fR to \fBF24\fR can be typed as \fBF1\fR to \fBF12\fR with Shift.)
|
|
|
|
|
2018-06-09 19:54:44 +03:00
|
|
|
.TP
|
2019-10-07 14:01:18 +03:00
|
|
|
.BR Ins " or " Del .
|
2015-03-08 00:48:15 +03:00
|
|
|
.RE
|
2014-02-27 23:57:52 +04:00
|
|
|
|
2019-10-07 14:20:30 +03:00
|
|
|
Rebinding \fB^M\fR (Enter) or \fB^I\fR (Tab) is probably not a good idea.
|
|
|
|
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-08 00:48:15 +03:00
|
|
|
.TP
|
2015-08-04 22:51:02 +03:00
|
|
|
Valid \fIfunction\fP names to be bound are:
|
2015-03-08 00:48:15 +03:00
|
|
|
.RS 3
|
2014-02-27 23:57:52 +04:00
|
|
|
.TP 2
|
2008-03-05 10:35:01 +03:00
|
|
|
.B help
|
2014-05-10 01:02:14 +04:00
|
|
|
Invokes the help viewer.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B cancel
|
2014-05-10 01:02:14 +04:00
|
|
|
Cancels the current command.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B exit
|
2014-05-10 01:02:14 +04:00
|
|
|
Exits from the program (or from the help viewer or the file browser).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B writeout
|
2015-07-25 22:25:50 +03:00
|
|
|
Writes the current buffer to disk, asking for a name.
|
|
|
|
.TP
|
|
|
|
.B savefile
|
2017-11-17 23:52:31 +03:00
|
|
|
Writes the current file to disk without prompting.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B insert
|
2015-04-18 19:07:53 +03: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 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B whereis
|
2017-09-17 23:07:25 +03: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 12:15:41 +03: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 12:23:24 +03:00
|
|
|
.TP
|
|
|
|
.B findprevious
|
2018-07-28 12:15:41 +03:00
|
|
|
Searches the next occurrence in the backward direction.
|
2015-07-26 12:23:24 +03:00
|
|
|
.TP
|
|
|
|
.B findnext
|
2018-07-28 12:15:41 +03:00
|
|
|
Searches the next occurrence in the forward direction.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B replace
|
2014-05-10 01:02:14 +04:00
|
|
|
Interactively replaces text within the current buffer.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B cut
|
2014-05-10 01:02:14 +04:00
|
|
|
Cuts and stores the current line (or the marked region).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-06-01 13:47:04 +03:00
|
|
|
.B copy
|
2014-05-10 01:02:14 +04:00
|
|
|
Copies the current line (or the marked region) without deleting it.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
2018-06-01 13:47:04 +03:00
|
|
|
.B paste
|
|
|
|
Pastes the currently stored text into the current buffer at the
|
2014-05-10 01:02:14 +04:00
|
|
|
current cursor position.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-10-24 05:25:22 +03:00
|
|
|
.B zap
|
2018-12-10 13:57:14 +03:00
|
|
|
Throws away the current line (or the marked region).
|
2018-10-24 12:17:28 +03:00
|
|
|
(This function is bound by default to <Meta+Delete>.)
|
2018-10-24 05:25:22 +03:00
|
|
|
.TP
|
2019-02-24 19:04:17 +03:00
|
|
|
.B chopwordleft
|
2019-02-24 13:00:06 +03:00
|
|
|
Deletes from the cursor position to the beginning of the preceding word.
|
2019-02-24 13:17:31 +03: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
|
2018-07-22 09:32:15 +03:00
|
|
|
the word to the left of the cursor by rebinding ^H to this function.)
|
2015-07-31 14:52:26 +03:00
|
|
|
.TP
|
2019-02-24 19:04:17 +03:00
|
|
|
.B chopwordright
|
2019-02-24 13:00:06 +03:00
|
|
|
Deletes from the cursor position to the beginning of the next word.
|
2018-07-22 09:32:15 +03:00
|
|
|
(This function is bound by default to <Ctrl+Delete>.)
|
2015-07-31 14:52:26 +03:00
|
|
|
.TP
|
2014-05-05 23:54:34 +04:00
|
|
|
.B cutrestoffile
|
2014-05-10 01:02:14 +04:00
|
|
|
Cuts all text from the cursor position till the end of the buffer.
|
2014-05-05 23:54:34 +04:00
|
|
|
.TP
|
2018-06-01 13:39:34 +03: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 10:35:01 +03:00
|
|
|
.B curpos
|
2014-05-10 01:02:14 +04:00
|
|
|
Shows the current cursor position: the line, column, and character positions.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B wordcount
|
2014-05-10 01:02:14 +04:00
|
|
|
Counts the number of words, lines and characters in the current buffer.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
2014-04-26 23:33:11 +04:00
|
|
|
.B speller
|
2019-11-25 19:38:50 +03: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 23:33:11 +04:00
|
|
|
.TP
|
2019-10-25 18:17:48 +03:00
|
|
|
.B formatter
|
2019-10-11 20:41:01 +03:00
|
|
|
Invokes a full-buffer-processing program (if the active syntax defines one).
|
|
|
|
.TP
|
2015-03-25 22:33:00 +03:00
|
|
|
.B linter
|
2018-12-17 18:05:35 +03:00
|
|
|
Invokes a syntax-checking program (if the active syntax defines one).
|
2015-03-25 22:33:00 +03:00
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B justify
|
2018-05-30 11:28:04 +03: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 10:35:01 +03:00
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B fulljustify
|
2014-05-10 01:02:14 +04:00
|
|
|
Justifies the entire current buffer.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B indent
|
2014-05-10 01:02:14 +04:00
|
|
|
Indents (shifts to the right) the currently marked text.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B unindent
|
2014-05-10 01:02:14 +04:00
|
|
|
Unindents (shifts to the left) the currently marked text.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2016-05-25 23:13:50 +03: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 15:20:36 +03:00
|
|
|
.B complete
|
|
|
|
Completes the fragment before the cursor to a full word found elsewhere
|
|
|
|
in the current buffer.
|
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B left
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes left one position (in the editor or browser).
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B right
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes right one position (in the editor or browser).
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B up
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes one line up (in the editor or browser).
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B down
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes one line down (in the editor or browser).
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B scrollup
|
2018-03-17 16:23:16 +03: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-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B scrolldown
|
2018-03-17 16:23:16 +03: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-27 00:16:17 +04:00
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B prevword
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the beginning of the previous word.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2015-08-04 22:51:02 +03:00
|
|
|
.B nextword
|
|
|
|
Moves the cursor to the beginning of the next word.
|
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B home
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the beginning of the current line.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B end
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the end of the current line.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B beginpara
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the beginning of the current paragraph.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B endpara
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the end of the current paragraph.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2016-06-25 16:16:52 +03: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 22:57:59 +03:00
|
|
|
.B pageup
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes up one screenful.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
2017-10-19 22:57:59 +03:00
|
|
|
.B pagedown
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes down one screenful.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B firstline
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes to the first line of the file.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B lastline
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes to the last line of the file.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
|
|
|
.B gotoline
|
2016-06-20 23:13:14 +03: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-27 00:16:17 +04:00
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B findbracket
|
2014-05-10 01:02:14 +04:00
|
|
|
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
2014-05-05 23:32:42 +04:00
|
|
|
(pairs) with the one under the cursor.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B prevbuf
|
2015-04-18 19:07:53 +03:00
|
|
|
Switches to editing/viewing the previous buffer when multiple buffers are open.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B nextbuf
|
2015-04-18 19:07:53 +03:00
|
|
|
Switches to editing/viewing the next buffer when multiple buffers are open.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B verbatim
|
2016-06-27 10:35:05 +03:00
|
|
|
Inserts the next keystroke verbatim into the file.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B tab
|
2014-05-10 01:02:14 +04:00
|
|
|
Inserts a tab at the current cursor location.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B enter
|
2014-05-10 01:02:14 +04:00
|
|
|
Inserts a new line below the current one.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B delete
|
2014-05-10 01:02:14 +04:00
|
|
|
Deletes the character under the cursor.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-05-04 16:20:51 +04:00
|
|
|
.B backspace
|
2014-05-10 01:02:14 +04:00
|
|
|
Deletes the character before the cursor.
|
2014-05-04 16:20:51 +04:00
|
|
|
.TP
|
2017-10-16 22:26:59 +03: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 05:36:06 +04:00
|
|
|
.B undo
|
2014-05-10 01:02:14 +04:00
|
|
|
Undoes the last performed text action (add text, delete text, etc).
|
2008-07-13 05:36:06 +04:00
|
|
|
.TP
|
2008-10-14 20:46:58 +04:00
|
|
|
.B redo
|
2014-05-10 01:02:14 +04:00
|
|
|
Redoes the last undone action (i.e., it undoes an undo).
|
2008-07-13 05:36:06 +04:00
|
|
|
.TP
|
2014-04-27 00:16:17 +04:00
|
|
|
.B refresh
|
2014-05-10 01:02:14 +04:00
|
|
|
Refreshes the screen.
|
2014-04-27 00:16:17 +04:00
|
|
|
.TP
|
2008-03-14 07:08:51 +03:00
|
|
|
.B suspend
|
2014-05-10 01:02:14 +04:00
|
|
|
Suspends the editor (if the suspending function is enabled, see the
|
2008-03-17 02:57:14 +03:00
|
|
|
"suspendenable" entry below).
|
2008-03-14 07:08:51 +03:00
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B casesens
|
2018-08-26 10:40:09 +03:00
|
|
|
Toggles whether searching/replacing ignores or respects the case of
|
|
|
|
the given characters.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B regexp
|
2018-08-26 10:40:09 +03:00
|
|
|
Toggles whether searching/replacing uses literal strings or regular expressions.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-05-04 16:20:51 +04:00
|
|
|
.B backwards
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles whether searching/replacing goes forward or backward.
|
2014-05-04 16:20:51 +04:00
|
|
|
.TP
|
2018-10-08 20:27:56 +03:00
|
|
|
.B older
|
|
|
|
Retrieves the previous (earlier) entry at a prompt.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-10-08 20:27:56 +03:00
|
|
|
.B newer
|
|
|
|
Retrieves the next (later) entry at a prompt.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-06-23 22:30:35 +04:00
|
|
|
.B flipreplace
|
|
|
|
Toggles between searching for something and replacing something.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-02-04 12:34:39 +03:00
|
|
|
.B flipgoto
|
|
|
|
Toggles between searching for text and targeting a line number.
|
|
|
|
.TP
|
2014-06-04 23:15:16 +04:00
|
|
|
.B flipexecute
|
|
|
|
Toggles between inserting a file and executing a command.
|
|
|
|
.TP
|
2018-05-26 22:30:50 +03:00
|
|
|
.B flippipe
|
|
|
|
When executing a command, toggles whether the current buffer (or marked
|
|
|
|
region) is piped to the command.
|
|
|
|
.TP
|
2014-06-24 00:03:25 +04:00
|
|
|
.B flipnewbuffer
|
|
|
|
Toggles between inserting into the current buffer and into a new
|
|
|
|
empty buffer.
|
|
|
|
.TP
|
2018-08-19 14:18:26 +03: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 10:35:01 +03:00
|
|
|
.B dosformat
|
2014-05-10 01:02:14 +04:00
|
|
|
When writing a file, switches to writing a DOS format (CR/LF).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B macformat
|
2014-05-10 01:02:14 +04:00
|
|
|
When writing a file, switches to writing a Mac format.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B append
|
2014-05-10 01:02:14 +04:00
|
|
|
When writing a file, appends to the end instead of overwriting.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B prepend
|
2014-05-10 01:02:14 +04:00
|
|
|
When writing a file, 'prepends' (writes at the beginning) instead of overwriting.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B backup
|
2014-05-10 01:02:14 +04:00
|
|
|
When writing a file, creates a backup of the current file.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2015-12-23 19:34:44 +03: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 22:57:59 +03:00
|
|
|
.B browser
|
2015-12-23 19:37:04 +03: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 10:35:01 +03:00
|
|
|
.B firstfile
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes to the first file when using the file browser (reading or writing files).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B lastfile
|
2014-05-10 01:02:14 +04:00
|
|
|
Goes to the last file when using the file browser (reading or writing files).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B nohelp
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-04-28 13:01:23 +03:00
|
|
|
.B constantshow
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles the constant display of the current line, column, and character positions.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-05-10 00:33:49 +04:00
|
|
|
.B softwrap
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles the displaying of overlong lines on multiple screen lines.
|
2014-05-10 00:33:49 +04:00
|
|
|
.TP
|
2018-04-28 12:44:53 +03:00
|
|
|
.B linenumbers
|
|
|
|
Toggles the display of line numbers in front of the text.
|
|
|
|
.TP
|
2008-03-17 02:57:14 +03:00
|
|
|
.B whitespacedisplay
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles the showing of whitespace.
|
2014-03-20 01:30:08 +04:00
|
|
|
.TP
|
|
|
|
.B nosyntax
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles syntax highlighting.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B smarthome
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles the smartness of the Home key.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B autoindent
|
2018-05-30 11:19:57 +03: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 10:35:01 +03:00
|
|
|
.TP
|
2018-04-28 13:01:23 +03:00
|
|
|
.B cutfromcursor
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles whether cutting text will cut the whole line or just from the current cursor
|
2008-03-17 02:57:14 +03:00
|
|
|
position to the end of the line.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B nowrap
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles whether long lines will be hard-wrapped to the next line.
|
2014-03-20 01:30:08 +04:00
|
|
|
.TP
|
|
|
|
.B tabstospaces
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles whether typed tabs will be converted to spaces.
|
2014-03-20 01:30:08 +04:00
|
|
|
.TP
|
|
|
|
.B mouse
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles mouse support.
|
2014-03-20 01:30:08 +04:00
|
|
|
.TP
|
2008-03-14 07:08:51 +03:00
|
|
|
.B suspendenable
|
2014-05-10 01:02:14 +04:00
|
|
|
Toggles whether the suspend sequence (normally ^Z) will suspend the editor window.
|
2015-03-08 00:51:01 +03:00
|
|
|
.RE
|
2008-03-05 10:35:01 +03:00
|
|
|
|
2015-03-08 00:51:01 +03:00
|
|
|
.TP
|
2014-02-27 23:57:52 +04:00
|
|
|
Valid \fImenu\fP sections are:
|
2015-03-08 00:51:01 +03:00
|
|
|
.RS 3
|
2014-02-27 23:57:52 +04:00
|
|
|
.TP 2
|
2008-03-05 10:35:01 +03:00
|
|
|
.B main
|
2014-05-10 01:02:14 +04:00
|
|
|
The main editor window where text is entered and edited.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B search
|
2008-03-14 07:08:51 +03:00
|
|
|
The search menu (AKA whereis).
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B replace
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'search to replace' menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B replacewith
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'replace with' menu, which comes up after 'search to replace'.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2018-08-05 21:01:47 +03:00
|
|
|
.B yesno
|
|
|
|
The 'yesno' menu, where the Yes/No/All/Cancel question is asked.
|
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B gotoline
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'goto line (and column)' menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B writeout
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'write file' menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B insert
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'insert file' menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B extcmd
|
2014-02-27 23:57:52 +04:00
|
|
|
The menu for inserting output from an external command, reached from the insert menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B help
|
2014-05-05 23:32:42 +04:00
|
|
|
The help-viewer menu.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B spell
|
2019-11-25 19:42:40 +03:00
|
|
|
The menu of the integrated spell checker where the user can edit a misspelled word.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
2014-05-10 01:02:14 +04:00
|
|
|
.B linter
|
|
|
|
The linter menu.
|
|
|
|
.TP
|
2008-03-05 10:35:01 +03:00
|
|
|
.B browser
|
2008-03-14 07:08:51 +03:00
|
|
|
The file browser for inserting or writing a file.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B whereisfile
|
2008-03-14 07:08:51 +03:00
|
|
|
The 'search for a file' menu in the file browser.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B gotodir
|
2014-05-05 23:32:42 +04:00
|
|
|
The 'go to directory' menu in the file browser.
|
2008-03-05 10:35:01 +03:00
|
|
|
.TP
|
|
|
|
.B all
|
2014-06-27 20:27:52 +04: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-08 00:48:15 +03:00
|
|
|
.RE
|
2009-11-21 19:26:59 +03:00
|
|
|
|
2003-06-11 20:38:35 +04:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
2019-03-25 17:31:47 +03:00
|
|
|
.I /etc/nanorc
|
2014-06-18 00:30:59 +04:00
|
|
|
System-wide configuration file.
|
2003-06-11 20:38:35 +04:00
|
|
|
.TP
|
2019-03-25 17:31:47 +03:00
|
|
|
.IR ~/.nanorc " or " $XDG_CONFIG_HOME/nano/nanorc " or " ~/.config/nano/nanorc
|
2014-06-18 00:30:59 +04:00
|
|
|
Per-user configuration file.
|
2016-10-22 23:07:02 +03:00
|
|
|
|
2003-02-09 04:28:40 +03:00
|
|
|
.SH SEE ALSO
|
2016-10-22 23:07:02 +03:00
|
|
|
.BR nano (1)
|