nano.1 6.99 KB
Newer Older
Jordi Mallach's avatar
   
Jordi Mallach committed
1
.\" Hey, EMACS: -*- nroff -*-
2
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by
Jordi Mallach's avatar
   
Jordi Mallach committed
3
4
5
.\" Chris Allegretta <chrisa@asty.org>
.\"
.\" This is free documentation, see the latest version of the GNU General
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
6
.\" Public License for copying conditions.  There is NO warranty.
Jordi Mallach's avatar
   
Jordi Mallach committed
7
.\"
8
.\" $Id$
9
.TH NANO 1 "version 1.3.8" "June 27, 2005"
Chris Allegretta's avatar
Chris Allegretta committed
10
11
.\" Please adjust this date whenever revising the manpage.
.\"
Jordi Mallach's avatar
Jordi Mallach committed
12

Chris Allegretta's avatar
Chris Allegretta committed
13
.SH NAME
14
nano \- Nano's ANOther editor, an enhanced free Pico clone
Jordi Mallach's avatar
Jordi Mallach committed
15

Chris Allegretta's avatar
Chris Allegretta committed
16
17
.SH SYNOPSIS
.B nano
18
.I [\+LINE,COLUMN]\ [options]\ [file]
Chris Allegretta's avatar
Chris Allegretta committed
19
.br
Jordi Mallach's avatar
Jordi Mallach committed
20

Chris Allegretta's avatar
Chris Allegretta committed
21
.SH DESCRIPTION
Chris Allegretta's avatar
Chris Allegretta committed
22
This manual page documents briefly the \fBnano\fP command.
Chris Allegretta's avatar
Chris Allegretta committed
23
24
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
25
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
Chris Allegretta's avatar
Chris Allegretta committed
26
.\" respectively.
Jordi Mallach's avatar
   
Jordi Mallach committed
27
\fBnano\fP is a small, free and friendly editor which aims to replace
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
28
Pico, the default editor included in the non-free Pine package.  Rather
Chris Allegretta's avatar
Chris Allegretta committed
29
30
31
than just copying Pico's look and feel, \fBnano\fP also implements some
missing (or disabled by default) features in Pico, such as "search and
replace" and "go to line number".
Jordi Mallach's avatar
Jordi Mallach committed
32

Chris Allegretta's avatar
Chris Allegretta committed
33
34
.SH OPTIONS
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
35
.B \+\fILINE\fP,\fICOLUMN\fP
36
37
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
on startup, instead of the default of line 1, column 1.
38
39
40
.TP
.B \-?
Same as \fB-h (\-\-help)\fP.
Chris Allegretta's avatar
Chris Allegretta committed
41
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
42
43
44
45
46
47
48
.B \-A (\-\-smarthome)
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
49
50
51
52
.B \-B (\-\-backup)
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
.TP
53
.B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
54
55
Set the directory where \fBnano\fP puts unique backup files if file
backups are enabled.
56
.TP
57
58
59
.B \-E (\-\-tabstospaces)
Convert typed tabs to spaces.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
60
.B \-F (\-\-multibuffer)
61
Enable multiple file buffers, if available.
Chris Allegretta's avatar
Chris Allegretta committed
62
.TP
63
.B \-H (\-\-historylog)
64
65
Log search and replace strings to \fI~/.nano_history\fP so they can be
stored for later editing, if nanorc support is configured.
66
.TP
Chris Allegretta's avatar
Chris Allegretta committed
67
.B \-I (\-\-ignorercfiles)
68
69
Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if nanorc
support is available.
Chris Allegretta's avatar
Chris Allegretta committed
70
.TP
71
72
73
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
74
75
76
.B \-O (\-\-morespace)
Use the blank line below the titlebar as extra editing space.
.TP
77
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
78
Set the quoting string for justifying.  The default is
79
80
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
">\ " otherwise.
Chris Allegretta's avatar
Chris Allegretta committed
81
.TP
82
83
84
85
86
87
88
.B \-R (\-\-restricted)
Restricted mode: Don't read or write to any file not specified on the
command line, read any nanorc files, allow suspending, or allow a file
to be appended to, prepended to, or saved under a different name if it
already has one.  Also accessible by invoking \fBnano\fP with any name
beginning with 'r' (e.g. "rnano").
.TP
89
.B \-S (\-\-smooth)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
90
Enable smooth scrolling.  Text will scroll line-by-line, instead of the
Chris Allegretta's avatar
Chris Allegretta committed
91
usual chunk-by-chunk behavior.
92
.TP
93
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
94
95
Set the size (width) of a tab to \fIcols\fP columns.  The value of
\fIcols\fP must be greater than 0.  The default value is 8.
96
.TP
97
98
.B \-U (\-\-quickblank)
Do quick statusbar blanking.  Statusbar messages will disappear after 1
99
keystroke instead of 25.  Note that \fB-c\fP cancels this out.
100
.TP
Chris Allegretta's avatar
Chris Allegretta committed
101
102
103
.B \-V (\-\-version)
Show the current version number and author.
.TP
104
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
105
106
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
available.
107
.TP
Chris Allegretta's avatar
Chris Allegretta committed
108
.B \-c (\-\-const)
109
110
Constantly show the cursor position.  Note that this cancels out
\fB-U\fP.
Chris Allegretta's avatar
Chris Allegretta committed
111
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
112
113
114
115
116
.B \-d (\-\-rebinddelete)
Interpret the Delete key differently so that both Backspace and Delete
work properly.  You should only need to use this option if Backspace
acts like Delete on your system.
.TP
117
118
119
.B \-h (\-\-help)
Display a summary of command line options.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
120
.B \-i (\-\-autoindent)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
121
122
Indent new lines to the previous line's indentation.  Useful when
editing source code.
Chris Allegretta's avatar
Chris Allegretta committed
123
.TP
124
.B \-k (\-\-cut)
125
Enable cut from cursor to end of line.
126
.TP
Chris Allegretta's avatar
Chris Allegretta committed
127
.B \-l (\-\-nofollow)
Chris Allegretta's avatar
Chris Allegretta committed
128
If the file being edited is a symbolic link, replace the link with
129
a new file instead of following it.  Good for editing files in
130
\fI/tmp\fP, perhaps?
Chris Allegretta's avatar
Chris Allegretta committed
131
132
133
134
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
135
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
136
Set operating directory.  Makes nano set up something similar to a
137
chroot.
138
.TP
139
.B \-p (\-\-preserve)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
140
141
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
Chris Allegretta's avatar
Chris Allegretta committed
142
.TP
143
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
144
145
146
147
Wrap lines at column \fIcols\fP.  If this value is 0 or less, wrapping
will occur at the width of the screen less \fIcols\fP columns, allowing
the wrap point to vary along with the width of the screen if the screen
is resized.  The default value is -8.
148
.TP
149
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Chris Allegretta's avatar
Chris Allegretta committed
150
151
152
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
153
154
Always save changed buffer without prompting.  Same as Pico's \fB-t\fP
option.
Chris Allegretta's avatar
Chris Allegretta committed
155
156
157
158
159
160
161
162
163
164
165
166
167
.TP
.B \-v (\-\-view)
View file (read only) mode.
.TP
.B \-w (\-\-nowrap)
Disable wrapping of long lines.
.TP
.B \-x (\-\-nohelp)
Disable help screen at bottom of editor.
.TP
.B \-z (\-\-suspend)
Enable suspend ability.
.TP
168
.B \-a, \-b, \-e, \-f, \-g, \-j
169
Ignored, for compatibility with Pico.
Jordi Mallach's avatar
Jordi Mallach committed
170

