summaryrefslogtreecommitdiff
path: root/doc/man/nano.1.html
blob: cb1101e8442a4debdcffa6c895205a7475145b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
<!-- Creator     : groff version 1.20.1 -->
<!-- CreationDate: Tue Aug 10 22:44:00 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>NANO</title>

</head>
<body>

<h1 align="center">NANO</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#INITIALIZATION FILE">INITIALIZATION FILE</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#BUGS">BUGS</a><br>
<a href="#HOMEPAGE">HOMEPAGE</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#AUTHOR">AUTHOR</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">nano &minus;
Nano&rsquo;s ANOther editor, an enhanced free Pico clone</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>nano</b>
<i>[OPTIONS]&nbsp;[[+LINE,COLUMN]&nbsp;FILE]...</i></p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">This manual
page briefly documents the <b>nano</b> command.</p>

<p style="margin-left:11%; margin-top: 1em"><b>nano</b> is
a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine
package. Rather than just copying Pico&rsquo;s look and
feel, <b>nano</b> also implements some missing (or disabled
by default) features in Pico, such as &quot;search and
replace&quot; and &quot;go to line and column
number&quot;.</p>

<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>+</b><i>LINE</i><b>,</b><i>COLUMN</i></p>

<p style="margin-left:22%;">Places cursor at line number
<i>LINE</i> and column number <i>COLUMN</i> (at least one of
which must be specified) on startup, instead of the default
of line 1, column 1.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;?</b></p></td>
<td width="8%"></td>
<td width="30%">


<p>Same as <b>-h (&minus;&minus;help)</b>.</p></td>
<td width="48%">
</td></tr>
</table>

<p style="margin-left:11%;"><b>&minus;A
(&minus;&minus;smarthome)</b></p>

<p style="margin-left:22%;">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.</p>

<p style="margin-left:11%;"><b>&minus;B
(&minus;&minus;backup)</b></p>

<p style="margin-left:22%;">When saving a file, back up the
previous version of it to the current filename suffixed with
a ~.</p>

<p style="margin-left:11%;"><b>&minus;C</b> <i>dir</i>
<b>(&minus;&minus;backupdir=</b><i>dir</i><b>)</b></p>

<p style="margin-left:22%;">Set the directory where
<b>nano</b> puts unique backup files if file backups are
enabled.</p>

<p style="margin-left:11%;"><b>&minus;D
(&minus;&minus;boldtext)</b></p>

<p style="margin-left:22%;">Use bold text instead of
reverse video text.</p>

<p style="margin-left:11%;"><b>&minus;E
(&minus;&minus;tabstospaces)</b></p>

<p style="margin-left:22%;">Convert typed tabs to
spaces.</p>

<p style="margin-left:11%;"><b>&minus;F
(&minus;&minus;multibuffer)</b></p>

<p style="margin-left:22%;">Enable multiple file buffers,
if available.</p>

<p style="margin-left:11%;"><b>&minus;H
(&minus;&minus;historylog)</b></p>

<p style="margin-left:22%;">Log search and replace strings
to <i>~/.nano_history</i>, so they can be retrieved in later
sessions, if <i>nanorc</i> support is available.</p>

<p style="margin-left:11%;"><b>&minus;I
(&minus;&minus;ignorercfiles)</b></p>

<p style="margin-left:22%;">Don&rsquo;t look at
<i>SYSCONFDIR/nanorc</i> or <i>~/.nanorc</i>, if
<i>nanorc</i> support is available.</p>

<p style="margin-left:11%;"><b>&minus;K
(&minus;&minus;rebindkeypad)</b></p>

<p style="margin-left:22%;">Interpret the numeric keypad
keys so that they all work properly. You should only need to
use this option if they don&rsquo;t, as mouse support
won&rsquo;t work properly with this option enabled.</p>

<p style="margin-left:11%;"><b>&minus;L
(&minus;&minus;nonewlines)</b></p>

<p style="margin-left:22%;">Don&rsquo;t add newlines to the
ends of files.</p>

<p style="margin-left:11%;"><b>&minus;N
(&minus;&minus;noconvert)</b></p>

<p style="margin-left:22%;">Disable automatic conversion of
files from DOS/Mac format.</p>

<p style="margin-left:11%;"><b>&minus;O
(&minus;&minus;morespace)</b></p>

<p style="margin-left:22%;">Use the blank line below the
titlebar as extra editing space.</p>

<p style="margin-left:11%;"><b>&minus;Q</b> <i>str</i>
<b>(&minus;&minus;quotestr=</b><i>str</i><b>)</b></p>

