nano.1 6.69 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 15, 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
35
36
37
.B \+\fILINE\fP,\fICOLUMN\fP]
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
Log search and replace strings to
65
.I ~/.nano_history
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
66
so they may be stored for later editing, if nanorc support is
67
configured.
68
.TP
Chris Allegretta's avatar
Chris Allegretta committed
69
.B \-I (\-\-ignorercfiles)
70
Don't look at
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
71
.I SYSCONFDIR/nanorc
72
73
74
or
.IR ~/.nanorc ,
if nanorc support is available.
Chris Allegretta's avatar
Chris Allegretta committed
75
.TP
76
77
78
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
79
80
81
.B \-O (\-\-morespace)
Use the blank line below the titlebar as extra editing space.
.TP
82
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
83
Set the quoting string for justifying.  The default is
84
85
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
">\ " otherwise.
Chris Allegretta's avatar
Chris Allegretta committed
86
.TP
87
.B \-S (\-\-smooth)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
88
Enable smooth scrolling.  Text will scroll line-by-line, instead of the
Chris Allegretta's avatar
Chris Allegretta committed
89
usual chunk-by-chunk behavior.
90
.TP
91
92
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
Set the size (width) of a tab to \fIcols\fP columns.
93
.TP
Chris Allegretta's avatar
Chris Allegretta committed
94
95
96
.B \-V (\-\-version)
Show the current version number and author.
.TP
97
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
98
Specify a specific syntax highlighting from the
99
.I nanorc
100
to use, if available.
101
.TP
102
103
104
105
106
107
108
.B \-Z (\-\-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
Chris Allegretta's avatar
Chris Allegretta committed
109
110
111
.B \-c (\-\-const)
Constantly show the cursor position.
.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
131
.IR /tmp ,
perhaps?
Chris Allegretta's avatar
Chris Allegretta committed
132
133
134
135
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
136
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
137
Set operating directory.  Makes nano set up something similar to a
138
chroot.
139
.TP
140
.B \-p (\-\-preserve)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
141
142
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
Chris Allegretta's avatar
Chris Allegretta committed
143
.TP
144
145
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
Wrap lines at column \fIcols\fP.  By default, this is the width of the
146
screen, less eight.  If this value is negative, wrapping will occur at
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
147
\fIcols\fP columns from the right of the screen, allowing the wrap point
148
to vary along with the screen width if resized.
149
.TP
150
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Chris Allegretta's avatar
Chris Allegretta committed
151
152
153
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
154
Always save changed buffer without prompting.  Same as Pico's -t 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
173
\fBnano\fP will read initialization files in the following order:
.IR SYSCONFDIR/nanorc ,
174
175
176
177
then
.IR ~/.nanorc .
Please see
.BR nanorc (5)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
178
179
and the example file \fBnanorc.sample\fP which should be provided with
\fBnano\fP.
Jordi Mallach's avatar
Jordi Mallach committed
180

Jordi Mallach's avatar
   
Jordi Mallach committed
181
.SH NOTES
182
183
184
185
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
186
\fBnano\fP will try to dump the buffer into an emergency file in some
187
188
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
189
190
named
.I nano.save
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
191
192
193
194
195
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 the
196
respective emergency files.
Jordi Mallach's avatar
Jordi Mallach committed
197

Chris Allegretta's avatar
Chris Allegretta committed
198
199
.SH BUGS
Please send any comments or bug reports to
200
201
.BR nano@nano-editor.org .

Chris Allegretta's avatar
Chris Allegretta committed
202
The \fBnano\fP mailing list is available from
203
204
205
206
207
.BR nano-devel@gnu.org .

To subscribe, email to
.B nano-devel-request@gnu.org
with a subject of "subscribe".
Jordi Mallach's avatar
Jordi Mallach committed
208

Chris Allegretta's avatar
Chris Allegretta committed
209
.SH HOMEPAGE
Jordi Mallach's avatar
Jordi Mallach committed
210
211
212
213
214
215
216
217
218
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
219
.SH AUTHOR
220
221
222
223
224
Chris Allegretta <chrisa@asty.org>, et al (see
.I AUTHORS
and
.I THANKS
for details). This manual page was originally written by Jordi Mallach
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
225
226
<jordi@sindominio.net>, for the Debian GNU system (but may be used by
others).