nanorc.5 5.48 KB
Newer Older
Jordi Mallach's avatar
Jordi Mallach committed
1
.\" Hey, EMACS: -*- nroff -*-
Jordi Mallach's avatar
Jordi Mallach committed
2
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
Jordi Mallach's avatar
Jordi Mallach committed
3
4
.\"
.\" This is free documentation, see the latest version of the GNU General
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
5
.\" Public License for copying conditions.  There is NO warranty.
Jordi Mallach's avatar
Jordi Mallach committed
6
7
.\"
.\" $Id$
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
8
.TH NANORC 5 "August 24, 2003"
Jordi Mallach's avatar
Jordi Mallach committed
9
10
11
12
13
14
15
16
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
nanorc \- GNU nano's rcfile
.SH DESCRIPTION
This manual page documents GNU \fBnano\fP's rcfile.
.PP
\fBnano\fP is a small, free and friendly editor which aims to replace
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
17
Pico, the default editor included in the non-free Pine package.  Rather
Jordi Mallach's avatar
Jordi Mallach committed
18
19
20
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".
21
.PP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
22
The \fInanorc\fP file contains the default settings for \fBnano\fP.
23
During startup, \fBnano\fP will first read its system-wide settings from
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
24
.IR SYSCONFDIR/nanorc ,
25
and then user-specific settings from
26
.IR ~/.nanorc .
Jordi Mallach's avatar
Jordi Mallach committed
27
28
29
30

.SH OPTIONS
The configuration file accepts a series of "set" and "unset" commands,
which can be used to configure nano on startup without using the
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
31
32
33
command-line options.  Additionally, the "syntax" and "color" keywords
are used to define syntax highlighting rules for different text
patterns.  GNU nano will read one command per line.
Jordi Mallach's avatar
Jordi Mallach committed
34

David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
35
36
Options in rcfiles take precedence over nano's defaults, and command
line options override rcfile settings.
Jordi Mallach's avatar
Jordi Mallach committed
37

Jordi Mallach's avatar
Jordi Mallach committed
38
39
Options are unset by default, except for options that take an argument.

Jordi Mallach's avatar
Jordi Mallach committed
40
41
42
43
44
45
46
The supported commands and arguments are:

.TP 3
\fBset/unset autoindent\fP
Use auto-indentation.
.TP
\fBset/unset backup\fP
47
48
Create backup files in
.IR filename~ .
Jordi Mallach's avatar
Jordi Mallach committed
49
50
.TP
\fBset/unset const\fP
Jordi Mallach's avatar
Jordi Mallach committed
51
Constantly display the cursor position in the status bar.
Jordi Mallach's avatar
Jordi Mallach committed
52
53
54
55
.TP
\fBset/unset cut\fP
Use cut to end of line with ^K by default.
.TP
56
\fBset fill \fIn\fP\fP
Jordi Mallach's avatar
Jordi Mallach committed
57
58
Wrap lines at column number \fIn\fP.  If \fIn\fP is 0 or less, the line
length will be the screen width less \fIn\fP.  The default value is -8.
Jordi Mallach's avatar
Jordi Mallach committed
59
.TP
60
61
62
63
64
\fBset/unset historylog\fP
Enable
.I ~/.nano_history
for saving and reading search/replace strings.
.TP
Jordi Mallach's avatar
Jordi Mallach committed
65
\fBset/unset multibuffer\fP
66
Allow inserting files into their own buffers.
Jordi Mallach's avatar
Jordi Mallach committed
67
68
69
70
71
72
73
74
75
76
77
78
79
.TP
\fBset/unset noconvert\fP
Don't convert files from DOS/Mac format.
.TP
\fBset/unset nofollow\fP
Don't follow symlinks when writing files.
.TP
\fBset/unset nohelp\fP
Don't display the help lists at the bottom of the screen.
.TP
\fBset/unset nowrap\fP
Don't wrap text at all.
.TP
80
\fBset operatingdir "\fIdirectory\fP"\fP
Jordi Mallach's avatar
Jordi Mallach committed
81
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
82
83
84
subdirectories.  Also, the current directory is changed to here, so
files are inserted from this dir.  By default the operating directory
feature is turned off.
Jordi Mallach's avatar
Jordi Mallach committed
85
86
87
88
.TP
\fBset/unset preserve\fP
Preserve the XON and XOFF keys (^Q and ^S).
.TP
89
\fBset quotestr "\fIstring\fP"\fP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
90
91
92
The email-quote string, used to justify email-quoted paragraphs.  This
is an "extended regular expression" if your system supports them,
otherwise a literal string.  The default value is
Jordi Mallach's avatar
Jordi Mallach committed
93