<p style="margin-left:22%;">Set the quoting string for
justifying. The default is
&quot;<i>^([&nbsp;\t]*[#:&gt;\|}])+</i>&quot; if extended
regular expression support is available, or
&quot;<i>&gt;&nbsp;</i>&quot; otherwise. Note that <i>\t</i>
stands for a Tab.</p>

<p style="margin-left:11%;"><b>&minus;R
(&minus;&minus;restricted)</b></p>

<p style="margin-left:22%;">Restricted mode: don&rsquo;t
read or write to any file not specified on the command line;
read any <i>nanorc</i> files; allow suspending; allow a file
to be appended to, prepended to, or saved under a different
name if it already has one; or use backup files or spell
checking. Also accessible by invoking <b>nano</b> with any
name beginning with &rsquo;r&rsquo; (e.g.
&quot;rnano&quot;).</p>

<p style="margin-left:11%;"><b>&minus;S
(&minus;&minus;smooth)</b></p>

<p style="margin-left:22%;">Enable smooth scrolling. Text
will scroll line-by-line, instead of the usual
chunk-by-chunk behavior.</p>

<p style="margin-left:11%;"><b>&minus;T</b> <i>cols</i>
<b>(&minus;&minus;tabsize=</b><i>cols</i><b>)</b></p>

<p style="margin-left:22%;">Set the size (width) of a tab
to <i>cols</i> columns. The value of <i>cols</i> must be
greater than 0. The default value is 8.</p>

<p style="margin-left:11%;"><b>&minus;U
(&minus;&minus;quickblank)</b></p>

<p style="margin-left:22%;">Do quick statusbar blanking.
Statusbar messages will disappear after 1 keystroke instead
of 25. Note that <b>-c</b> overrides this.</p>

<p style="margin-left:11%;"><b>&minus;V
(&minus;&minus;version)</b></p>

<p style="margin-left:22%;">Show the current version number
and exit.</p>

<p style="margin-left:11%;"><b>&minus;W
(&minus;&minus;wordbounds)</b></p>

<p style="margin-left:22%;">Detect word boundaries more
accurately by treating punctuation characters as part of a
word.</p>

<p style="margin-left:11%;"><b>&minus;Y</b> <i>str</i>
<b>(&minus;&minus;syntax=</b><i>str</i><b>)</b></p>

<p style="margin-left:22%;">Specify a specific syntax
highlighting from the <i>nanorc</i> to use, if
available.</p>

<p style="margin-left:11%;"><b>&minus;c
(&minus;&minus;const)</b></p>

<p style="margin-left:22%;">Constantly show the cursor
position. Note that this overrides <b>-U</b>.</p>

<p style="margin-left:11%;"><b>&minus;d
(&minus;&minus;rebinddelete)</b></p>

<p style="margin-left:22%;">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.</p>

<p style="margin-left:11%;"><b>&minus;h
(&minus;&minus;help)</b></p>

<p style="margin-left:22%;">Show a summary of command line
options and exit.</p>

<p style="margin-left:11%;"><b>&minus;i
(&minus;&minus;autoindent)</b></p>

<p style="margin-left:22%;">Indent new lines to the
previous line&rsquo;s indentation. Useful when editing
source code.</p>

<p style="margin-left:11%;"><b>&minus;k
(&minus;&minus;cut)</b></p>

<p style="margin-left:22%;">Enable cut from cursor to end
of line.</p>

<p style="margin-left:11%;"><b>&minus;l
(&minus;&minus;nofollow)</b></p>

<p style="margin-left:22%;">If the file being edited is a
symbolic link, replace the link with a new file instead of
following it. Good for editing files in <i>/tmp</i>,
perhaps?</p>

<p style="margin-left:11%;"><b>&minus;m
(&minus;&minus;mouse)</b></p>

<p style="margin-left:22%;">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.</p>

<p style="margin-left:11%;"><b>&minus;o</b> <i>dir</i>
<b>(&minus;&minus;operatingdir=</b><i>dir</i><b>)</b></p>

<p style="margin-left:22%;">Set operating directory. Makes
<b>nano</b> set up something similar to a chroot.</p>

<p style="margin-left:11%;"><b>&minus;p
(&minus;&minus;preserve)</b></p>

<p style="margin-left:22%;">Preserve the XON and XOFF
sequences (^Q and ^S) so they will be caught by the
terminal.</p>

<p style="margin-left:11%;"><b>&minus;q
(&minus;&minus;quiet)</b></p>

<p style="margin-left:22%;">Do not report errors in the
<i>nanorc</i> file and ask them to be acknowledged by
pressing Enter at startup.</p>

<p style="margin-left:11%;"><b>&minus;r</b> <i>cols</i>
<b>(&minus;&minus;fill=</b><i>cols</i><b>)</b></p>

<p style="margin-left:22%;">Wrap lines at column
<i>cols</i>. If this value is 0 or less, wrapping will occur
at the width of the screen less <i>cols</i> columns,
allowing the wrap point to vary along with the width of the
screen if the screen is resized. The default value is
&minus;8.</p>

<p style="margin-left:11%;"><b>&minus;s</b> <i>prog</i>
<b>(&minus;&minus;speller=</b><i>prog</i><b>)</b></p>

<p style="margin-left:22%;">Enable alternative spell
checker command.</p>

<p style="margin-left:11%;"><b>&minus;t
(&minus;&minus;tempfile)</b></p>

<p style="margin-left:22%;">Always save changed buffer
without prompting. Same as Pico&rsquo;s <b>-t</b>
option.</p>

<p style="margin-left:11%;"><b>&minus;u
(&minus;&minus;undo)</b></p>

<p style="margin-left:22%;">Enable experimental
generic-purpose undo code. By default, the undo and redo
shortcuts are Meta-U and Meta-E, respectively.</p>

<p style="margin-left:11%;"><b>&minus;v
(&minus;&minus;view)</b></p>

<p style="margin-left:22%;">View file (read only) mode.</p>

<p style="margin-left:11%;"><b>&minus;w
(&minus;&minus;nowrap)</b></p>

<p style="margin-left:22%;">Disable wrapping of long
lines.</p>

<p style="margin-left:11%;"><b>&minus;x
(&minus;&minus;nohelp)</b></p>

<p style="margin-left:22%;">Disable help screen at bottom
of editor.</p>

<p style="margin-left:11%;"><b>&minus;z
(&minus;&minus;suspend)</b></p>

<p style="margin-left:22%;">Enable suspend ability.</p>

<p style="margin-left:11%;"><b>&minus;$
(&minus;&minus;softwrap)</b></p>

<p style="margin-left:22%;">Enable &rsquo;soft
wrapping&rsquo;. <b>nano</b> will attempt to display the
entire contents of a line, even if it is longer than the
screen width. Since &rsquo;$&rsquo; normally refers to a
variable in the Unix shell, you should specify this option
last when using other options (e.g. &rsquo;nano
&minus;wS$&rsquo;) or pass it separately (e.g. &rsquo;nano
&minus;wS &minus;$&rsquo;).</p>

<p style="margin-left:11%;"><b>&minus;a, &minus;b,
&minus;e, &minus;f, &minus;g, &minus;j</b></p>

<p style="margin-left:22%;">Ignored, for compatibility with
Pico.</p>

<h2>INITIALIZATION FILE
<a name="INITIALIZATION FILE"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>nano</b>
will read initialization files in the following order:
<i>SYSCONFDIR/nanorc</i>, then <i>~/.nanorc</i>. Please see
<b>nanorc(5)</b> and the example file <b>nanorc.sample</b>,
both of which should be provided with <b>nano</b>.</p>

<h2>NOTES
<a name="NOTES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">If no
alternative spell checker command is specified on the
command line or in one of the <i>nanorc</i> files,
<b>nano</b> will check the <b>SPELL</b> environment variable
for one.</p>

<p style="margin-left:11%; margin-top: 1em">In some cases
<b>nano</b> will try to dump the buffer into an emergency
file. This will happen mainly if <b>nano</b> receives a
SIGHUP or SIGTERM or runs out of memory. It will write the
buffer into a file named <i>nano.save</i> if the buffer
didn&rsquo;t have a name already, or will add a
&quot;.save&quot; suffix to the current filename. If an
emergency file with that name already exists in the current
directory, it will add &quot;.save&quot; plus a number (e.g.
&quot;.save.1&quot;) to the current filename in order to
make it unique. In multibuffer mode, <b>nano</b> will write
all the open buffers to their respective emergency
files.</p>

<h2>BUGS
<a name="BUGS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Please send any
comments or bug reports to <b>nano@nano-editor.org</b>.</p>

<p style="margin-left:11%; margin-top: 1em">The <b>nano</b>
mailing list is available from
<b>nano-devel@gnu.org</b>.</p>

<p style="margin-left:11%; margin-top: 1em">To subscribe,
email to <b>nano-devel-request@gnu.org</b> with a subject of
&quot;subscribe&quot;.</p>

<h2>HOMEPAGE
<a name="HOMEPAGE"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em">http://www.nano-editor.org/</p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>nanorc</b>(5)
<i><br>
/usr/share/doc/nano/</i> (or equivalent on your system)</p>

<h2>AUTHOR
<a name="AUTHOR"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Chris
Allegretta &lt;chrisa@asty.org&gt;, et al (see
<i>AUTHORS</i> and <i>THANKS</i> for details). This manual
page was originally written by Jordi Mallach
&lt;jordi@gnu.org&gt;, for the Debian system (but may be
used by others).</p>
<hr>
</body>
</html>