171
.SH INITIALIZATION FILE
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
172
\fBnano\fP will read initialization files in the following order:
173
174
175
\fISYSCONFDIR/nanorc\fP, then \fI~/.nanorc\fP.  Please see
\fBnanorc(5)\fP and the example file \fBnanorc.sample\fP, both of which
should be provided with \fBnano\fP.
Jordi Mallach's avatar
Jordi Mallach committed
176

Jordi Mallach's avatar
   
Jordi Mallach committed
177
.SH NOTES
178
179
180
181
If no alternative spell checker command is specified on the command
line or in one of the nanorc files, \fBnano\fP will check the
\fBSPELL\fP environment variable for one.

Chris Allegretta's avatar
Chris Allegretta committed
182
\fBnano\fP will try to dump the buffer into an emergency file in some
183
184
cases.  Mainly, this will happen if \fBnano\fP receives a SIGHUP or
SIGTERM or runs out of memory, when it will write the buffer into a file
185
186
187
188
189
190
named \fInano.save\fP if the buffer didn't have a name already, or will
add a ".save" suffix to the current filename.  If an emergency file with
that name already exists in the current directory, ".save" and a number
(e.g. ".save.1") will be suffixed to the current filename in order to
make it unique.  In multibuffer mode, \fBnano\fP will write all the open
buffers to their respective emergency files.
Jordi Mallach's avatar
Jordi Mallach committed
191

Chris Allegretta's avatar
Chris Allegretta committed
192
.SH BUGS
193
Please send any comments or bug reports to \fBnano@nano-editor.org\fP.
194

195
The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
196

197
198
To subscribe, email to \fBnano-devel-request@gnu.org\fP with a subject
of "subscribe".
Jordi Mallach's avatar
Jordi Mallach committed
199

Chris Allegretta's avatar
Chris Allegretta committed
200
.SH HOMEPAGE
Jordi Mallach's avatar
Jordi Mallach committed
201
202
203
204
205
206
207
208
209
http://www.nano-editor.org/

.SH SEE ALSO
.PD 0
.TP
\fBnanorc\fP(5)
.PP
\fI/usr/share/doc/nano/\fP (or equivalent on your system)

Chris Allegretta's avatar
Chris Allegretta committed
210
.SH AUTHOR
211
212
213
214
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
\fITHANKS\fP for details).  This manual page was originally written by
Jordi Mallach <jordi@sindominio.net>, for the Debian GNU system (but may
be used by others).