nanorc.5 7.61 KB
Newer Older
Jordi Mallach's avatar
Jordi Mallach committed
1
.\" Hey, EMACS: -*- nroff -*-
2
3
.\" nanorc.5 is Copyright (C) 2003, 2004, 2005 Free Software
.\" Foundation, Inc.
Jordi Mallach's avatar
Jordi Mallach committed
4
5
.\"
.\" This is free documentation, see the latest version of the GNU General
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
6
.\" Public License for copying conditions.  There is NO warranty.
Jordi Mallach's avatar
Jordi Mallach committed
7
8
.\"
.\" $Id$
9
.TH NANORC 5 "version 1.3.8" "August 01, 2005"
Jordi Mallach's avatar
Jordi Mallach committed
10
11
12
13
14
15
16
17
.\" 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
18
Pico, the default editor included in the non-free Pine package.  Rather
Jordi Mallach's avatar
Jordi Mallach committed
19
20
21
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".
22
.PP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
23
The \fInanorc\fP file contains the default settings for \fBnano\fP.
24
During startup, \fBnano\fP will first read its system-wide settings from
25
26
\fISYSCONFDIR/nanorc\fP, and then user-specific settings from
\fI~/.nanorc\fP.
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
31
32
command-line options.  Additionally, the "syntax", "color", and "icolor"
keywords are used to define syntax highlighting rules for different text
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
33
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
The supported commands and arguments are:

.TP 3
43
.B set/unset autoindent
Jordi Mallach's avatar
Jordi Mallach committed
44
45
Use auto-indentation.
.TP
46
.B set/unset backup
47
Create backup files in \fIfilename~\fP.
Jordi Mallach's avatar
Jordi Mallach committed
48
.TP
49
.B set backupdir "\fIdirectory\fP"
50
51
Set the directory where \fBnano\fP puts unique backup files if file
backups are enabled.
52
.TP
53
.B set/unset backwards
54
55
Do backwards searches by default.
.TP
56
.B set brackets "\fIstring\fP"
57
Set the characters treated as closing brackets.  They cannot contain
58
blank characters.  Only closing punctuation, optionally followed by
59
closing brackets, can end sentences.
60
.TP
61
.B set/unset casesensitive
62
63
Do case sensitive searches by default.
.TP
64
.B set/unset const
Jordi Mallach's avatar
Jordi Mallach committed
65
Constantly display the cursor position in the status bar.
Jordi Mallach's avatar
Jordi Mallach committed
66
.TP
67
.B set/unset cut
68
Use cut to end of line by default.
Jordi Mallach's avatar
Jordi Mallach committed
69
.TP
70
.B set fill \fIn\fP
71
72
73
Wrap lines at column number \fIn\fP.  If \fIn\fP is 0 or less, the
maximum line length will be the screen width less \fIn\fP columns.  The
default value is -8.
Jordi Mallach's avatar
Jordi Mallach committed
74
.TP
75
.B set/unset historylog
76
77
Enable \fI~/.nano_history\fP for saving and reading search/replace
strings.
78
.TP
79
.B set/unset morespace
80
81
Allow use of the blank line below the titlebar as extra editing space.
.TP
82
.B set/unset mouse
83
84
85
Enable mouse support, so that mouse clicks can be used to set the mark
and run shortcuts.
.TP
86
.B set/unset multibuffer
87
Allow inserting files into their own buffers.
Jordi Mallach's avatar
Jordi Mallach committed
88
.TP
89
.B set/unset noconvert
Jordi Mallach's avatar
Jordi Mallach committed
90
91
Don't convert files from DOS/Mac format.
.TP
92
.B set/unset nofollow
Jordi Mallach's avatar
Jordi Mallach committed
93
94
Don't follow symlinks when writing files.
.TP
95
.B set/unset nohelp
Jordi Mallach's avatar
Jordi Mallach committed
96
97
Don't display the help lists at the bottom of the screen.
.TP
98
.B set/unset nowrap
Jordi Mallach's avatar
Jordi Mallach committed
99
100
Don't wrap text at all.
.TP
101
.B set operatingdir "\fIdirectory\fP"
Jordi Mallach's avatar
Jordi Mallach committed
102
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
103
104
105
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
106
.TP
107
.B set/unset preserve
Jordi Mallach's avatar
Jordi Mallach committed
108
109
Preserve the XON and XOFF keys (^Q and ^S).
.TP
110
.B set punct "\fIstring\fP"
111
Set the characters treated as closing punctuation.  They cannot contain
112
blank characters.  Only closing punctuation, optionally followed by
113
114
closing brackets, can end sentences.
.TP
115
116
117
118
.B set quickblank
Do quick statusbar blanking.  Statusbar messages will disappear after 1
keystroke instead of 25.
.TP
119
.B set quotestr "\fIstring\fP"
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
120
121
122
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
123

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

