nano.1 7.77 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.12" "June 7, 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 [OPTIONS]\ [[\+LINE[,COLUMN]]\ 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
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
23
This manual page briefly documents 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
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 \-D (\-\-boldtext)
Use bold text instead of reverse video text.
.TP
61
62
63
.B \-E (\-\-tabstospaces)
Convert typed tabs to spaces.
.TP
Chris Allegretta's avatar
Chris Allegretta committed
64
.B \-F (\-\-multibuffer)
65
Enable multiple file buffers, if available.
Chris Allegretta's avatar
Chris Allegretta committed
66
.TP
67
.B \-H (\-\-historylog)
68
69
Log search and replace strings to \fI~/.nano_history\fP, so they can be
retrieved in later sessions, if nanorc support is available.
70
.TP
Chris Allegretta's avatar
Chris Allegretta committed
71
.B \-I (\-\-ignorercfiles)
72
73
Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if nanorc
support is available.
Chris Allegretta's avatar
Chris Allegretta committed
74
.TP
75
76
77
78
79
.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
80
81
82
.B \-L (\-\-nonewlines)
Don't add newlines to the ends of files.
.TP
83
84
85
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
86
87
88
.B \-O (\-\-morespace)
Use the blank line below the titlebar as extra editing space.
.TP
89
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
90
Set the quoting string for justifying.  The default is
91
"\fI^([\ \\t]*[#:>\\|}])+\fP" if extended regular expression support is
92
93
available, or "\fI>\ \fP" otherwise.  Note that \fI\\t\fP stands for a
Tab.
Chris Allegretta's avatar
Chris Allegretta committed
94
.TP
95
.B \-R (\-\-restricted)
96
97
Restricted mode: don't read or write to any file not specified on the
command line; read any nanorc files; allow suspending; allow a file
98
to be appended to, prepended to, or saved under a different name if it
99
100
already has one; or use backup files or spell checking.  Also accessible
by invoking \fBnano\fP with any name beginning with 'r' (e.g. "rnano").
101
.TP
102
.B \-S (\-\-smooth)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
103
Enable smooth scrolling.  Text will scroll line-by-line, instead of the
Chris Allegretta's avatar
Chris Allegretta committed
104
usual chunk-by-chunk behavior.
105
.TP
106
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
107
108
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.
109
.TP
110
111
.B \-U (\-\-quickblank)
Do quick statusbar blanking.  Statusbar messages will disappear after 1
112
keystroke instead of 25.  Note that \fB-c\fP overrides this.
113
.TP
Chris Allegretta's avatar
Chris Allegretta committed
114
.B \-V (\-\-version)
115
Show the current version number and exit.
Chris Allegretta's avatar
Chris Allegretta committed
116
.TP
117
118
119
120
.B \-W (\-\-wordbounds)
Detect word boundaries more accurately by treating punctuation
characters as part of a word.
.TP
121
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
122
123
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
available.
124
.TP
Chris Allegretta's avatar
Chris Allegretta committed
125
.B \-c (\-\-const)
126
Constantly show the cursor position.  Note that this overrides \fB-U\fP.
Chris Allegretta's avatar
Chris Allegretta committed
127
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
128
129
130
131
132
.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
133
.B \-h (\-\-help)
134
Show a summary of command line options and exit.
135
.TP
Chris Allegretta's avatar
Chris Allegretta committed
136
.B \-i (\-\-autoindent)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
137
138
Indent new lines to the previous line's indentation.  Useful when
editing source code.
Chris Allegretta's avatar
Chris Allegretta committed
139
.TP
140
.B \-k (\-\-cut)
141
Enable cut from cursor to end of line.
142
.TP
Chris Allegretta's avatar
Chris Allegretta committed
143
.B \-l (\-\-nofollow)
Chris Allegretta's avatar
Chris Allegretta committed
144
If the file being edited is a symbolic link, replace the link with
145
a new file instead of following it.  Good for editing files in
146
\fI/tmp\fP, perhaps?
Chris Allegretta's avatar
Chris Allegretta committed
147
148
.TP
.B \-m (\-\-mouse)
149
150
151
152
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
System, and on the console when gpm is running.
Chris Allegretta's avatar
Chris Allegretta committed
153
.TP
154
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
155
Set operating directory.  Makes \fBnano\fP set up something similar to a
156
chroot.
157
.TP
158
.B \-p (\-\-preserve)
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
159
160
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
Chris Allegretta's avatar
Chris Allegretta committed
161
.TP
162
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
163
164
165
166
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.
167
.TP
168
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Chris Allegretta's avatar
Chris Allegretta committed
169
170
171
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
172
173
Always save changed buffer without prompting.  Same as Pico's \fB-t\fP
option.
Chris Allegretta's avatar
Chris Allegretta committed
174
175
176
177
178
179
180
181
182
183
184
185
186
.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
187
.B \-a, \-b, \-e, \-f, \-g, \-j
188
Ignored, for compatibility with Pico.
Jordi Mallach's avatar
Jordi Mallach committed
189

190
.SH INITIALIZATION FILE
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
191
\fBnano\fP will read initialization files in the following order:
192
193
194
\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
195

Jordi Mallach's avatar
   
Jordi Mallach committed
196
.SH NOTES
197
198
199
200
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.

201
202
203
In some cases \fBnano\fP will try to dump the buffer into an emergency
file.  This will happen mainly if \fBnano\fP receives a SIGHUP or
SIGTERM or runs out of memory.  It will write the buffer into a file
204
205
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
206
207
208
that name already exists in the current directory, it will add ".save"
plus a number (e.g. ".save.1") to the current filename in order to make
it unique.  In multibuffer mode, \fBnano\fP will write all the open
209
buffers to their respective emergency files.
Jordi Mallach's avatar
Jordi Mallach committed
210

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

214
The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
215

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

Chris Allegretta's avatar
Chris Allegretta committed
219
.SH HOMEPAGE
Jordi Mallach's avatar
Jordi Mallach committed
220
221
222
223
224
225
226
227
228
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
229
.SH AUTHOR
230
231
232
233
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).