nanorc.5 24.8 KB
Newer Older
1
.\" Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2
.\" 2013, 2014, 2015 Free Software Foundation, Inc.
Jordi Mallach's avatar
Jordi Mallach committed
3
.\"
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.\" This document is dual-licensed.  You may distribute and/or modify it
.\" under the terms of either of the following licenses:
.\"
.\" * The GNU General Public License, as published by the Free Software
.\"   Foundation, version 3 or (at your option) any later version.  You
.\"   should have received a copy of the GNU General Public License
.\"   along with this program.  If not, see
.\"   <http://www.gnu.org/licenses/>.
.\"
.\" * The GNU Free Documentation License, as published by the Free
.\"   Software Foundation, version 1.2 or (at your option) any later
.\"   version, with no Invariant Sections, no Front-Cover Texts, and no
.\"   Back-Cover Texts.  You should have received a copy of the GNU Free
.\"   Documentation License along with this program.  If not, see
.\"   <http://www.gnu.org/licenses/>.
Jordi Mallach's avatar
Jordi Mallach committed
19
.\"
20
.TH NANORC 5 "version 2.7.0" "September 2016"
Jordi Mallach's avatar
Jordi Mallach committed
21
.\" Please adjust this date whenever revising the manpage.
22

Jordi Mallach's avatar
Jordi Mallach committed
23
.SH NAME
24
25
nanorc \- GNU nano's configuration file

Jordi Mallach's avatar
Jordi Mallach committed
26
.SH DESCRIPTION
27
28
29
The \fInanorc\fP file contains the default settings for \fBnano\fP, a
small and friendly editor.  The file should be in Unix format, not in
DOS or Mac format.  During startup, \fBnano\fP will first read the
30
31
system-wide settings, from \fB/etc/nanorc\fP (the exact path might be
different), and then the user-specific settings, from \fB~/.nanorc\fP.
Jordi Mallach's avatar
Jordi Mallach committed
32
33

.SH OPTIONS
34
35
The configuration file accepts a series of \fBset\fP and \fBunset\fP
commands, which can be used to configure nano on startup without using
36
37
38
command-line options.  Additionally, there are some commands to define
syntax highlighting and to rebind keys -- see the two separate sections
on those.  \fBnano\fP reads one command per line.
39
.PP
40
Options in \fInanorc\fP files take precedence over nano's defaults, and
41
42
43
44
45
46
47
48
command-line options override \fInanorc\fP settings.  Also, options that
do not take an argument are unset by default.  So using the \fBunset\fR
command is only needed when wanting to override a setting of the system's
\fInanorc\fR file in your own \fB~/.nanorc\fR.  Options that take an
argument cannot be unset.
.PP
Below, the \fIstring\fR parameters need to be enclosed in double quotes.
Quotes inside these string parameters don't have to be escaped with
49
backslashes.  The last double quote in the string will be treated as its
50
51
end.  For example, for the \fBbrackets\fP option, "\fB"')>]}\fP" will
match \fB"\fP, \fB'\fP, \fB)\fP, \fB>\fP, \fB]\fP, and \fB}\fP.
52
.PP
Jordi Mallach's avatar
Jordi Mallach committed
53
54
55
The supported commands and arguments are:

.TP 3
56
.B set allow_insecure_backup
57
When backing up files, allow the backup to succeed even if its permissions
58
can't be (re)set due to special OS considerations.  You should
59
60
NOT enable this option unless you are sure you need it.
.TP
61
.B set autoindent
Jordi Mallach's avatar
Jordi Mallach committed
62
63
Use auto-indentation.
.TP
64
.B set backup
65
66
When saving a file, create a backup file by adding a tilde (\fB~\fP) to
the file's name.
Jordi Mallach's avatar
Jordi Mallach committed
67
.TP
68
.B set backupdir "\fIdirectory\fP"
69
70
71
72
Make and keep not just one backup file, but make and keep a uniquely
numbered one every time a file is saved --- when backups are enabled
with \fBset backup\fR or \fB\-\-backup\fR or \fB\-B\fR.
The uniquely numbered files are stored in the specified \fIdirectory\fR.
73
.TP
74
.B set backwards
75
76
Do backwards searches by default.
.TP
77
.B set boldtext
78
79
80
Use bold instead of reverse video for the titlebar, statusbar, key combos,
and selected text.  This can be overridden for the first three by setting
the options \fBtitlecolor\fP, \fBstatuscolor\fP, and \fBkeycolor\fP.
81
.TP
82
.B set brackets "\fIstring\fP"
83
Set the characters treated as closing brackets when justifying
84
85
86
paragraphs.  This may not include blank characters.  Only closing
punctuation (see \fBpunct\fP), optionally followed by the specified
closing brackets, can end sentences.  The default value is "\fB"')>]}\fP".
87
.TP
88
.B set casesensitive
89
Do case-sensitive searches by default.
90
.TP
91
.B set constantshow
Jordi Mallach's avatar
Jordi Mallach committed
92
Constantly display the cursor position in the status bar.
93
(The old form of this option, '\fBset const\fR', is deprecated.)
Jordi Mallach's avatar
Jordi Mallach committed
94
.TP
95
.B set cut
96
Use cut-to-end-of-line by default, instead of cutting the whole line.
Jordi Mallach's avatar
Jordi Mallach committed
97
.TP
98
99
100
101
.B set fill \fInumber\fR
Hard-wrap lines at column number \fInumber\fR.  If \fInumber\fR is 0 or less,
the maximum line length will be the screen width less \fInumber\fP columns.
The default value is \fB\-8\fR.
Jordi Mallach's avatar
Jordi Mallach committed
102
.TP
103
104
105
106
107
.B set functioncolor \fIfgcolor\fR,\fIbgcolor\fR
Specify the color combination to use for the function descriptions
in the two help lines at the bottom of the screen.
See \fBset titlecolor\fR for more details.
.TP
108
.B set historylog
109
Enable the use of \fB~/.nano/search_history\fP for saving and reading
110
search/replace strings.
111
.TP
112
.B set justifytrim
113
When justifying text, trailing whitespace will automatically be removed.
114
.TP
115
116
117
118
119
.B set keycolor \fIfgcolor\fR,\fIbgcolor\fR
Specify the color combination to use for the shortcut key combos
in the two help lines at the bottom of the screen.
See \fBset titlecolor\fR for more details.
.TP
120
121
122
.B set linenumbers
Display line numbers to the left of the text area.
.TP
123
.B set locking
124
125
Enable vim-style lock-files for when editing files.
.TP
126
127
.B set matchbrackets "\fIstring\fP"
Set the opening and closing brackets that can be found by bracket
128
129
130
searches.  This may not include blank characters.  The opening set must
come before the closing set, and the two sets must be in the same order.
The default value is "\fB(<[{)>]}\fP".
131
.TP
132
.B set morespace
133
Use the blank line below the titlebar as extra editing space.
134
.TP
135
.B set mouse
136
137
138
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
139
System, and on the console when gpm is running.  Text can still be
140
selected through dragging by holding down the Shift key.
141
.TP
142
.B set multibuffer
143
When reading in a file with ^R, insert it into a new buffer by default.
Jordi Mallach's avatar
Jordi Mallach committed
144
.TP
145
.B set noconvert
Jordi Mallach's avatar
Jordi Mallach committed
146
147
Don't convert files from DOS/Mac format.
.TP
148
.B set nohelp
149
Don't display the two help lines at the bottom of the screen.
Jordi Mallach's avatar
Jordi Mallach committed
150
.TP
151
.B set nonewlines
152
Don't automatically add a newline to the ends of files.
153
.TP
154
.B set nowrap
155
Don't hard-wrap text at all.
Jordi Mallach's avatar
Jordi Mallach committed
156
.TP
157
158
159
160
.B set numbercolor \fIfgcolor\fR,\fIbgcolor\fR
Specify the color combination to use for line numbers.
See \fBset titlecolor\fR for more details.
.TP
161
.B set operatingdir "\fIdirectory\fP"
Jordi Mallach's avatar
Jordi Mallach committed
162
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
163
subdirectories.  Also, the current directory is changed to here, so
164
files are inserted from this directory.  By default, the operating
165
directory feature is turned off.
Jordi Mallach's avatar
Jordi Mallach committed
166
.TP
167
.B set positionlog
168
Save the cursor position of files between editing sessions.
169
The cursor position is remembered for the 200 most-recently edited files.
170
(The old form of this option, '\fBset poslog\fR', is deprecated.)
171
.TP
172
.B set preserve
Jordi Mallach's avatar
Jordi Mallach committed
173
174
Preserve the XON and XOFF keys (^Q and ^S).
.TP
175
.B set punct "\fIstring\fP"
176
Set the characters treated as closing punctuation when justifying
177
178
179
paragraphs.  This may not include blank characters.  Only the
specfified closing punctuation, optionally followed by closing brackets
(see \fBbrackets\fP), can end sentences.  The default value is "\fB!.?\fP".
180
.TP
181
.B set quickblank
182
183
184
Do quick statusbar blanking.  Statusbar messages will disappear after 1
keystroke instead of 25.
.TP
185
.B set quiet
186
\fBnano\fP will not report errors in the \fInanorc\fP file nor ask them
187
to be acknowledged by pressing Enter at startup.  If this is used, it
188
189
should be placed at the top of the file to be fully effective.
.TP
190
.B set quotestr "\fIstring\fP"
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
191
The email-quote string, used to justify email-quoted paragraphs.  This
192
is an extended regular expression if your system supports them,
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
193
otherwise a literal string.  The default value is
194
195
"\fB^([\ \\t]*[#:>\\|}])+\fP" if you have extended regular expression
support, and "\fB>\ \fP" otherwise.  Note that '\\t' stands for a literal
196
Tab character.
Jordi Mallach's avatar
Jordi Mallach committed
197
.TP
198
.B set rebinddelete
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
199
200
201
202
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
203
.B set rebindkeypad
204
205
206
207
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
208
.B set regexp
209
Do extended regular expression searches by default.
210
.TP
211
212
213
214
.B set showcursor
Put the cursor on the highlighted item in the file browser, to aid
braille users.
.TP
215
.B set smarthome
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
216
217
218
219
220
221
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
222
.B set smooth
Jordi Mallach's avatar
Jordi Mallach committed
223
224
Use smooth scrolling by default.
.TP
225
.B set softwrap
226
Enable soft line wrapping for easier viewing of very long lines.
227
.TP
228
.B set speller "\fIspellprog\fP"
Jordi Mallach's avatar
Jordi Mallach committed
229
230
Use spelling checker \fIspellprog\fP instead of the built-in one, which
calls \fIspell\fP.
Jordi Mallach's avatar
Jordi Mallach committed
231
.TP
232
233
234
235
.B set statuscolor \fIfgcolor\fR,\fIbgcolor\fR
Specify the color combination to use for the statusbar.
See \fBset titlecolor\fR for more details.
.TP
236
.B set suspend
237
Allow \fBnano\fP to be suspended.
Jordi Mallach's avatar
Jordi Mallach committed
238
.TP
239
240
241
.B set tabsize \fInumber\fR
Use a tab size of \fInumber\fR columns.  The value of \fInumber\fP must be
greater than 0.  The default value is \fB8\fR.
Jordi Mallach's avatar
Jordi Mallach committed
242
.TP
243
.B set tabstospaces
244
245
Convert typed tabs to spaces.
.TP
246
.B set tempfile
Jordi Mallach's avatar
Jordi Mallach committed
247
248
Save automatically on exit, don't prompt.
.TP
249
250
251
252
253
254
.B set titlecolor \fIfgcolor\fR,\fIbgcolor\fR
Specify the color combination to use for the titlebar.
Valid color names for foreground and background are:
.BR white , \ black , \ red , \ blue , \ green , \ yellow , \ magenta ", and " cyan .
And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out.
.TP
255
256
257
258
259
.B set unix
Save a file by default in Unix format.  This overrides nano's
default behavior of saving a file in the format that it had.
(This option has no effect when you also use \fBset noconvert\fR.)
.TP
260
.B set view
Jordi Mallach's avatar
Jordi Mallach committed
261
262
Disallow file modification.
.TP
263
.B set whitespace "\fIstring\fP"
264
Set the two characters used to indicate the presence of tabs and
265
spaces.  They must be single-column characters.
266
.TP
267
.B set wordbounds
268
Detect word boundaries differently by treating punctuation
269
characters as parts of words.
270
271
272
273
274
.TP
.B set wordchars \fIstring\fP
Specify which other characters (besides the normal alphanumeric ones)
should be considered as parts of words.  This overrides the option
\fBwordbounds\fR.
275
276
277

