blob: d43e2e421779085b1c01b4d1abedd3e69e366f71 [file] [log] [blame]
Luca Stefani398f6092017-03-01 19:28:25 +01001## Sample initialization file for GNU nano.
2##
3## Please note that you must have configured nano with --enable-nanorc
4## for this file to be read! Also note that this file should not be in
5## DOS or Mac format, and that characters specially interpreted by the
6## shell should not be escaped here.
7##
8## To make sure a value is disabled, use "unset <option>".
9##
10## For the options that take parameters, the default value is given.
11## Other options are unset by default.
12##
13## Quotes inside string parameters don't have to be escaped with
14## backslashes. The last double quote in the string will be treated as
15## its end. For example, for the "brackets" option, ""')>]}" will match
16## ", ', ), >, ], and }.
17
18## Use auto-indentation.
19# set autoindent
20
21## Backup files to filename~.
22# set backup
23
24## The directory to put unique backup files in.
25# set backupdir ""
26
27## Do backwards searches by default.
28# set backwards
29
30## Use bold text instead of reverse video text.
31# set boldtext
32
33## The characters treated as closing brackets when justifying
34## paragraphs. They cannot contain blank characters. Only closing
35## punctuation, optionally followed by closing brackets, can end
36## sentences.
37##
38# set brackets ""')>]}"
39
40## Do case sensitive searches by default.
41# set casesensitive
42
43## Constantly display the cursor position in the statusbar. Note that
44## this overrides "quickblank".
45# set const
46
47## Use cut to end of line by default.
48# set cut
49
50## Set the line length for wrapping text and justifying paragraphs.
51## If fill is 0 or less, the line length will be the screen width less
52## this number.
53##
54# set fill -8
55
56## Enable ~/.nano_history for saving and reading search/replace strings.
57# set historylog
58
59## The opening and closing brackets that can be found by bracket
60## searches. They cannot contain blank characters. The former set must
61## come before the latter set, and both must be in the same order.
62##
63# set matchbrackets "(<[{)>]}"
64
65## Use the blank line below the titlebar as extra editing space.
66# set morespace
67
68## Enable mouse support, if available for your system. When enabled,
69## mouse clicks can be used to place the cursor, set the mark (with a
70## double click), and execute shortcuts. The mouse will work in the X
71## Window System, and on the console when gpm is running.
72##
73# set mouse
74
75## Allow multiple file buffers (inserting a file will put it into a
76## separate buffer). You must have configured with --enable-multibuffer
77## for this to work.
78##
79# set multibuffer
80
81## Don't convert files from DOS/Mac format.
82# set noconvert
83
84## Don't follow symlinks when writing files.
85# set nofollow
86
87## Don't display the helpful shortcut lists at the bottom of the screen.
88# set nohelp
89
90## Don't add newlines to the ends of files.
91# set nonewlines
92
93## Don't wrap text at all.
94# set nowrap
95
96## Set operating directory. nano will not read or write files outside
97## this directory and its subdirectories. Also, the current directory
98## is changed to here, so any files are inserted from this dir. A blank
99## string means the operating directory feature is turned off.
100##
101# set operatingdir ""
102
103## Preserve the XON and XOFF keys (^Q and ^S).
104# set preserve
105
106## The characters treated as closing punctuation when justifying
107## paragraphs. They cannot contain blank characters. Only closing
108## punctuation, optionally followed by closing brackets, can end
109## sentences.
110##
111# set punct "!.?"
112
113## Do quick statusbar blanking. Statusbar messages will disappear after
114## 1 keystroke instead of 26. Note that "const" overrides this.
115##
116# set quickblank
117
118## The email-quote string, used to justify email-quoted paragraphs.
119## This is an extended regular expression if your system supports them,
120## otherwise a literal string. Default:
121# set quotestr "^([ ]*[#:>\|}])+"
122## if you have extended regular expression support, otherwise:
123# set quotestr "> "
124
125## Fix Backspace/Delete confusion problem.
126# set rebinddelete
127
128## Fix numeric keypad key confusion problem.
129# set rebindkeypad
130
131## Do extended regular expression searches by default.
132# set regexp
133
134## Make the Home key smarter. When Home is pressed anywhere but at the
135## very beginning of non-whitespace characters on a line, the cursor
136## will jump to that beginning (either forwards or backwards). If the
137## cursor is already at that position, it will jump to the true
138## beginning of the line.
139# set smarthome
140
141## Use smooth scrolling as the default.
142# set smooth
143
144## Enable soft line wrapping (AKA full line display).
145# set softwrap
146
147## Use this spelling checker instead of the internal one. This option
148## does not properly have a default value.
149##
150# set speller "aspell -x -c"
151
152## Allow nano to be suspended.
153# set suspend
154
155## Use this tab size instead of the default; it must be greater than 0.
156# set tabsize 8
157
158## Convert typed tabs to spaces.
159# set tabstospaces
160
161## Save automatically on exit, don't prompt.
162# set tempfile
163
164## Enable the new (EXPERIMENTAL) generic undo code, not just for line
165## cuts.
166# set undo
167
168## Disallow file modification. Why would you want this in an rcfile? ;)
169# set view
170
171## The two single-column characters used to display the first characters
172## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
173## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
174# set whitespace " "
175
176## Detect word boundaries more accurately by treating punctuation
177## characters as parts of words.
178# set wordbounds
179
180
181## Color setup
182##
183## Format:
184##
185## syntax "short description" ["filename regex" ...]
186##
187## The "none" syntax is reserved; specifying it on the command line is
188## the same as not having a syntax at all. The "default" syntax is
189## special: it takes no filename regexes, and applies to files that
190## don't match any other syntax's filename regexes.
191##
192## color foreground,background "regex" ["regex"...]
193## or
194## icolor foreground,background "regex" ["regex"...]
195##
196## "color" will do case sensitive matches, while "icolor" will do case
197## insensitive matches.
198##
199## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
200## For foreground colors, you may use the prefix "bright" to get a
201## stronger highlight.
202##
203## To use multi-line regexes, use the start="regex" end="regex"
204## [start="regex" end="regex"...] format.
205##
206## If your system supports transparency, not specifying a background
207## color will use a transparent color. If you don't want this, be sure
208## to set the background color to black or white.
209##
210## If you wish, you may put your syntaxes in separate files. You can
211## make use of such files (which can only include "syntax", "color", and
212## "icolor" commands) as follows:
213##
214## include "/path/to/syntax_file.nanorc"
215##
216## Unless otherwise noted, the name of the syntax file (without the
217## ".nanorc" extension) should be the same as the "short description"
218## name inside that file. These names are kept fairly short to make
219## them easier to remember and faster to type using nano's -Y option.
220##
221## All regexes should be extended regular expressions.
222
223## Key bindings
224## Please see nanorc(5) for more details on this
225##
226## Here are some samples to get you going
227##
228# bind M-W nowrap main
229# bind M-A casesens search
230# bind ^S research main
231
232## Set this if your backspace key sends delete most of the time (2.1.3+)
233# bind kdel backspace all
234
235## include various source coloring files
236include "/system/etc/nano/*.nanorc"