David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
126
if you have regexps, otherwise set quotestr ">\ ".  Note that '\\t'
127
above stands for a literal Tab character.
Jordi Mallach's avatar
Jordi Mallach committed
128
.TP
129
.B set/unset rebinddelete
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
130
131
132
133
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
134
.B set/unset regexp
135
136
Do regular expression searches by default.
.TP
137
.B set/unset smarthome
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
138
139
140
141
142
143
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
144
.B set/unset smooth
Jordi Mallach's avatar
Jordi Mallach committed
145
146
Use smooth scrolling by default.
.TP
147
.B set speller \fIspellprog\fP
Jordi Mallach's avatar
Jordi Mallach committed
148
149
Use spelling checker \fIspellprog\fP instead of the built-in one, which
calls \fIspell\fP.
Jordi Mallach's avatar
Jordi Mallach committed
150
.TP
151
.B set/unset suspend
152
Allow nano to be suspended.
Jordi Mallach's avatar
Jordi Mallach committed
153
.TP
154
.B set tabsize \fIn\fP
155
156
Use a tab size of \fIn\fP columns.  The value of \fIn\fP must be greater
than 0.  The default value is 8.  
Jordi Mallach's avatar
Jordi Mallach committed
157
.TP
158
.B set/unset tabstospaces
159
160
Convert typed tabs to spaces.
.TP
161
.B set/unset tempfile
Jordi Mallach's avatar
Jordi Mallach committed
162
163
Save automatically on exit, don't prompt.
.TP
164
.B set/unset view
Jordi Mallach's avatar
Jordi Mallach committed
165
166
Disallow file modification.
.TP
167
.B set whitespace "\fIstring\fP"
168
Set the two characters used to display the first characters of tabs and
169
spaces.  They must be single-column characters.
170
.TP
171
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
172
173
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
174
175
\fIfileregex\fP.  All following \fBcolor\fP and \fBicolor\fP statements
will apply to \fIsyntax\fP until a new syntax is defined.
176
177
178
179
180

The \fInone\fP syntax is reserved; specifying it on the command line is
the same as not having a syntax at all.  The \fIdefault\fP syntax is
special: it takes no \fIfileregex\fP, and applies to files that don't
match any other syntax's \fIfileregex\fP.
181
.TP
182
.B color \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
183
For the currently defined syntax, display all expressions matching
184
185
186
187
188
189
190
191
\fIregex\fP with foreground color \fIfgcolor\fP and background color
\fIbgcolor\fP, at least one of which must be specified.  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 for the foreground.  If your terminal supports
transparency, not specifying a \fIbgcolor\fP tells \fBnano\fP to attempt
to use a transparent background.
.TP
192
193
194
.B icolor \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
Same as above, except that the expression matching is case insensitive.
.TP
195
.B color \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
196
Display expressions which start with \fIsr\fP and end with \fIer\fP
197
198
199
200
201
with foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
at least one of which must be specified.  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.
202
203
204
.TP
.B icolor \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
Same as above, except that the expression matching is case insensitive.
Jordi Mallach's avatar
Jordi Mallach committed
205

206
207
.SH FILES
.TP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
208
.I SYSCONFDIR/nanorc
209
210
System-wide configuration file
.TP
211
.I ~/.nanorc
212
Per-user configuration file
Jordi Mallach's avatar
Jordi Mallach committed
213
214
215
216
217
.SH SEE ALSO
.PD 0
.TP
\fBnano\fP(1)
.PP
David Lawrence Ramsey's avatar
David Lawrence Ramsey committed
218
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your
219
system)
Jordi Mallach's avatar
Jordi Mallach committed
220
.SH AUTHOR
221
222
223
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
\fITHANKS\fP for details).  This manual page was written by Jordi
Mallach <jordi@gnu.org>.