.SH SYNTAX HIGHLIGHTING
Coloring the different syntactic elements of a file
278
279
280
281
282
283
284
285
is done via regular expressions (see the \fBcolor\fR command below).
This is inherently imperfect, because regular expressions are not
powerful enough to fully parse a file.  Nevertheless, regular
expressions can do a lot and are easy to make, so they are a
good fit for a small editor like \fBnano\fR.
.sp
A separate syntax can be defined for each kind of file
via the following commands:
286
.TP
287
.BR syntax " ""\fIstr\fR"" [""\fIfileregex\fR"" ...]"
288
Defines a syntax named \fIstr\fP which can be activated via the
289
290
.BR \-Y / \-\-syntax
command-line option, or will be automatically activated if
291
the current filename matches the extended regular expression
292
293
294
\fIfileregex\fP.  All subsequent \fBcolor\fR, \fBicolor\fR,
\fBheader\fR and other such statements will apply to this
\fIstr\fP syntax until a new \fBsyntax\fR command is encountered.
295

296
297
The \fBnone\fP syntax is reserved; specifying it on the command line is
the same as not having a syntax at all.  The \fBdefault\fP syntax is
298
special: it takes no \fIfileregex\fP, and applies to files that don't
299
match any syntax's \fIfileregex\fP.
300
.TP
301
.BI linter " program " \fR[ "arg " \fR...]
302
303
Use the given \fIprogram\fR to run a syntax check on the current file
(this overrides the speller function when defined).
304
.TP
305
.BI formatter " program " \fR[ "arg " \fR...]
306
307
Use the given \fIprogram\fR to automatically reformat text.
Useful in certain programming languages (e.g. Go).
308
.TP
309
.BR header " \fIregex\fR " ...
310
Add one or more regexes which will
311
312
313
be compared against the very first line of the file to be edited,
to determine whether this syntax should be used for that file.
.TP
314
.BR magic " \fIregex\fR " ...
315
Add one or more regexes which
316
317
318
will be compared against the result of querying the \fBmagic\fP
database about the file to be edited, to determine whether this
syntax should be used for that file.  This
319
functionality only works when \fBlibmagic\fP is installed on the
320
321
system and will be silently ignored otherwise.
.TP
322
323
324
325
326
327
328
329
330
331
.BI comment " string"
Use the given string for commenting and uncommenting lines.  A vertical bar or
pipe character (|) designates bracket-style comments; for example, "/*|*/" for
CSS files.  The characters before the pipe are prepended to the line and the
characters after the pipe are appended at the end of the line.  If no pipe
character is present, the entire string is prepended; for example, "#" for
Python files.  If empty double quotes are specified, the comment/uncomment
function is disabled; for example, "" for JSON.  Double quotes or backslashes
may be escaped with a backslash; for example, ".\\"" for man page source.
.TP
332
.B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
333
Display all pieces of text that match
334
335
the extended regular expression \fIregex\fP with foreground color
\fIfgcolor\fP and background color \fIbgcolor\fP, at least one of which
336
must be specified.  Valid colors for foreground and background
337
are: white, black, red, blue, green, yellow, magenta, and cyan.  You may
338
use the prefix "bright" to get a stronger color highlight for the
339
340
341
foreground.  If your terminal supports transparency, not specifying a
\fIbgcolor\fP tells \fBnano\fP to attempt to use a transparent
background.
342
.TP
343
.B icolor \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ...
344
Same as above, except that the text matching is case insensitive.
345
.TP
346
.BR color " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
347
348
Display all pieces of text whose start matches extended regular expression
\fIsr\fP and whose end matches extended regular expression \fIer\fP with
349
foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
350
351
352
353
at least one of which must be specified.  This means that, after an
initial instance of \fIsr\fP, all text will be highlighted until the
first instance of \fIer\fP.  This allows syntax highlighting to span
multiple lines.
354
.TP
355
.BR icolor " \fIfgcolor\fR,\fIbgcolor\fR " start= """\fIsr\fR"" " end= """\fIer\fR""
356
Same as above, except that the text matching is case insensitive.
357
.TP
358
.BR include " ""\fIsyntaxfile\fR"""
359
Read in self-contained color syntaxes from \fIsyntaxfile\fP.  Note that
360
\fIsyntaxfile\fP may contain only the above commands, from \fBsyntax\fP
361
to \fBicolor\fP.
362
.TP
363
.BI extendsyntax " str directive " \fR[ "arg " \fR...]
364
Extend the syntax previously defined as \fIstr\fP to include
365
new information.  This allows you to add a new \fBcolor\fP, \fBicolor\fP,
366
\fBheader\fP, \fBmagic\fP, \fBcomment\fP, \fBlinter\fP, or \fBformatter\fP directive
367
368
369
to an already defined syntax -- useful when you want to
slightly improve a syntax defined in one of the system-installed
files (which are normally not writable)
370
.SH REBINDING KEYS
371
Key bindings can be changed via the following two commands:
372
.TP
373
.BI bind " key function menu"
374
Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
375
376
context of menu \fImenu\fP (or in all menus where the function exists
by using \fBall\fP).
377
.TP
378
.BI unbind " key menu"
379
Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all
380
381
382
383
menus where it exists by using \fBall\fP).

