1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
## Sample initialization file for GNU nano
## Please note that you must have configured nano with
## --enable-nanorc for this file to be read!
##
## To make sure a value is not enabled, use "unset <option>"
## Use auto-indentation
# set autoindent
## Backup files to filename~
# set backup
## Constantly update the cursor position
# set const
## Use cut to end of line with ^K by default
# set cut
## Use this value instead of the default
## An out-of-range negative value can make nano die complaining that the
## screen is too small
## set fill -8
## Use alternate keypad routines
# set keypad
## Allow multiple file buffers (using ^R inserts into separate buffer)
## You must have configured with --enable-multibuffer or --enable-extra
## for this to work
##
## set multibuffer
## Don't convert files from DOS/Mac format
# set noconvert
## Don't follow symlinks when writing files
# set nofollow
## Don't display the help lists at the bottom of the screen
# set nohelp
## Don't wrap text at all
# set nowrap
## Set operating directory (chroot of sorts)
# set operatingdir "~"
## Preserve the XON and XOFF keys (^Q and ^S)
# set preserve
## The email-quote string. This is a "regular expression" if your
## system supports them, otherwise a literal string. Default
# set quotestr "^([ \t]*[|>:}#])+" if you have regexps, otherwise
# set quotestr "> ".
## You can get old nano quoted-justify behavior via:
# set quotestr "(> )+"
## Do regular expression searches by default
# set regexp
## Use smooth scrolling as the default
# set smooth
## Use this spelling checker instead of the default one
# set speller aspell
## Allow nano to be suspended with ^Z
# set suspend
## Use this tab size instead of the default; it must be greater than 0
# set tabsize 4
## Save automatically on exit, don't prompt
# set tempfile
## Disallow file modification, why would you want this in an rc file? ;)
# set view
## Color setup
## Format:
## syntax "short description" ["filename regex" ...]
## color foreground,background "regex" ["regex"...]
##
## Legal colors are: white, black, red, blue, green, yellow, purple,
## cyan. You may use the prefix "bright" to mean a stronger color
## highlight.
##
## To use multi-line regexes use the start="regex" end="regex" format.
##
## If your system supports transparency, not specifying a background
## color will use a transparent color. If you don't want this, be sure
## to set the background color to black or white.
# syntax "c-file" ".*\.c$" ".*\.h$"
# color red "\<[A-Z_]{2,}\>"
# color green "\<float\>" "\<char\>" "\<int\>" "\<void\>"
# color green "\<static\>" "\<const\>" "\<struct\>"
# color brightyellow "\<if\>" "\<while\>" "\<do\>" "\<else\>" "\<case\>" "\<switch\>"
# color brightcyan "#define" "#include" "#ifn*def" "#endif"
# color brightcyan "#elif" "#else" "#if"
## You will in general want your comments and strings to come last,
## because syntax highlighting rules will be applied in the order they
## are read in. Note that quotes in regexes should not be escaped (use "
## instead of \").
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
## This string is VERY resource intensive!!!
# color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
## And we want to have some nice comment highlighting too
# color brightblue "//.*"
# color brightblue start="/\*" end="\*/"
## Here are some short examples for TeX files and HTML
# syntax "HTML" "\.html$"
#
# color blue start="<" end=">"
# color red "&([^; ])*;"
#
# syntax "TeX" "\.tex$"
#
# color green "\\(.|([A-Za-z]*))"
# color magenta "\{" "\}"
# color blue "%.*"
## For this you will probably want to set your editor to "nano -Y mutt"
# syntax "mutt"
# color green "^>.*"
## Here is are examples for groff and for your .nanorc
#syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
## The argument of .nr or .ds
#color cyan "^\.ds [^ ]*"
#color cyan "^\.nr [^ ]*"
## Single character escapes
#color brightmagenta "\\."
## Highlight the argument of \f or \s in the same colour
#color brightmagenta "\\f."
#color brightmagenta "\\f\(.."
#color brightmagenta "\\s(\+|\-)?[0-9]"
## \n
#color cyan "(\\|\\\\)n."
#color cyan "(\\|\\\\)n\(.."
#color cyan start="(\\|\\\\)n\[" end="]"
## Requests
#color brightgreen "^\. *[^ ]*"
## Comments
#color yellow "^\.\\\".*$"
## Strings
#color green "(\\|\\\\)\*."
#color green "(\\|\\\\)\*\(.."
#color green start="(\\|\\\\)\*\[" end="]"
## Characters
#color brightred "\\\(.."
#color brightred start="\\\[" end="]"
## Macro arguments
#color brightcyan "\\\\\$[1-9]"
#syntax "nanorc" "[\.]*nanorc$"
#color white "^ *(set|unset).*$"
#color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|view)"
#color brightwhite "^ *syntax [^ ]*"
#color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
#color white "^ *color\>.*"
#color yellow "^ *color [^ ]*"
#color magenta "^ *color\>"
#color green "^#.*$"