.\" Hey, EMACS: -*- nroff -*- .\" nanorc.5 is Copyright (C) 2003, 2004, 2005, 2006 by the Free .\" Software Foundation, Inc. .\" .\" 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 .\" . .\" .\" * 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 .\" . .\" .\" $Id$ .TH NANORC 5 "version 2.0.0" "October 28, 2006" .\" Please adjust this date whenever revising the manpage. .\" .SH NAME nanorc \- GNU nano's rcfile .SH DESCRIPTION This manual page briefly documents GNU \fBnano\fP's rcfile. .PP \fBnano\fP is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather 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 and column number". .PP The \fInanorc\fP file contains the default settings for \fBnano\fP. It should not be in DOS or Mac format. During startup, \fBnano\fP will first read its system-wide settings from \fISYSCONFDIR/nanorc\fP, and then user-specific settings from \fI~/.nanorc\fP. .SH OPTIONS The configuration file accepts a series of \fBset\fP and \fBunset\fP commands, which can be used to configure nano on startup without using the command line options. Additionally, the \fBsyntax\fP, \fBcolor\fP, and \fBicolor\fP keywords are used to define syntax highlighting rules for different text patterns. \fBnano\fP will read one command per line. Options in nanorc files take precedence over nano's defaults, and command line options override nanorc settings. Also, options are unset by default, except for those that take arguments. Quotes inside string parameters don't have to be escaped with backslashes. The last double quote in the string will be treated as its end. For example, for the \fBbrackets\fP option, "\fI"')>]}\fP" will match \fI"\fP, \fI'\fP, \fI)\fP, \fI>\fP, \fI]\fP, and \fI}\fP. The supported commands and arguments are: .TP 3 .B set/unset autoindent Use auto-indentation. .TP .B set/unset backup Create backup files in \fIfilename~\fP. .TP .B set backupdir "\fIdirectory\fP" Set the directory where \fBnano\fP puts unique backup files if file backups are enabled. .TP .B set/unset backwards Do backwards searches by default. .TP .B set/unset boldtext Use bold text instead of reverse video text. .TP .B set brackets "\fIstring\fP" Set the characters treated as closing brackets when justifying paragraphs. They cannot contain blank characters. Only closing punctuation, optionally followed by closing brackets, can end sentences. The default value is "\fI"')>]}\fP". .TP .B set/unset casesensitive Do case sensitive searches by default. .TP .B set/unset const Constantly display the cursor position in the status bar. .TP .B set/unset cut Use cut to end of line by default. .TP .B set fill \fIn\fP 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. .TP .B set/unset historylog Enable \fI~/.nano_history\fP for saving and reading search/replace strings. .TP .B set matchbrackets "\fIstring\fP" Set the opening and closing brackets that can be found by bracket searches. They cannot contain blank characters. The former set must come before the latter set, and both must be in the same order. The default value is "\fI(<[{)>]}\fP". .TP .B set/unset morespace Use the blank line below the titlebar as extra editing space. .TP .B set/unset mouse 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 System, and on the console when gpm is running. .TP .B set/unset multibuffer Allow inserting files into their own buffers. .TP .B set/unset noconvert Don't convert files from DOS/Mac format. .TP .B set/unset nofollow Don't follow symlinks when writing files. .TP .B set/unset nohelp Don't display the help lists at the bottom of the screen. .TP .B set/unset nonewlines Don't add newlines to the ends of files. .TP .B set/unset nowrap Don't wrap text at all. .TP .B set operatingdir "\fIdirectory\fP" \fBnano\fP will only read and write files inside \fIdirectory\fP and its subdirectories. Also, the current directory is changed to here, so files are inserted from this diractory. By default, the operating directory feature is turned off. .TP .B set/unset preserve Preserve the XON and XOFF keys (^Q and ^S). .TP .B set punct "\fIstring\fP" Set the characters treated as closing punctuation when justifying paragraphs. They cannot contain blank characters. Only closing punctuation, optionally followed by closing brackets, can end sentences. The default value is "\fI!.?\fP". .TP .B set/unset quickblank Do quick statusbar blanking. Statusbar messages will disappear after 1 keystroke instead of 25. .TP .B set quotestr "\fIstring\fP" 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 "\fI^([\ \\t]*[#:>\\|}])+\fP" if you have extended regular expression support, or "\fI>\ \fP" otherwise. Note that '\\t' stands for a literal Tab character. .TP .B set/unset rebinddelete 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 .B set/unset rebindkeypad 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 .B set/unset regexp Do extended regular expression searches by default. .TP .B set/unset smarthome 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 .B set/unset smooth Use smooth scrolling by default. .TP .B set speller "\fIspellprog\fP" Use spelling checker \fIspellprog\fP instead of the built-in one, which calls \fIspell\fP. .TP .B set/unset suspend Allow \fBnano\fP to be suspended. .TP .B set tabsize \fIn\fP Use a tab size of \fIn\fP columns. The value of \fIn\fP must be greater than 0. The default value is 8. .TP .B set/unset tabstospaces Convert typed tabs to spaces. .TP .B set/unset tempfile Save automatically on exit, don't prompt. .TP .B set/unset view Disallow file modification. .TP .B set whitespace "\fIstring\fP" Set the two characters used to display the first characters of tabs and spaces. They must be single-column characters. .TP .B set/unset wordbounds Detect word boundaries more accurately by treating punctuation characters as parts of words. .TP .B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ] Defines a syntax named \fIstr\fP which can be activated via the -Y/--syntax command line option, or will be automatically activated if the current filename matches the extended regular expression \fIfileregex\fP. All following \fBcolor\fP and \fBicolor\fP statements will apply to \fIsyntax\fP until a new syntax is defined. 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. .TP .B color \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ... For the currently defined syntax, display all expressions matching the extended regular expression \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 .B icolor \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ... Same as above, except that the expression matching is case insensitive. .TP .B color \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP" Display expressions which start with the extended regular expression \fIsr\fP and end with the extended regular expression \fIer\fP 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. .TP .B icolor \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP" Same as above, except that the expression matching is case insensitive. .TP .B include "\fIsyntaxfile\fP" Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that \fIsyntaxfile\fP can only contain \fBsyntax\fP, \fBcolor\fP, and \fBicolor\fP commands. .SH FILES .TP .I SYSCONFDIR/nanorc System-wide configuration file .TP .I ~/.nanorc Per-user configuration file .SH SEE ALSO .PD 0 .TP \fBnano\fP(1) .PP \fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your system) .SH AUTHOR Chris Allegretta , et al (see \fIAUTHORS\fP and \fITHANKS\fP for details). This manual page was originally written by Jordi Mallach , for the Debian system (but may be used by others).