.TP
The format of \fIkey\fP should be one of:
384
385
.RS 3
.TP 3
386
.B ^
387
388
followed by an alpha character or the word "Space".
Example: ^C
389
.TP
390
.B M-
391
followed by a printable character or the word "Space".
392
Example: M-C
393
.TP
394
.B F
395
followed by a numeric value from 1 to 16.
396
Example: F10
397
.RE
398

399
.TP
400
Valid \fIfunction\fP names to be bound are:
401
.RS 3
402
.TP 2
403
.B help
404
Invokes the help viewer.
405
406
.TP
.B cancel
407
Cancels the current command.
408
409
.TP
.B exit
410
Exits from the program (or from the help viewer or the file browser).
411
412
.TP
.B writeout
413
414
415
416
Writes the current buffer to disk, asking for a name.
.TP
.B savefile
Writes the current file to disk without prompting or warning.
417
418
.TP
.B insert
419
420
Inserts a file into the current buffer (at the current cursor position),
or into a new buffer when option \fBmultibuffer\fR is set.
421
422
.TP
.B whereis
423
424
Searches for text in the current buffer -- or for filenames matching
a string in the current list in the file browser.
425
426
.TP
.B searchagain
427
Repeats the last search command without prompting.
428
(The form 'research' is deprecated.)
429
430
431
432
433
434
.TP
.B findprevious
As \fBsearchagain\fR, but always in the backward direction.
.TP
.B findnext
As \fBsearchagain\fR, but always in the forward direction.
435
.TP
436
.B replace
437
Interactively replaces text within the current buffer.
438
439
.TP
.B cut
440
Cuts and stores the current line (or the marked region).
441
.TP
442
.B copytext
443
Copies the current line (or the marked region) without deleting it.
444
.TP
445
.B uncut
446
447
Copies the currently stored text into the current buffer at the
current cursor position.
448
.TP
449
.B mark
450
Sets the mark at the current position, to start selecting text.
451
.TP
452
453
454
455
456
457
.B cutwordleft
Cuts from the cursor position to the beginning of the preceding word.
.TP
.B cutwordright
Cuts from the cursor position to the beginning of the next word.
.TP
458
.B cutrestoffile
459
Cuts all text from the cursor position till the end of the buffer.
460
.TP
461
.B curpos
462
Shows the current cursor position: the line, column, and character positions.
463
(The form 'cursorpos' is deprecated.)
464
.TP
465
.B wordcount
466
Counts the number of words, lines and characters in the current buffer.
467
.TP
468
.B speller
469
Invokes a spell-checking program (or a linting program, if the current
470
471
syntax highlighting defines one).
.TP
472
473
474
.B linter
A synonym of \fBspeller\fR (for when the speller has not been configured).
.TP
475
.B justify
476
Justifies the current paragraph.
477
.TP
478
.B fulljustify
479
Justifies the entire current buffer.
480
481
.TP
.B indent
482
Indents (shifts to the right) the currently marked text.
483
484
.TP
.B unindent
485
Unindents (shifts to the left) the currently marked text.
486
.TP
487
488
489
490
.B comment
Comments or uncomments the current line or marked lines, using the comment
style specified in the active syntax.
.TP
491
.B left
492
Goes left one position (in the editor or browser).
493
494
.TP
.B right
495
Goes right one position (in the editor or browser).
496
497
.TP
.B up
498
Goes one line up (in the editor or browser).
499
500
.TP
.B down
501
Goes one line down (in the editor or browser).
502
503
.TP
.B scrollup
504
Scrolls up one line of text from the current position.
505
506
.TP
.B scrolldown
507
Scrolls down one line of text from the current position.
508
.TP
509
.B prevword
510
Moves the cursor to the beginning of the previous word.
511
.TP
512
513
514
.B nextword
Moves the cursor to the beginning of the next word.
.TP
515
.B home
516
Moves the cursor to the beginning of the current line.
517
518
.TP
.B end
519
Moves the cursor to the end of the current line.
520
521
.TP
.B beginpara
522
Moves the cursor to the beginning of the current paragraph.
523
524
.TP
.B endpara
525
Moves the cursor to the end of the current paragraph.
526
.TP
527
528
529
530
531
532
533
.B prevblock
Moves the cursor to the beginning of the current or preceding block of text.
(Blocks are separated by one or more blank lines.)
.TP
.B nextblock
Moves the cursor to the beginning of the next block of text.
.TP
534
.B prevpage
535
Goes up one screenful.
536
537
.TP
.B nextpage
538
Goes down one screenful.
539
540
.TP
.B firstline
541
Goes to the first line of the file.
542
543
.TP
.B lastline
544
Goes to the last line of the file.
545
546
.TP
.B gotoline
547
548
Goes to a specific line (and column if specified).  Negative numbers count
from the end of the file (and end of the line).
549
.TP
550
.B gototext
551
Switches from targeting a line number to searching for text.
552
.TP
553
.B findbracket
554
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
555
(pairs) with the one under the cursor.
556
557
.TP
.B prevbuf
558
Switches to editing/viewing the previous buffer when multiple buffers are open.
559
560
.TP
.B nextbuf
561
Switches to editing/viewing the next buffer when multiple buffers are open.
562
563
.TP
.B verbatim
564
Inserts the next keystroke verbatim into the file.
565
566
.TP
.B tab
567
Inserts a tab at the current cursor location.
568
569
.TP
.B enter
570
Inserts a new line below the current one.
571
572
.TP
.B delete
573
Deletes the character under the cursor.
574
.TP
575
.B backspace
576
Deletes the character before the cursor.
577
.TP
578
.B undo
579
Undoes the last performed text action (add text, delete text, etc).
580
.TP
581
.B redo
582
Redoes the last undone action (i.e., it undoes an undo).
583
.TP
584
.B refresh
585
Refreshes the screen.
586
.TP
587
.B suspend
588
Suspends the editor (if the suspending function is enabled, see the
589
"suspendenable" entry below).
590
.TP
591
.B casesens
592
Toggles case sensitivity in searching (search/replace menus only).
593
594
.TP
.B regexp
595
Toggles whether searching/replacing is based on literal strings or regular expressions.
596
(The form 'regex' is deprecated.)
597
.TP
598
.B backwards
599
Toggles whether searching/replacing goes forward or backward.
600
.TP
601
.B prevhistory
602
Shows the previous history entry in the prompt menus (e.g. search).
603
604
.TP
.B nexthistory
605
Shows the next history entry in the prompt menus (e.g. search).
606
.TP
607
608
.B flipreplace
Toggles between searching for something and replacing something.
609
(The form 'dontreplace' is deprecated.)
610
.TP
611
612
613
.B flipexecute
Toggles between inserting a file and executing a command.
.TP
614
615
616
.B flipnewbuffer
Toggles between inserting into the current buffer and into a new
empty buffer.
617
(The form 'newbuffer' is deprecated.)
618
.TP
619
.B dosformat
620
When writing a file, switches to writing a DOS format (CR/LF).
621
622
.TP
.B macformat
623
When writing a file, switches to writing a Mac format.
624
625
.TP
.B append
626
When writing a file, appends to the end instead of overwriting.
627
628
.TP
.B prepend
629
When writing a file, 'prepends' (writes at the beginning) instead of overwriting.
630
631
.TP
.B backup
632
When writing a file, creates a backup of the current file.
633
.TP
634
635
636
637
638
.B discardbuffer
When about to write a file, discard the current buffer without saving.
(This function is bound by default only when option \fB\-\-tempfile\fR
is in effect.)
.TP
639
640
641
642
643
644
645
.B tofiles
Starts the file browser, allowing to select a file from a list.
.TP
.B gotodir
Goes to a directory to be specified, allowing to browse anywhere
in the filesystem.
.TP
646
.B firstfile
647
Goes to the first file when using the file browser (reading or writing files).
648
649
.TP
.B lastfile
650
Goes to the last file when using the file browser (reading or writing files).
651
652
.TP
.B nohelp
653
Toggles the presence of the two-line list of key bindings at the bottom of the screen.
654
655
.TP
.B constupdate
656
Toggles the constant display of the current line, column, and character positions.
657
658
.TP
.B morespace
659
Toggles the presence of the blank line which 'separates' the titlebar from the file text.
660
661
.TP
.B smoothscroll
662
Toggles smooth scrolling (when moving around with the arrow keys).
663
.TP
664
.B softwrap
665
Toggles the displaying of overlong lines on multiple screen lines.
666
.TP
667
.B whitespacedisplay
668
Toggles the showing of whitespace.
669
670
.TP
.B nosyntax
671
Toggles syntax highlighting.
672
673
.TP
.B smarthome
674
Toggles the smartness of the Home key.
675
676
.TP
.B autoindent
677
Toggles whether new lines will contain the same amount of whitespace as the preceding line.
678
679
.TP
.B cuttoend
680
Toggles whether cutting text will cut the whole line or just from the current cursor
681
position to the end of the line.
682
683
.TP
.B nowrap
684
Toggles whether long lines will be hard-wrapped to the next line.
685
686
.TP
.B tabstospaces
687
Toggles whether typed tabs will be converted to spaces.
688
689
.TP
.B backupfile
690
Toggles whether a backup will be made of the file being edited.
691
692
.TP
.B multibuffer
693
694
Toggles whether a file is inserted into the current buffer
or read into a new buffer.
695
696
.TP
.B mouse
697
Toggles mouse support.
698
699
.TP
.B noconvert
700
Toggles automatic conversion of files from DOS/Mac format.
701
.TP
702
.B suspendenable
703
Toggles whether the suspend sequence (normally ^Z) will suspend the editor window.
Benno Schulenberg's avatar
Oops.    
Benno Schulenberg committed
704
.RE
705

