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

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

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

Chris Allegretta's avatar
Chris Allegretta committed
22
.SH DESCRIPTION
Chris Allegretta's avatar
Chris Allegretta committed
23
This manual page documents briefly the \fBnano\fP command.
Chris Allegretta's avatar
Chris Allegretta committed
24
25
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
26
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
Chris Allegretta's avatar
Chris Allegretta committed
27
.\" respectively.
Jordi Mallach's avatar
   
Jordi Mallach committed
28
\fBnano\fP is a small, free and friendly editor which aims to replace
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
29
Pico, the default editor included in the non-free Pine package.  Rather
Chris Allegretta's avatar
Chris Allegretta committed
30
31
32
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
33

Chris Allegretta's avatar
Chris Allegretta committed
34
35
.SH OPTIONS
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
36
.B \+\fILINE\fP,\fICOLUMN\fP
37
38
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
on startup, instead of the default of line 1, column 1.
39
40
41
.TP
.B \-?
Same as \fB-h (\-\-help)\fP.
Chris Allegretta's avatar
Chris Allegretta committed
42
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
43
44
45
46
47
48
49
.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
50
51
52
53
.B \-B (\-\-backup)
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
.TP
54
.B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
55
56
Set the directory where \fBnano\fP puts unique backup files if file
backups are enabled.
57
.TP
58
59
60
.B \-E (\-\-tabstospaces)
Convert typed tabs to spaces.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
61
.B \-F (\-\-multibuffer)
62
Enable multiple file buffers, if available.
Chris Allegretta's avatar
Chris Allegretta committed
63
.TP
64
.B \-H (\-\-historylog)
65
66
Log search and replace strings to \fI~/.nano_history\fP so they can be
stored for later editing, if nanorc support is configured.
67
.TP
Chris Allegretta's avatar
Chris Allegretta committed
68
.B \-I (\-\-ignorercfiles)
69
70
Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if nanorc
support is available.
Chris Allegretta's avatar
Chris Allegretta committed
71
.TP
72
73
74
75
76
.B \-K (\-\-rebindkeypad)
Interpret the numeric keypad keys so that they all work properly.  You
should only need to use this option if they don't, as mouse support
won't work properly with this option enabled.
.TP
77
78
79
.B \-L (\-\-nonewlines)
Don't add newlines to the ends of files.
.TP
80
81
82
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
83
84
85
.B \-O (\-\-morespace)
Use the blank line below the titlebar as extra editing space.
.TP
86
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
87
Set the quoting string for justifying.  The default is
88
"\fI^([\ \\t]*[#:>\\|}])+\fP" if extended regular expression support is
89
available, or "\fI>\ \fP" otherwise.
Chris Allegretta's avatar
Chris Allegretta committed
90
.TP
91
92
93
94
95
96
97
.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
98
.B \-S (\-\-smooth)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
99
Enable smooth scrolling.  Text will scroll line-by-line, instead of the
Chris Allegretta's avatar
Chris Allegretta committed
100
usual chunk-by-chunk behavior.
101
.TP
102
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
103
104
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.
105
.TP
106
107
.B \-U (\-\-quickblank)
Do quick statusbar blanking.  Statusbar messages will disappear after 1
108
keystroke instead of 25.  Note that \fB-c\fP cancels this out.
109
.TP
Chris Allegretta's avatar
Chris Allegretta committed
110
111
112
.B \-V (\-\-version)
Show the current version number and author.
.TP
113
114
115
116
.B \-W (\-\-wordbounds)
Detect word boundaries more accurately by treating punctuation
characters as part of a word.
.TP
117
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
118
119
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
available.
120
.TP
Chris Allegretta's avatar
Chris Allegretta committed
121
.B \-c (\-\-const)
122
123
Constantly show the cursor position.  Note that this cancels out
\fB-U\fP.
Chris Allegretta's avatar
Chris Allegretta committed
124
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
125
126
127
128
129
.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
130
131
132
.B \-h (\-\-help)
Display a summary of command line options.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
133
.B \-i (\-\-autoindent)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
134
135
Indent new lines to the previous line's indentation.  Useful when
editing source code.
Chris Allegretta's avatar
Chris Allegretta committed
136
.TP
137
.B \-k (\-\-cut)
138
Enable cut from cursor to end of line.
139
.TP
Chris Allegretta's avatar
Chris Allegretta committed
140
.B \-l (\-\-nofollow)
Chris Allegretta's avatar
Chris Allegretta committed
141
If the file being edited is a symbolic link, replace the link with
142
a new file instead of following it.  Good for editing files in
143
\fI/tmp\fP, perhaps?
Chris Allegretta's avatar
Chris Allegretta committed
144
145
146
147
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
148
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
149
Set operating directory.  Makes \fBnano\fP set up something similar to a
150
chroot.
151
.TP
152
.B \-p (\-\-preserve)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
153
154
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
Chris Allegretta's avatar
Chris Allegretta committed
155
.TP
156
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
157
158
159
160
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.
161
.TP
162
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Chris Allegretta's avatar
Chris Allegretta committed
163
164
165
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
166
167
Always save changed buffer without prompting.  Same as Pico's \fB-t\fP
option.
Chris Allegretta's avatar
Chris Allegretta committed
168
169
170
171
172
173
174
175
176
177
178
179
180
.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
181
.B \-a, \-b, \-e, \-f, \-g, \-j
182
Ignored, for compatibility with Pico.
Jordi Mallach's avatar
Jordi Mallach committed
183

184
.SH INITIALIZATION FILE
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
185
\fBnano\fP will read initialization files in the following order:
186
187
188
\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
189

Jordi Mallach's avatar
   
Jordi Mallach committed
190
.SH NOTES
191
192
193
194
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
195
\fBnano\fP will try to dump the buffer into an emergency file in some
196
197
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
198
199
200
201
202
203
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
204

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

208
The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
209

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

Chris Allegretta's avatar
Chris Allegretta committed
213
.SH HOMEPAGE
Jordi Mallach's avatar
Jordi Mallach committed
214
215
216
217
218
219
220
221
222
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
223
.SH AUTHOR
224
225
226
227
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).