94
	set quotestr "^([\ \\t]*[|>:}#])+"
Jordi Mallach's avatar
Jordi Mallach committed
95

David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
96
if you have regexps, otherwise set quotestr ">\ ".  Note that '\\t'
97
above stands for a literal Tab character.
Jordi Mallach's avatar
Jordi Mallach committed
98
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
99
100
101
102
103
\fBset/unset rebinddelete\fP
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
Jordi Mallach's avatar
Jordi Mallach committed
104
105
106
107
108
109
\fBset/unset regexp\fP
Do regular expression searches by default.
.TP
\fBset/unset smooth\fP
Use smooth scrolling by default.
.TP
110
\fBset speller \fIspellprog\fP\fP
Jordi Mallach's avatar
Jordi Mallach committed
111
112
Use spelling checker \fIspellprog\fP instead of the built-in one, which
calls \fIspell\fP.
Jordi Mallach's avatar
Jordi Mallach committed
113
114
115
116
.TP
\fBset/unset suspend\fP
Allow nano to be suspended with ^Z.
.TP
117
\fBset tabsize \fIn\fP\fP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
118
Use a tab size of \fIn\fP instead of the default (8); must be greater
119
than 0.
Jordi Mallach's avatar
Jordi Mallach committed
120
121
122
123
124
125
126
.TP
\fBset/unset tempfile\fP
Save automatically on exit, don't prompt.
.TP
\fBset/unset view\fP
Disallow file modification.
.TP
127
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
128
129
130
131
Defines a syntax named \fIstr\fP which can be activated via the \fB-Y\fP
flag, or will be automatically activated if the current filename matches
\fIfileregex\fP.  All following \fBcolor\fP statements will apply to
\fIsyntax\fP until a new syntax is defined.
132
133
.TP
.B color \fIfgcolor\fP[,\fIbgcolor\fP] "\fIregex\fP" ...
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
134
135
136
137
138
139
For the currently defined syntax, display all expressions matching
\fIregex\fP with foreground color \fIfgcolor\fP and optional background
color \fIbgcolor\fP.  Legal colors for foreground and background color
are: white, black, red, blue, green, yellow, magenta, and cyan.  You may
use the prefix "bright" to force a stronger color highlight.  If your
terminal supports transparency, not specifying a \fIbgcolor\fP tells
140
141
142
\fBnano\fP to attempt to use a transparent background.
.TP
.B color \fIfgcolor\fP[,\fIbgcolor\fP] start="\fIsr\fP" end="\fIer\fP"
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
143
144
145
146
147
Display expressions which start with \fIsr\fP and end with \fIer\fP
with foreground color \fIfgcolor\fP and optional background color
\fIbgcolor\fP.  This allows syntax highlighting to span multiple lines.
Note that all subsequent instances of \fIsr\fP after an initial \fIsr\fP
is found will be highlighted until the first instance of \fIer\fP.
148
\fI
Jordi Mallach's avatar
Jordi Mallach committed
149

150
151
.SH FILES
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
152
.I SYSCONFDIR/nanorc
153
154
System-wide configuration file
.TP
155
.I ~/.nanorc
156
Per-user configuration file
Jordi Mallach's avatar
Jordi Mallach committed
157
158
159
160
161
.SH SEE ALSO
.PD 0
.TP
\fBnano\fP(1)
.PP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
162
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your
163
system)
Jordi Mallach's avatar
Jordi Mallach committed
164
.SH AUTHOR
165
166
167
168
169
Chris Allegretta <chrisa@asty.org>, et al (see
.I AUTHORS
and
.I THANKS
for details).
Jordi Mallach's avatar
Jordi Mallach committed
170
This manual page was written by Jordi Mallach <jordi@gnu.org>.