Benno Schulenberg's avatar
Oops.    
Benno Schulenberg committed
706
.TP
707
Valid \fImenu\fP sections are:
Benno Schulenberg's avatar
Oops.    
Benno Schulenberg committed
708
.RS 3
709
.TP 2
710
.B main
711
The main editor window where text is entered and edited.
712
713
.TP
.B search
714
The search menu (AKA whereis).
715
716
.TP
.B replace
717
The 'search to replace' menu.
718
719
.TP
.B replacewith
720
The 'replace with' menu, which comes up after 'search to replace'.
721
(The form 'replace2' is deprecated.)
722
723
.TP
.B gotoline
724
The 'goto line (and column)' menu.
725
726
.TP
.B writeout
727
The 'write file' menu.
728
729
.TP
.B insert
730
The 'insert file' menu.
731
732
.TP
.B extcmd
733
The menu for inserting output from an external command, reached from the insert menu.
734
735
.TP
.B help
736
The help-viewer menu.
737
738
.TP
.B spell
739
The interactive spell checker Yes/no menu.
740
.TP
741
742
743
.B linter
The linter menu.
.TP
744
.B browser
745
The file browser for inserting or writing a file.
746
747
.TP
.B whereisfile
748
The 'search for a file' menu in the file browser.
749
750
.TP
.B gotodir
751
The 'go to directory' menu in the file browser.
752
753
.TP
.B all
754
755
756
A special name that encompasses all menus.
For \fBbind\fR it means all menus where the specified \fIfunction\fR exists;
for \fBunbind\fR it means all menus where the specified \fIkey\fR exists.
757
.RE
758

759
760
.SH FILES
.TP
761
762
.B /etc/nanorc
System-wide configuration file.
763
.TP
764
.B ~/.nanorc
765
Per-user configuration file.
766

Jordi Mallach's avatar
Jordi Mallach committed
767
.SH SEE ALSO
768
769
.BR nano (1)

Jordi Mallach's avatar
Jordi Mallach committed
770
.SH AUTHOR
771
Chris Allegretta and others (see the files \fIAUTHORS\fP and
772
\fITHANKS\fP for details).  This manual page was originally written by
773
Jordi Mallach for the Debian system (but may be used by others).