blob: 849f89e8be6033e36ac1cf2e6312c4680208d221 [file] [log] [blame]
Chris Allegretta4f989fa2003-02-13 04:01:49 +00001<HTML><HEAD><TITLE>Manpage of NANORC</TITLE>
2</HEAD><BODY>
3<H1>NANORC</H1>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +00004Section: File Formats (5)<BR>Updated: June 19, 2003<BR><A HREF="#index">Index</A>
Chris Allegretta4f989fa2003-02-13 04:01:49 +00005<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
6
7
8
9<A NAME="lbAB">&nbsp;</A>
10<H2>NAME</H2>
11
12nanorc - GNU nano's rcfile
13<A NAME="lbAC">&nbsp;</A>
Chris Allegretta4f989fa2003-02-13 04:01:49 +000014<H2>DESCRIPTION</H2>
15
16This manual page documents GNU <B>nano</B>'s rcfile.
17<P>
18
19<B>nano</B> is a small, free and friendly editor which aims to replace
20Pico, the default editor included in the non-free Pine package. Rather
21than just copying Pico's look and feel, <B>nano</B> also implements some
22missing (or disabled by default) features in Pico, such as &quot;search and
23replace&quot; and &quot;go to line number&quot;.
24<P>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000025
26The <I>nanorc</I> file contains the default settings for <B>nano</B>.
27During startup, <B>nano</B> will first read its system-wide settings from
28<I>$SYSCONFDIR/nanorc</I>,
29
30and then user-specific settings from
31<I>~/.nanorc</I>.
32
33<P>
34<A NAME="lbAD">&nbsp;</A>
Chris Allegretta4f989fa2003-02-13 04:01:49 +000035<H2>OPTIONS</H2>
36
37The configuration file accepts a series of &quot;set&quot; and &quot;unset&quot; commands,
38which can be used to configure nano on startup without using the
39command-line options. Additionally, the &quot;syntax&quot; and &quot;color&quot; keywords
40are used to define syntax highlighting rules for different text patterns.
41GNU nano will read one command per line.
42<P>
43Options in rcfiles take precedence over nano's defaults, and command line
44options override rcfile settings.
45<P>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000046Options are unset by default, except for options that take an argument.
47<P>
Chris Allegretta4f989fa2003-02-13 04:01:49 +000048The supported commands and arguments are:
49<P>
50<DL COMPACT>
51<DT><B>set/unset autoindent</B><DD>
52Use auto-indentation.
53<DT><B>set/unset backup</B><DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000054Create backup files in
55<I>filename~</I>.
56
Chris Allegretta4f989fa2003-02-13 04:01:49 +000057<DT><B>set/unset const</B><DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000058Constantly display the cursor position in the status bar.
Chris Allegretta4f989fa2003-02-13 04:01:49 +000059<DT><B>set/unset cut</B><DD>
60Use cut to end of line with ^K by default.
61<DT><B>set fill </B><I>n</I><DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000062Wrap lines at column number <I>n</I>. If <I>n</I> is 0 or less, the line
63length will be the screen width less <I>n</I>. The default value is -8.
64<DT><B>set/unset historylog</B><DD>
65Enable
66<I>~/.nano_history</I>
67
68for saving and reading search/replace strings.
Chris Allegretta4f989fa2003-02-13 04:01:49 +000069<DT><B>set/unset keypad</B><DD>
70Use alternate keypad routines.
71<DT><B>set/unset multibuffer</B><DD>
72Allow inserting files into their own buffers.
73<DT><B>set/unset noconvert</B><DD>
74Don't convert files from DOS/Mac format.
75<DT><B>set/unset nofollow</B><DD>
76Don't follow symlinks when writing files.
77<DT><B>set/unset nohelp</B><DD>
78Don't display the help lists at the bottom of the screen.
79<DT><B>set/unset nowrap</B><DD>
80Don't wrap text at all.
81<DT><B>set operatingdir &quot;</B><I>directory</I>&quot;<DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000082<B>nano</B> will only read and write files inside <I>directory</I> and its
83subdirectories. Also, the current directory is changed to here, so files
84are inserted from this dir. By default the operating directory feature is
85turned off.
Chris Allegretta4f989fa2003-02-13 04:01:49 +000086<DT><B>set/unset preserve</B><DD>
87Preserve the XON and XOFF keys (^Q and ^S).
88<DT><B>set quotestr &quot;</B><I>string</I>&quot;<DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +000089The email-quote string, used to justify email-quoted paragraphs. This is
90an &quot;extended regular expression&quot; if your system supports them, otherwise a
91literal string. The default value is
92<P>
93<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>set quotestr &quot;^([&nbsp;\t]*[|&gt;:}#])+&quot;<BR>
94<P>
95if you have regexps, otherwise set quotestr &quot;&gt;&nbsp;&quot;. Note that '\t'
96above stands for a literal Tab character.
Chris Allegretta4f989fa2003-02-13 04:01:49 +000097<DT><B>set/unset regexp</B><DD>
98Do regular expression searches by default.
99<DT><B>set/unset smooth</B><DD>
100Use smooth scrolling by default.
101<DT><B>set speller </B><I>spellprog</I><DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000102Use spelling checker <I>spellprog</I> instead of the built-in one, which
103calls <I>spell</I>.
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000104<DT><B>set/unset suspend</B><DD>
105Allow nano to be suspended with ^Z.
106<DT><B>set tabsize </B><I>n</I><DD>
107Use a tab size of <I>n</I> instead of the default (8); must be greater
108than 0.
109<DT><B>set/unset tempfile</B><DD>
110Save automatically on exit, don't prompt.
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000111<DT><B>set/unset view</B><DD>
112Disallow file modification.
113<DT><B>syntax </B><I>str</I> [<I>fileregex</I> ... ]
114
115<DD>
116Defines a syntax named <I>str</I> which can be activated via the
117<B>-Y</B> flag, or will be automatically activated if the current
118filename matches <I>fileregex</I>. All following <B>color</B> statements
119will apply to <I>syntax</I> until a new syntax is defined.
120<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] <I>regex</I> ...
121
122<DD>
123For the currently defined syntax, display all expressions matching
124<I>regex</I> with foreground color <I>fgcolor</I> and optional background
125color <I>bgcolor</I>. Legal colors for foreground and background color are:
126white, black, red, blue, green, yellow, magenta, and cyan. You may use
127the prefix &quot;bright&quot; to force a stronger color highlight. If your
128terminal supports transparency, not specifying a <I>bgcolor</I> tells
129<B>nano</B> to attempt to use a transparent background.
130<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] start=<I>sr</I> end=<I>er</I>
131
132<DD>
133Display expressions which start with <I>sr</I> and end with <I>er</I>
134with foreground color <I>fgcolor</I> and optional
135background color <I>bgcolor</I>. This allows syntax highlighting to span
136multiple lines. Note that all subsequent instances of <I>sr</I> after
137an initial <I>sr</I> is found will be highlighted until the first
138instance of <I>er</I>.
139<I>
140<P>
141</DL>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000142</I><A NAME="lbAE">&nbsp;</A>
143<H2>FILES</H2>
144
145<DL COMPACT>
146<DT><I>$SYSCONFDIR/nanorc</I>
147
148<DD>
149System-wide configuration file
150<DT><I>~/.nanorc</I>
151
152<DD>
153Per-user configuration file
154</DL>
155<A NAME="lbAF">&nbsp;</A>
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000156<H2>SEE ALSO</H2>
157
158
159<DL COMPACT>
160<DT><B><A HREF="http://localhost/cgi-bin/man/man2html?1+nano">nano</A></B>(1)<DD>
161</DL>
162<P>
163
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000164<I>/usr/share/doc/nano/examples/nanorc.sample</I> (or equivalent on your
165system)
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000166<A NAME="lbAG">&nbsp;</A>
167<H2>AUTHOR</H2>
168
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000169Chris Allegretta &lt;<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>&gt;, et al (see
170<I>AUTHORS</I>
171
172and
173<I>THANKS</I>
174
175for details).
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000176This manual page was written by Jordi Mallach &lt;<A HREF="mailto:jordi@gnu.org">jordi@gnu.org</A>&gt;.
177<P>
178
179<HR>
180<A NAME="index">&nbsp;</A><H2>Index</H2>
181<DL>
182<DT><A HREF="#lbAB">NAME</A><DD>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000183<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
184<DT><A HREF="#lbAD">OPTIONS</A><DD>
185<DT><A HREF="#lbAE">FILES</A><DD>
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000186<DT><A HREF="#lbAF">SEE ALSO</A><DD>
187<DT><A HREF="#lbAG">AUTHOR</A><DD>
188</DL>
189<HR>
190This document was created by
191<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
192using the manual pages.<BR>
David Lawrence Ramseyb764eb62003-06-29 02:25:46 +0000193Time: 22:28:00 GMT, June 19, 2003
Chris Allegretta4f989fa2003-02-13 04:01:49 +0000194</BODY>
195</HTML>