NANORC

Section: File Formats (5)
Updated: February 9, 2003
Index Return to Main Contents
 

NAME

nanorc - GNU nano's rcfile  

SYNOPSIS

/etc/nanorc $HOME/.nanorc
 

DESCRIPTION

This manual page documents GNU nano's rcfile.

nano 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, nano also implements some missing (or disabled by default) features in Pico, such as "search and replace" and "go to line number".

 

OPTIONS

The configuration file accepts a series of "set" and "unset" commands, which can be used to configure nano on startup without using the 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.

Options in rcfiles take precedence over nano's defaults, and command line options override rcfile settings.

The supported commands and arguments are:

set/unset autoindent
Use auto-indentation.
set/unset backup
Create backup files in filename~.
set/unset const
Constantly update the cursor position.
set/unset cut
Use cut to end of line with ^K by default.
set fill n
Set the column where lines will be wrapped at to n.
set/unset keypad
Use alternate keypad routines.
set/unset multibuffer
Allow inserting files into their own buffers.
set/unset noconvert
Don't convert files from DOS/Mac format.
set/unset nofollow
Don't follow symlinks when writing files.
set/unset nohelp
Don't display the help lists at the bottom of the screen.
set/unset nowrap
Don't wrap text at all.
set operatingdir "directory"
Set operating directory (chroots the user to directory and below).
set/unset preserve
Preserve the XON and XOFF keys (^Q and ^S).
set quotestr "string"
The email-quote string. This is a "regular expression" if your system supports them, otherwise a literal string. Default value is set quotestr "^([ ]*[|>:}#])+" if you have regexps, otherwise set quotestr "> ".
set/unset regexp
Do regular expression searches by default.
set/unset smooth
Use smooth scrolling by default.
set speller spellprog
Use spelling checker spellprog instead of the default (spell).
set/unset suspend
Allow nano to be suspended with ^Z.
set tabsize n
Use a tab size of n instead of the default (8); must be greater than 0.
set/unset tempfile
Save automatically on exit, don't prompt.
set/unset historylog
Enable ~/.nano_history for saving and reading search/replace strings.
set/unset view
Disallow file modification.
syntax str [fileregex ... ]
Defines a syntax named str which can be activated via the -Y flag, or will be automatically activated if the current filename matches fileregex. All following color statements will apply to syntax until a new syntax is defined.
color fgcolor[,bgcolor] regex ...
For the currently defined syntax, display all expressions matching regex with foreground color fgcolor and optional background color bgcolor. 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 bgcolor tells nano to attempt to use a transparent background.
color fgcolor[,bgcolor] start=sr end=er
Display expressions which start with sr and end with er with foreground color fgcolor and optional background color bgcolor. This allows syntax highlighting to span multiple lines. Note that all subsequent instances of sr after an initial sr is found will be highlighted until the first instance of er.

 

SEE ALSO

nano(1)

/usr/share/doc/nano/examples/nanorc.sample (or equivalent on your system)  

AUTHOR

Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for details). This manual page was written by Jordi Mallach <jordi@gnu.org>.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 04:08:33 GMT, February 13, 2003