20
27
<a href="#AUTHOR">AUTHOR</a><br>
23
32
<a name="NAME"></a>
26
<table width="100%" border=0 rules="none" frame="void"
27
cols="2" cellspacing="0" cellpadding="0">
28
<tr valign="top" align="left">
31
<p>nanorc − GNU nano’s rcfile</p>
36
<p style="margin-left:11%; margin-top: 1em">nanorc −
37
GNU nano’s rcfile</p>
34
39
<a name="DESCRIPTION"></a>
35
40
<h2>DESCRIPTION</h2>
37
<table width="100%" border=0 rules="none" frame="void"
38
cols="2" cellspacing="0" cellpadding="0">
39
<tr valign="top" align="left">
42
<p>This manual page documents GNU <b>nano</b>’s
45
<p><b>nano</b> is a small, free and friendly editor which
46
aims to replace Pico, the default editor included in the
47
non-free Pine package. Rather than just copying Pico’s
48
look and feel, <b>nano</b> also implements some missing (or
49
disabled by default) features in Pico, such as "search
50
and replace" and "go to line number".</p>
52
<p>The <i>nanorc</i> file contains the default settings for
43
<p style="margin-left:11%; margin-top: 1em">This manual
44
page documents GNU <b>nano</b>’s rcfile.</p>
46
<p style="margin-left:11%; margin-top: 1em"><b>nano</b> is
47
a small, free and friendly editor which aims to replace
48
Pico, the default editor included in the non-free Pine
49
package. Rather than just copying Pico’s look and
50
feel, <b>nano</b> also implements some missing (or disabled
51
by default) features in Pico, such as "search and
52
replace" and "go to line number".</p>
54
<p style="margin-left:11%; margin-top: 1em">The
55
<i>nanorc</i> file contains the default settings for
53
56
<b>nano</b>. During startup, <b>nano</b> will first read its
54
57
system-wide settings from <i>SYSCONFDIR/nanorc</i>, and then
55
58
user-specific settings from <i>~/.nanorc</i>.</p>
58
60
<a name="OPTIONS"></a>
61
<table width="100%" border=0 rules="none" frame="void"
62
cols="2" cellspacing="0" cellpadding="0">
63
<tr valign="top" align="left">
66
<p>The configuration file accepts a series of
67
"set" and "unset" commands, which can be
68
used to configure nano on startup without using the
69
command-line options. Additionally, the "syntax",
70
"color", and "icolor" keywords are used
71
to define syntax highlighting rules for different text
72
patterns. GNU nano will read one command per line.</p>
74
<p>Options in rcfiles take precedence over nano’s
75
defaults, and command line options override rcfile
78
<p>Options are unset by default, except for options that
81
<p>The supported commands and arguments are:</p>
85
<table width="100%" border=0 rules="none" frame="void"
86
cols="2" cellspacing="0" cellpadding="0">
87
<tr valign="top" align="left">
90
<p><b>set/unset autoindent</b></p></td>
93
<table width="100%" border=0 rules="none" frame="void"
94
cols="2" cellspacing="0" cellpadding="0">
95
<tr valign="top" align="left">
98
<p>Use auto-indentation.</p>
102
<table width="100%" border=0 rules="none" frame="void"
103
cols="2" cellspacing="0" cellpadding="0">
104
<tr valign="top" align="left">
105
<td width="11%"></td>
107
<p><b>set/unset backup</b></p></td>
110
<table width="100%" border=0 rules="none" frame="void"
111
cols="2" cellspacing="0" cellpadding="0">
112
<tr valign="top" align="left">
113
<td width="15%"></td>
115
<p>Create backup files in <i>filename~</i>.</p>
119
<table width="100%" border=0 rules="none" frame="void"
120
cols="2" cellspacing="0" cellpadding="0">
121
<tr valign="top" align="left">
122
<td width="11%"></td>
124
<p><b>set backupdir</b> <i>directory</i></p></td>
127
<table width="100%" border=0 rules="none" frame="void"
128
cols="2" cellspacing="0" cellpadding="0">
129
<tr valign="top" align="left">
130
<td width="15%"></td>
132
<p>Set the directory where <b>nano</b> puts unique backup
133
files if file backups are enabled.</p>
137
<table width="100%" border=0 rules="none" frame="void"
138
cols="2" cellspacing="0" cellpadding="0">
139
<tr valign="top" align="left">
140
<td width="11%"></td>
142
<p><b>set/unset backwards</b></p></td>
145
<table width="100%" border=0 rules="none" frame="void"
146
cols="2" cellspacing="0" cellpadding="0">
147
<tr valign="top" align="left">
148
<td width="15%"></td>
150
<p>Do backwards searches by default.</p>
154
<table width="100%" border=0 rules="none" frame="void"
155
cols="2" cellspacing="0" cellpadding="0">
156
<tr valign="top" align="left">
157
<td width="11%"></td>
159
<p><b>set brackets</b> <i>string</i></p></td>
162
<table width="100%" border=0 rules="none" frame="void"
163
cols="2" cellspacing="0" cellpadding="0">
164
<tr valign="top" align="left">
165
<td width="15%"></td>
167
<p>Set the characters treated as closing brackets. They
168
cannot contain blank characters. Only closing punctuation,
169
optionally followed by closing brackets, can end
174
<table width="100%" border=0 rules="none" frame="void"
175
cols="2" cellspacing="0" cellpadding="0">
176
<tr valign="top" align="left">
177
<td width="11%"></td>
179
<p><b>set/unset casesensitive</b></p></td>
182
<table width="100%" border=0 rules="none" frame="void"
183
cols="2" cellspacing="0" cellpadding="0">
184
<tr valign="top" align="left">
185
<td width="15%"></td>
187
<p>Do case sensitive searches by default.</p>
191
<table width="100%" border=0 rules="none" frame="void"
192
cols="2" cellspacing="0" cellpadding="0">
193
<tr valign="top" align="left">
194
<td width="11%"></td>
196
<p><b>set/unset const</b></p></td>
199
<table width="100%" border=0 rules="none" frame="void"
200
cols="2" cellspacing="0" cellpadding="0">
201
<tr valign="top" align="left">
202
<td width="15%"></td>
204
<p>Constantly display the cursor position in the status
209
<table width="100%" border=0 rules="none" frame="void"
210
cols="2" cellspacing="0" cellpadding="0">
211
<tr valign="top" align="left">
212
<td width="11%"></td>
214
<p><b>set/unset cut</b></p></td>
217
<table width="100%" border=0 rules="none" frame="void"
218
cols="2" cellspacing="0" cellpadding="0">
219
<tr valign="top" align="left">
220
<td width="15%"></td>
222
<p>Use cut to end of line by default.</p>
226
<table width="100%" border=0 rules="none" frame="void"
227
cols="2" cellspacing="0" cellpadding="0">
228
<tr valign="top" align="left">
229
<td width="11%"></td>
231
<p><b>set fill</b> <i>n</i></p></td>
234
<table width="100%" border=0 rules="none" frame="void"
235
cols="2" cellspacing="0" cellpadding="0">
236
<tr valign="top" align="left">
237
<td width="15%"></td>
239
<p>Wrap lines at column number <i>n</i>. If <i>n</i> is 0 or
240
less, the maximum line length will be the screen width less
241
<i>n</i> columns. The default value is -8.</p>
245
<table width="100%" border=0 rules="none" frame="void"
246
cols="2" cellspacing="0" cellpadding="0">
247
<tr valign="top" align="left">
248
<td width="11%"></td>
250
<p><b>set/unset historylog</b></p></td>
253
<table width="100%" border=0 rules="none" frame="void"
254
cols="2" cellspacing="0" cellpadding="0">
255
<tr valign="top" align="left">
256
<td width="15%"></td>
258
<p>Enable <i>~/.nano_history</i> for saving and reading
259
search/replace strings.</p>
263
<table width="100%" border=0 rules="none" frame="void"
264
cols="2" cellspacing="0" cellpadding="0">
265
<tr valign="top" align="left">
266
<td width="11%"></td>
268
<p><b>set/unset morespace</b></p></td>
271
<table width="100%" border=0 rules="none" frame="void"
272
cols="2" cellspacing="0" cellpadding="0">
273
<tr valign="top" align="left">
274
<td width="15%"></td>
276
<p>Allow use of the blank line below the titlebar as extra
281
<table width="100%" border=0 rules="none" frame="void"
282
cols="2" cellspacing="0" cellpadding="0">
283
<tr valign="top" align="left">
284
<td width="11%"></td>
286
<p><b>set/unset mouse</b></p></td>
289
<table width="100%" border=0 rules="none" frame="void"
290
cols="2" cellspacing="0" cellpadding="0">
291
<tr valign="top" align="left">
292
<td width="15%"></td>
294
<p>Enable mouse support, so that mouse clicks can be used to
295
set the mark and run shortcuts.</p>
299
<table width="100%" border=0 rules="none" frame="void"
300
cols="2" cellspacing="0" cellpadding="0">
301
<tr valign="top" align="left">
302
<td width="11%"></td>
304
<p><b>set/unset multibuffer</b></p></td>
307
<table width="100%" border=0 rules="none" frame="void"
308
cols="2" cellspacing="0" cellpadding="0">
309
<tr valign="top" align="left">
310
<td width="15%"></td>
312
<p>Allow inserting files into their own buffers.</p>
316
<table width="100%" border=0 rules="none" frame="void"
317
cols="2" cellspacing="0" cellpadding="0">
318
<tr valign="top" align="left">
319
<td width="11%"></td>
321
<p><b>set/unset noconvert</b></p></td>
324
<table width="100%" border=0 rules="none" frame="void"
325
cols="2" cellspacing="0" cellpadding="0">
326
<tr valign="top" align="left">
327
<td width="15%"></td>
329
<p>Don’t convert files from DOS/Mac format.</p>
333
<table width="100%" border=0 rules="none" frame="void"
334
cols="2" cellspacing="0" cellpadding="0">
335
<tr valign="top" align="left">
336
<td width="11%"></td>
338
<p><b>set/unset nofollow</b></p></td>
341
<table width="100%" border=0 rules="none" frame="void"
342
cols="2" cellspacing="0" cellpadding="0">
343
<tr valign="top" align="left">
344
<td width="15%"></td>
346
<p>Don’t follow symlinks when writing files.</p>
350
<table width="100%" border=0 rules="none" frame="void"
351
cols="2" cellspacing="0" cellpadding="0">
352
<tr valign="top" align="left">
353
<td width="11%"></td>
355
<p><b>set/unset nohelp</b></p></td>
358
<table width="100%" border=0 rules="none" frame="void"
359
cols="2" cellspacing="0" cellpadding="0">
360
<tr valign="top" align="left">
361
<td width="15%"></td>
363
<p>Don’t display the help lists at the bottom of the
368
<table width="100%" border=0 rules="none" frame="void"
369
cols="2" cellspacing="0" cellpadding="0">
370
<tr valign="top" align="left">
371
<td width="11%"></td>
373
<p><b>set/unset nonewlines</b></p></td>
376
<table width="100%" border=0 rules="none" frame="void"
377
cols="2" cellspacing="0" cellpadding="0">
378
<tr valign="top" align="left">
379
<td width="15%"></td>
381
<p>Don’t add newlines to the ends of files.</p>
385
<table width="100%" border=0 rules="none" frame="void"
386
cols="2" cellspacing="0" cellpadding="0">
387
<tr valign="top" align="left">
388
<td width="11%"></td>
390
<p><b>set/unset nowrap</b></p></td>
393
<table width="100%" border=0 rules="none" frame="void"
394
cols="2" cellspacing="0" cellpadding="0">
395
<tr valign="top" align="left">
396
<td width="15%"></td>
398
<p>Don’t wrap text at all.</p>
402
<table width="100%" border=0 rules="none" frame="void"
403
cols="2" cellspacing="0" cellpadding="0">
404
<tr valign="top" align="left">
405
<td width="11%"></td>
407
<p><b>set operatingdir</b> <i>directory</i></p></td>
410
<table width="100%" border=0 rules="none" frame="void"
411
cols="2" cellspacing="0" cellpadding="0">
412
<tr valign="top" align="left">
413
<td width="15%"></td>
415
<p><b>nano</b> will only read and write files inside
416
<i>directory</i> and its subdirectories. Also, the current
417
directory is changed to here, so files are inserted from
418
this dir. By default the operating directory feature is
423
<table width="100%" border=0 rules="none" frame="void"
424
cols="2" cellspacing="0" cellpadding="0">
425
<tr valign="top" align="left">
426
<td width="11%"></td>
428
<p><b>set/unset preserve</b></p></td>
431
<table width="100%" border=0 rules="none" frame="void"
432
cols="2" cellspacing="0" cellpadding="0">
433
<tr valign="top" align="left">
434
<td width="15%"></td>
436
<p>Preserve the XON and XOFF keys (^Q and ^S).</p>
440
<table width="100%" border=0 rules="none" frame="void"
441
cols="2" cellspacing="0" cellpadding="0">
442
<tr valign="top" align="left">
443
<td width="11%"></td>
445
<p><b>set punct</b> <i>string</i></p></td>
448
<table width="100%" border=0 rules="none" frame="void"
449
cols="2" cellspacing="0" cellpadding="0">
450
<tr valign="top" align="left">
451
<td width="15%"></td>
453
<p>Set the characters treated as closing punctuation. They
454
cannot contain blank characters. Only closing punctuation,
455
optionally followed by closing brackets, can end
460
<table width="100%" border=0 rules="none" frame="void"
461
cols="2" cellspacing="0" cellpadding="0">
462
<tr valign="top" align="left">
463
<td width="11%"></td>
465
<p><b>set/unset quickblank</b></p></td>
468
<table width="100%" border=0 rules="none" frame="void"
469
cols="2" cellspacing="0" cellpadding="0">
470
<tr valign="top" align="left">
471
<td width="15%"></td>
473
<p>Do quick statusbar blanking. Statusbar messages will
474
disappear after 1 keystroke instead of 25.</p>
478
<table width="100%" border=0 rules="none" frame="void"
479
cols="2" cellspacing="0" cellpadding="0">
480
<tr valign="top" align="left">
481
<td width="11%"></td>
483
<p><b>set quotestr</b> <i>string</i></p></td>
486
<table width="100%" border=0 rules="none" frame="void"
487
cols="2" cellspacing="0" cellpadding="0">
488
<tr valign="top" align="left">
489
<td width="15%"></td>
491
<p>The email-quote string, used to justify email-quoted
492
paragraphs. This is an "extended regular
493
expression" if your system supports them, otherwise a
494
literal string. The default value is</p>
498
<table width="100%" border=0 rules="none" frame="void"
499
cols="3" cellspacing="0" cellpadding="0">
500
<tr valign="top" align="left">
501
<td width="23%"></td>
504
<p>set quotestr "^([ \t]*[|>:}#])+"</p>
510
<table width="100%" border=0 rules="none" frame="void"
511
cols="2" cellspacing="0" cellpadding="0">
512
<tr valign="top" align="left">
513
<td width="15%"></td>
515
<p>if you have regexps, otherwise set quotestr
516
"> ". Note that ’\t’ above
517
stands for a literal Tab character.</p>
521
<table width="100%" border=0 rules="none" frame="void"
522
cols="2" cellspacing="0" cellpadding="0">
523
<tr valign="top" align="left">
524
<td width="11%"></td>
526
<p><b>set/unset rebinddelete</b></p></td>
529
<table width="100%" border=0 rules="none" frame="void"
530
cols="2" cellspacing="0" cellpadding="0">
531
<tr valign="top" align="left">
532
<td width="15%"></td>
534
<p>Interpret the Delete key differently so that both
535
Backspace and Delete work properly. You should only need to
536
use this option if Backspace acts like Delete on your
541
<table width="100%" border=0 rules="none" frame="void"
542
cols="2" cellspacing="0" cellpadding="0">
543
<tr valign="top" align="left">
544
<td width="11%"></td>
546
<p><b>set/unset rebindkeypad</b></p></td>
549
<table width="100%" border=0 rules="none" frame="void"
550
cols="2" cellspacing="0" cellpadding="0">
551
<tr valign="top" align="left">
552
<td width="15%"></td>
554
<p>Interpret the numeric keypad keys so that they all work
555
properly. You should only need to use this option if they
556
don’t, as mouse support won’t work properly with
557
this option enabled.</p>
561
<table width="100%" border=0 rules="none" frame="void"
562
cols="2" cellspacing="0" cellpadding="0">
563
<tr valign="top" align="left">
564
<td width="11%"></td>
566
<p><b>set/unset regexp</b></p></td>
569
<table width="100%" border=0 rules="none" frame="void"
570
cols="2" cellspacing="0" cellpadding="0">
571
<tr valign="top" align="left">
572
<td width="15%"></td>
574
<p>Do regular expression searches by default.</p>
578
<table width="100%" border=0 rules="none" frame="void"
579
cols="2" cellspacing="0" cellpadding="0">
580
<tr valign="top" align="left">
581
<td width="11%"></td>
583
<p><b>set/unset smarthome</b></p></td>
586
<table width="100%" border=0 rules="none" frame="void"
587
cols="2" cellspacing="0" cellpadding="0">
588
<tr valign="top" align="left">
589
<td width="15%"></td>
591
<p>Make the Home key smarter. When Home is pressed anywhere
592
but at the very beginning of non-whitespace characters on a
593
line, the cursor will jump to that beginning (either
594
forwards or backwards). If the cursor is already at that
595
position, it will jump to the true beginning of the
600
<table width="100%" border=0 rules="none" frame="void"
601
cols="2" cellspacing="0" cellpadding="0">
602
<tr valign="top" align="left">
603
<td width="11%"></td>
605
<p><b>set/unset smooth</b></p></td>
608
<table width="100%" border=0 rules="none" frame="void"
609
cols="2" cellspacing="0" cellpadding="0">
610
<tr valign="top" align="left">
611
<td width="15%"></td>
613
<p>Use smooth scrolling by default.</p>
617
<table width="100%" border=0 rules="none" frame="void"
618
cols="2" cellspacing="0" cellpadding="0">
619
<tr valign="top" align="left">
620
<td width="11%"></td>
622
<p><b>set speller</b> <i>spellprog</i></p></td>
625
<table width="100%" border=0 rules="none" frame="void"
626
cols="2" cellspacing="0" cellpadding="0">
627
<tr valign="top" align="left">
628
<td width="15%"></td>
630
<p>Use spelling checker <i>spellprog</i> instead of the
631
built-in one, which calls <i>spell</i>.</p>
635
<table width="100%" border=0 rules="none" frame="void"
636
cols="2" cellspacing="0" cellpadding="0">
637
<tr valign="top" align="left">
638
<td width="11%"></td>
640
<p><b>set/unset suspend</b></p></td>
643
<table width="100%" border=0 rules="none" frame="void"
644
cols="2" cellspacing="0" cellpadding="0">
645
<tr valign="top" align="left">
646
<td width="15%"></td>
648
<p>Allow nano to be suspended.</p>
652
<table width="100%" border=0 rules="none" frame="void"
653
cols="2" cellspacing="0" cellpadding="0">
654
<tr valign="top" align="left">
655
<td width="11%"></td>
657
<p><b>set tabsize</b> <i>n</i></p></td>
660
<table width="100%" border=0 rules="none" frame="void"
661
cols="2" cellspacing="0" cellpadding="0">
662
<tr valign="top" align="left">
663
<td width="15%"></td>
665
<p>Use a tab size of <i>n</i> columns. The value of <i>n</i>
666
must be greater than 0. The default value is 8.</p>
670
<table width="100%" border=0 rules="none" frame="void"
671
cols="2" cellspacing="0" cellpadding="0">
672
<tr valign="top" align="left">
673
<td width="11%"></td>
675
<p><b>set/unset tabstospaces</b></p></td>
678
<table width="100%" border=0 rules="none" frame="void"
679
cols="2" cellspacing="0" cellpadding="0">
680
<tr valign="top" align="left">
681
<td width="15%"></td>
683
<p>Convert typed tabs to spaces.</p>
687
<table width="100%" border=0 rules="none" frame="void"
688
cols="2" cellspacing="0" cellpadding="0">
689
<tr valign="top" align="left">
690
<td width="11%"></td>
692
<p><b>set/unset tempfile</b></p></td>
695
<table width="100%" border=0 rules="none" frame="void"
696
cols="2" cellspacing="0" cellpadding="0">
697
<tr valign="top" align="left">
698
<td width="15%"></td>
700
<p>Save automatically on exit, don’t prompt.</p>
704
<table width="100%" border=0 rules="none" frame="void"
705
cols="2" cellspacing="0" cellpadding="0">
706
<tr valign="top" align="left">
707
<td width="11%"></td>
709
<p><b>set/unset view</b></p></td>
712
<table width="100%" border=0 rules="none" frame="void"
713
cols="2" cellspacing="0" cellpadding="0">
714
<tr valign="top" align="left">
715
<td width="15%"></td>
717
<p>Disallow file modification.</p>
721
<table width="100%" border=0 rules="none" frame="void"
722
cols="2" cellspacing="0" cellpadding="0">
723
<tr valign="top" align="left">
724
<td width="11%"></td>
726
<p><b>set whitespace</b> <i>string</i></p></td>
729
<table width="100%" border=0 rules="none" frame="void"
730
cols="2" cellspacing="0" cellpadding="0">
731
<tr valign="top" align="left">
732
<td width="15%"></td>
734
<p>Set the two characters used to display the first
735
characters of tabs and spaces. They must be single-column
740
<table width="100%" border=0 rules="none" frame="void"
741
cols="2" cellspacing="0" cellpadding="0">
742
<tr valign="top" align="left">
743
<td width="11%"></td>
745
<p><b>set/unset wordbounds</b></p></td>
748
<table width="100%" border=0 rules="none" frame="void"
749
cols="2" cellspacing="0" cellpadding="0">
750
<tr valign="top" align="left">
751
<td width="15%"></td>
753
<p>Detect word boundaries more accurately by treating
754
punctuation characters as part of a word.</p>
758
<table width="100%" border=0 rules="none" frame="void"
759
cols="2" cellspacing="0" cellpadding="0">
760
<tr valign="top" align="left">
761
<td width="11%"></td>
763
<p><b>syntax</b> <i>str</i>
764
<b>["</b><i>fileregex</i><b>" ... ]</b></p></td>
767
<table width="100%" border=0 rules="none" frame="void"
768
cols="2" cellspacing="0" cellpadding="0">
769
<tr valign="top" align="left">
770
<td width="15%"></td>
772
<p>Defines a syntax named <i>str</i> which can be activated
773
via the <b>-Y</b> flag, or will be automatically activated
774
if the current filename matches <i>fileregex</i>. All
775
following <b>color</b> and <b>icolor</b> statements will
776
apply to <i>syntax</i> until a new syntax is defined.</p>
778
<p>The <i>none</i> syntax is reserved; specifying it on the
779
command line is the same as not having a syntax at all. The
780
<i>default</i> syntax is special: it takes no
781
<i>fileregex</i>, and applies to files that don’t
782
match any other syntax’s <i>fileregex</i>.</p>
786
<table width="100%" border=0 rules="none" frame="void"
787
cols="2" cellspacing="0" cellpadding="0">
788
<tr valign="top" align="left">
789
<td width="11%"></td>
791
<p><b>color</b> <i>fgcolor</i><b>,</b><i>bgcolor regex</i>
795
<table width="100%" border=0 rules="none" frame="void"
796
cols="2" cellspacing="0" cellpadding="0">
797
<tr valign="top" align="left">
798
<td width="15%"></td>
800
<p>For the currently defined syntax, display all expressions
801
matching <i>regex</i> with foreground color <i>fgcolor</i>
802
and background color <i>bgcolor</i>, at least one of which
803
must be specified. Legal colors for foreground and
804
background color are: white, black, red, blue, green,
805
yellow, magenta, and cyan. You may use the prefix
806
"bright" to force a stronger color highlight for
807
the foreground. If your terminal supports transparency, not
808
specifying a <i>bgcolor</i> tells <b>nano</b> to attempt to
809
use a transparent background.</p>
813
<table width="100%" border=0 rules="none" frame="void"
814
cols="2" cellspacing="0" cellpadding="0">
815
<tr valign="top" align="left">
816
<td width="11%"></td>
818
<p><b>icolor</b> <i>fgcolor</i><b>,</b><i>bgcolor regex</i>
822
<table width="100%" border=0 rules="none" frame="void"
823
cols="2" cellspacing="0" cellpadding="0">
824
<tr valign="top" align="left">
825
<td width="15%"></td>
827
<p>Same as above, except that the expression matching is
828
case insensitive.</p>
832
<table width="100%" border=0 rules="none" frame="void"
833
cols="2" cellspacing="0" cellpadding="0">
834
<tr valign="top" align="left">
835
<td width="11%"></td>
837
<p><b>color</b> <i>fgcolor</i><b>,</b><i>bgcolor</i>
838
<b>start="</b><i>sr</i><b>"
839
end="</b><i>er</i><b>"</b></p></td>
842
<table width="100%" border=0 rules="none" frame="void"
843
cols="2" cellspacing="0" cellpadding="0">
844
<tr valign="top" align="left">
845
<td width="15%"></td>
847
<p>Display expressions which start with <i>sr</i> and end
848
with <i>er</i> with foreground color <i>fgcolor</i> and
849
background color <i>bgcolor</i>, at least one of which must
850
be specified. This allows syntax highlighting to span
851
multiple lines. Note that all subsequent instances of
852
<i>sr</i> after an initial <i>sr</i> is found will be
853
highlighted until the first instance of <i>er</i>.</p>
857
<table width="100%" border=0 rules="none" frame="void"
858
cols="2" cellspacing="0" cellpadding="0">
859
<tr valign="top" align="left">
860
<td width="11%"></td>
862
<p><b>icolor</b> <i>fgcolor</i><b>,</b><i>bgcolor</i>
863
<b>start="</b><i>sr</i><b>"
864
end="</b><i>er</i><b>"</b></p></td>
867
<table width="100%" border=0 rules="none" frame="void"
868
cols="2" cellspacing="0" cellpadding="0">
869
<tr valign="top" align="left">
870
<td width="15%"></td>
872
<p>Same as above, except that the expression matching is
873
case insensitive.</p>
64
<p style="margin-left:11%; margin-top: 1em">The
65
configuration file accepts a series of "set" and
66
"unset" commands, which can be used to configure
67
nano on startup without using the command-line options.
68
Additionally, the "syntax", "color", and
69
"icolor" keywords are used to define syntax
70
highlighting rules for different text patterns. GNU nano
71
will read one command per line.</p>
73
<p style="margin-left:11%; margin-top: 1em">Options in
74
rcfiles take precedence over nano’s defaults, and
75
command line options override rcfile settings.</p>
77
<p style="margin-left:11%; margin-top: 1em">Options are
78
unset by default, except for options that take an
81
<p style="margin-left:11%; margin-top: 1em">Quotes inside
82
string parameters don’t have to be escaped with
83
backslashes. The last double quote in the string will be
84
treated as its end. For example, for the brackets option,
85
"<i>"’)>]}</i>" will match
86
<i>"</i>, <i>’</i>, <i>)</i>, <i>></i>,
87
<i>]</i>, and <i>}</i>.</p>
89
<p style="margin-left:11%; margin-top: 1em">The supported
90
commands and arguments are: <b><br>
91
set/unset autoindent</b></p>
93
<p style="margin-left:15%;">Use auto-indentation.</p>
95
<p style="margin-left:11%;"><b>set/unset backup</b></p>
97
<p style="margin-left:15%;">Create backup files in
100
<p style="margin-left:11%;"><b>set backupdir</b>
103
<p style="margin-left:15%;">Set the directory where
104
<b>nano</b> puts unique backup files if file backups are
107
<p style="margin-left:11%;"><b>set/unset backwards</b></p>
109
<p style="margin-left:15%;">Do backwards searches by
112
<p style="margin-left:11%;"><b>set brackets</b>
115
<p style="margin-left:15%;">Set the characters treated as
116
closing brackets. They cannot contain blank characters. Only
117
closing punctuation, optionally followed by closing
118
brackets, can end sentences. The default value is
119
"<i>"’)>]}</i>".</p>
121
<p style="margin-left:11%;"><b>set/unset
122
casesensitive</b></p>
124
<p style="margin-left:15%;">Do case sensitive searches by
127
<p style="margin-left:11%;"><b>set/unset const</b></p>
129
<p style="margin-left:15%;">Constantly display the cursor
130
position in the status bar.</p>
132
<p style="margin-left:11%;"><b>set/unset cut</b></p>
134
<p style="margin-left:15%;">Use cut to end of line by
137
<p style="margin-left:11%;"><b>set fill</b> <i>n</i></p>
139
<p style="margin-left:15%;">Wrap lines at column number
140
<i>n</i>. If <i>n</i> is 0 or less, the maximum line length
141
will be the screen width less <i>n</i> columns. The default
144
<p style="margin-left:11%;"><b>set/unset historylog</b></p>
146
<p style="margin-left:15%;">Enable <i>~/.nano_history</i>
147
for saving and reading search/replace strings.</p>
149
<p style="margin-left:11%;"><b>set matchbrackets</b>
152
<p style="margin-left:15%;">Set the opening and closing
153
brackets that can be found by bracket searches. They cannot
154
contain blank characters. The former set must come before
155
the latter set, and both must be in the same order. The
156
default value is "<i>(<[{)>]}</i>".</p>
158
<p style="margin-left:11%;"><b>set/unset morespace</b></p>
160
<p style="margin-left:15%;">Allow use of the blank line
161
below the titlebar as extra editing space.</p>
163
<p style="margin-left:11%;"><b>set/unset mouse</b></p>
165
<p style="margin-left:15%;">Enable mouse support, so that
166
mouse clicks can be used to set the mark and run
169
<p style="margin-left:11%;"><b>set/unset
172
<p style="margin-left:15%;">Allow inserting files into
173
their own buffers.</p>
175
<p style="margin-left:11%;"><b>set/unset noconvert</b></p>
177
<p style="margin-left:15%;">Don’t convert files from
180
<p style="margin-left:11%;"><b>set/unset nofollow</b></p>
182
<p style="margin-left:15%;">Don’t follow symlinks
183
when writing files.</p>
185
<p style="margin-left:11%;"><b>set/unset nohelp</b></p>
187
<p style="margin-left:15%;">Don’t display the help
188
lists at the bottom of the screen.</p>
190
<p style="margin-left:11%;"><b>set/unset nonewlines</b></p>
192
<p style="margin-left:15%;">Don’t add newlines to the
195
<p style="margin-left:11%;"><b>set/unset nowrap</b></p>
197
<p style="margin-left:15%;">Don’t wrap text at
200
<p style="margin-left:11%;"><b>set operatingdir</b>
203
<p style="margin-left:15%;"><b>nano</b> will only read and
204
write files inside <i>directory</i> and its subdirectories.
205
Also, the current directory is changed to here, so files are
206
inserted from this dir. By default the operating directory
207
feature is turned off.</p>
209
<p style="margin-left:11%;"><b>set/unset preserve</b></p>
211
<p style="margin-left:15%;">Preserve the XON and XOFF keys
214
<p style="margin-left:11%;"><b>set punct</b>
217
<p style="margin-left:15%;">Set the characters treated as
218
closing punctuation. They cannot contain blank characters.
219
Only closing punctuation, optionally followed by closing
220
brackets, can end sentences. The default value is
221
"<i>!.?</i>".</p>
223
<p style="margin-left:11%;"><b>set/unset quickblank</b></p>
225
<p style="margin-left:15%;">Do quick statusbar blanking.
226
Statusbar messages will disappear after 1 keystroke instead
229
<p style="margin-left:11%;"><b>set quotestr</b>
232
<p style="margin-left:15%;">The email-quote string, used to
233
justify email-quoted paragraphs. This is an "extended
234
regular expression" if your system supports them,
235
otherwise a literal string. The default value is
236
"<i>^([ \t]*[#:>\|}])+</i>" if you have
237
regexps, or "<i>> </i>" otherwise. Note
238
that ’\t’ stands for a literal Tab
241
<p style="margin-left:11%;"><b>set/unset
244
<p style="margin-left:15%;">Interpret the Delete key
245
differently so that both Backspace and Delete work properly.
246
You should only need to use this option if Backspace acts
247
like Delete on your system.</p>
249
<p style="margin-left:11%;"><b>set/unset
252
<p style="margin-left:15%;">Interpret the numeric keypad
253
keys so that they all work properly. You should only need to
254
use this option if they don’t, as mouse support
255
won’t work properly with this option enabled.</p>
257
<p style="margin-left:11%;"><b>set/unset regexp</b></p>
259
<p style="margin-left:15%;">Do regular expression searches
262
<p style="margin-left:11%;"><b>set/unset smarthome</b></p>
264
<p style="margin-left:15%;">Make the Home key smarter. When
265
Home is pressed anywhere but at the very beginning of
266
non-whitespace characters on a line, the cursor will jump to
267
that beginning (either forwards or backwards). If the cursor
268
is already at that position, it will jump to the true
269
beginning of the line.</p>
271
<p style="margin-left:11%;"><b>set/unset smooth</b></p>
273
<p style="margin-left:15%;">Use smooth scrolling by
276
<p style="margin-left:11%;"><b>set speller</b>
279
<p style="margin-left:15%;">Use spelling checker
280
<i>spellprog</i> instead of the built-in one, which calls
283
<p style="margin-left:11%;"><b>set/unset suspend</b></p>
285
<p style="margin-left:15%;">Allow nano to be suspended.</p>
287
<p style="margin-left:11%;"><b>set tabsize</b> <i>n</i></p>
289
<p style="margin-left:15%;">Use a tab size of <i>n</i>
290
columns. The value of <i>n</i> must be greater than 0. The
291
default value is 8.</p>
293
<p style="margin-left:11%;"><b>set/unset
296
<p style="margin-left:15%;">Convert typed tabs to
299
<p style="margin-left:11%;"><b>set/unset tempfile</b></p>
301
<p style="margin-left:15%;">Save automatically on exit,
302
don’t prompt.</p>
304
<p style="margin-left:11%;"><b>set/unset view</b></p>
306
<p style="margin-left:15%;">Disallow file modification.</p>
308
<p style="margin-left:11%;"><b>set whitespace</b>
311
<p style="margin-left:15%;">Set the two characters used to
312
display the first characters of tabs and spaces. They must
313
be single-column characters.</p>
315
<p style="margin-left:11%;"><b>set/unset wordbounds</b></p>
317
<p style="margin-left:15%;">Detect word boundaries more
318
accurately by treating punctuation characters as part of a
321
<p style="margin-left:11%;"><b>syntax</b> <i>str</i>
322
<b>["</b><i>fileregex</i><b>" ... ]</b></p>
324
<p style="margin-left:15%;">Defines a syntax named
325
<i>str</i> which can be activated via the <b>-Y</b> flag, or
326
will be automatically activated if the current filename
327
matches <i>fileregex</i>. All following <b>color</b> and
328
<b>icolor</b> statements will apply to <i>syntax</i> until a
329
new syntax is defined.</p>
331
<p style="margin-left:15%; margin-top: 1em">The <i>none</i>
332
syntax is reserved; specifying it on the command line is the
333
same as not having a syntax at all. The <i>default</i>
334
syntax is special: it takes no <i>fileregex</i>, and applies
335
to files that don’t match any other syntax’s
336
<i>fileregex</i>.</p>
338
<p style="margin-left:11%;"><b>color</b>
339
<i>fgcolor</i><b>,</b><i>bgcolor regex</i> <b>...</b></p>
341
<p style="margin-left:15%;">For the currently defined
342
syntax, display all expressions matching <i>regex</i> with
343
foreground color <i>fgcolor</i> and background color
344
<i>bgcolor</i>, at least one of which must be specified.
345
Legal colors for foreground and background color are: white,
346
black, red, blue, green, yellow, magenta, and cyan. You may
347
use the prefix "bright" to force a stronger color
348
highlight for the foreground. If your terminal supports
349
transparency, not specifying a <i>bgcolor</i> tells
350
<b>nano</b> to attempt to use a transparent background.</p>
352
<p style="margin-left:11%;"><b>icolor</b>
353
<i>fgcolor</i><b>,</b><i>bgcolor regex</i> <b>...</b></p>
355
<p style="margin-left:15%;">Same as above, except that the
356
expression matching is case insensitive.</p>
358
<p style="margin-left:11%;"><b>color</b>
359
<i>fgcolor</i><b>,</b><i>bgcolor</i>
360
<b>start="</b><i>sr</i><b>"
361
end="</b><i>er</i><b>"</b></p>
363
<p style="margin-left:15%;">Display expressions which start
364
with <i>sr</i> and end with <i>er</i> with foreground color
365
<i>fgcolor</i> and background color <i>bgcolor</i>, at least
366
one of which must be specified. This allows syntax
367
highlighting to span multiple lines. Note that all
368
subsequent instances of <i>sr</i> after an initial <i>sr</i>
369
is found will be highlighted until the first instance of
372
<p style="margin-left:11%;"><b>icolor</b>
373
<i>fgcolor</i><b>,</b><i>bgcolor</i>
374
<b>start="</b><i>sr</i><b>"
375
end="</b><i>er</i><b>"</b></p>
377
<p style="margin-left:15%;">Same as above, except that the
378
expression matching is case insensitive.</p>
876
380
<a name="FILES"></a>
879
<table width="100%" border=0 rules="none" frame="void"
880
cols="2" cellspacing="0" cellpadding="0">
881
<tr valign="top" align="left">
882
<td width="11%"></td>
884
<p><i>SYSCONFDIR/nanorc</i></p></td>
887
<table width="100%" border=0 rules="none" frame="void"
888
cols="2" cellspacing="0" cellpadding="0">
889
<tr valign="top" align="left">
890
<td width="22%"></td>
892
<p>System-wide configuration file</p>
896
<table width="100%" border=0 rules="none" frame="void"
897
cols="2" cellspacing="0" cellpadding="0">
898
<tr valign="top" align="left">
899
<td width="11%"></td>
901
<p><i>~/.nanorc</i></p></td>
904
<table width="100%" border=0 rules="none" frame="void"
905
cols="2" cellspacing="0" cellpadding="0">
906
<tr valign="top" align="left">
907
<td width="22%"></td>
909
<p>Per-user configuration file</p>
385
<p style="margin-left:11%; margin-top: 1em"><i>SYSCONFDIR/nanorc</i></p>
387
<p style="margin-left:22%;">System-wide configuration
390
<p style="margin-left:11%;"><i>~/.nanorc</i></p>
392
<p style="margin-left:22%;">Per-user configuration file</p>
912
394
<a name="SEE ALSO"></a>
913
395
<h2>SEE ALSO</h2>
915
<table width="100%" border=0 rules="none" frame="void"
916
cols="2" cellspacing="0" cellpadding="0">
917
<tr valign="top" align="left">
918
<td width="11%"></td>
920
<p><b>nano</b>(1)</p></td>
923
<table width="100%" border=0 rules="none" frame="void"
924
cols="2" cellspacing="0" cellpadding="0">
925
<tr valign="top" align="left">
926
<td width="11%"></td>
928
<p><i>/usr/share/doc/nano/examples/nanorc.sample</i> (or
929
equivalent on your system)</p></td>
398
<p style="margin-left:11%; margin-top: 1em"><b>nano</b>(1)
400
/usr/share/doc/nano/examples/nanorc.sample</i> (or
401
equivalent on your system)</p>
931
403
<a name="AUTHOR"></a>
934
<table width="100%" border=0 rules="none" frame="void"
935
cols="2" cellspacing="0" cellpadding="0">
936
<tr valign="top" align="left">
937
<td width="11%"></td>
939
<p>Chris Allegretta <chrisa@asty.org>, et al (see
940
<i>AUTHORS</i> and <i>THANKS</i> for details). This manual
941
page was written by Jordi Mallach <jordi@gnu.org>.</p>
407
<p style="margin-left:11%;">Chris Allegretta
408
<chrisa@asty.org>, et al (see <i>AUTHORS</i> and
409
<i>THANKS</i> for details). This manual page was written by
410
Jordi Mallach <jordi@gnu.org>.</p>