nano.1 6.54 KB
Newer Older
Jordi Mallach's avatar
   
Jordi Mallach committed
1
.\" Hey, EMACS: -*- nroff -*-
Jordi Mallach's avatar
Jordi Mallach committed
2
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 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.5" "November 6, 2004"
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
Chris Allegretta's avatar
Chris Allegretta committed
18
.I [\+LINE]\ [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
Chris Allegretta's avatar
Chris Allegretta committed
35
36
37
.B \+\fILINE\fP
Places cursor at \fILINE\fP on startup.
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
38
39
40
41
42
43
44
.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
45
46
47
48
.B \-B (\-\-backup)
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
.TP
49
50
51
52
.B \-E \fIdir\fP (\-\-backupdir=\fIdir\fP)
Set the directory where \fBnano\fP puts the backup files if file backups
are enabled.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
53
.B \-F (\-\-multibuffer)
54
Enable multiple file buffers, if available.
Chris Allegretta's avatar
Chris Allegretta committed
55
.TP
56
.B \-H (\-\-historylog)
57
Log search and replace strings to
58
.I ~/.nano_history
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
59
so they may be stored for later editing, if nanorc support is
60
configured.
61
.TP
Chris Allegretta's avatar
Chris Allegretta committed
62
.B \-I (\-\-ignorercfiles)
63
Don't look at
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
64
.I SYSCONFDIR/nanorc
65
66
67
or
.IR ~/.nanorc ,
if nanorc support is available.
Chris Allegretta's avatar
Chris Allegretta committed
68
.TP
69
70
71
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
72
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
73
Set the quoting string for justifying.  The default is
74
75
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
">\ " otherwise.
Chris Allegretta's avatar
Chris Allegretta committed
76
.TP
77
78
.B \-R (\-\-regexp)
Enable regular expression matching for search strings, as well as
79
\\n subexpression replacement for replace strings, if available.
80
.TP
81
.B \-S (\-\-smooth)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
82
Enable smooth scrolling.  Text will scroll line-by-line, instead of the
Chris Allegretta's avatar
Chris Allegretta committed
83
usual chunk-by-chunk behavior.
84
.TP
85
86
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
Set the size (width) of a tab to \fIcols\fP columns.
87
.TP
Chris Allegretta's avatar
Chris Allegretta committed
88
89
90
.B \-V (\-\-version)
Show the current version number and author.
.TP
91
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
92
Specify a specific syntax highlighting from the
93
.I nanorc
94
to use, if available.
95
.TP
96
97
98
99
100
101
102
.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
103
104
105
.B \-c (\-\-const)
Constantly show the cursor position.
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
106
107
108
109
110
.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
111
112
113
.B \-h (\-\-help)
Display a summary of command line options.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
114
.B \-i (\-\-autoindent)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
115
116
Indent new lines to the previous line's indentation.  Useful when
editing source code.
Chris Allegretta's avatar
Chris Allegretta committed
117
.TP
118
119
120
.B \-k (\-\-cut)
Enable cut from cursor to end of line with ^K.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
121
.B \-l (\-\-nofollow)
Chris Allegretta's avatar
Chris Allegretta committed
122
If the file being edited is a symbolic link, replace the link with
123
124
125
a new file, do not follow it.  Good for editing files in
.IR /tmp ,
perhaps?
Chris Allegretta's avatar
Chris Allegretta committed
126
127
128
129
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
130
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
131
Set operating directory.  Makes nano set up something similar to a
132
chroot.
133
.TP
134
.B \-p (\-\-preserve)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
135
136
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
Chris Allegretta's avatar
Chris Allegretta committed
137
.TP
138
139
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
Wrap lines at column \fIcols\fP.  By default, this is the width of the
140
screen, less eight.  If this value is negative, wrapping will occur at
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
141
\fIcols\fP columns from the right of the screen, allowing the wrap point
142
to vary along with the screen width if resized.
143
.TP
144
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Chris Allegretta's avatar
Chris Allegretta committed
145
146
147
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
148
Always save changed buffer without prompting.  Same as Pico -t option.
Chris Allegretta's avatar
Chris Allegretta committed
149
150
151
152
153
154
155
156
157
158
159
160
161
.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
162
.B \-a, \-b, \-e, \-f, \-g, \-j
163
Ignored, for compatibility with Pico.
Jordi Mallach's avatar
Jordi Mallach committed
164

165
.SH INITIALIZATION FILE
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
166
167
\fBnano\fP will read initialization files in the following order:
.IR SYSCONFDIR/nanorc ,
168
169
170
171
then
.IR ~/.nanorc .
Please see
.BR nanorc (5)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
172
173
and the example file \fBnanorc.sample\fP which should be provided with
\fBnano\fP.
Jordi Mallach's avatar
Jordi Mallach committed
174

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

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

Chris Allegretta's avatar
Chris Allegretta committed
196
The \fBnano\fP mailing list is available from
197
198
199
200
201
.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
202

Chris Allegretta's avatar
Chris Allegretta committed
203
.SH HOMEPAGE
Jordi Mallach's avatar
Jordi Mallach committed
204
205
206
207
208
209
210
211
212
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
213
.SH AUTHOR
214
215
216
217
218
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
219
220
<jordi@sindominio.net>, for the Debian GNU system (but may be used by
others).