-
Notifications
You must be signed in to change notification settings - Fork 3
/
nanorc.txt
242 lines (202 loc) · 9.36 KB
/
nanorc.txt
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
## Sample initialization file for GNU nano
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that characters specially
## interpreted by the shell should not be escaped here.
##
## To make sure a value is not enabled, use "unset <option>"
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
## Use auto-indentation
# set autoindent
## Backup files to filename~
# set backup
## Constantly display the cursor position in the status bar.
# set const
## Use cut to end of line with ^K by default
# set cut
## Set the line length for wrapping text and justifying paragraphs.
## If fill is negative, the line length will be the screen width less
## this number.
##
# set fill -8
## Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog
## 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. nano will not read or write files outside
## this directory and its subdirectories. Also, the current directory
## is changed to here, so files are inserted from this dir. A blank
## string means the operating directory feature is turned off.
##
# set operatingdir ""
## Preserve the XON and XOFF keys (^Q and ^S)
# set preserve
## 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. Default:
# set quotestr "^([ ]*[\|>:}#])+"
## if you have regexps, otherwise:
# set quotestr "> "
## You can get old nano quoted-justify behavior via:
# set quotestr "(> )+"
## Do extended regular expression searches by default
# set regexp
## Use smooth scrolling as the default
set smooth
## Use this spelling checker instead of the internal one. This option
## does not properly have a default value.
##
# set speller "aspell -c"
## 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: white, black, red, blue, green, yellow, magenta, 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|static|const|struct)\>"
color brightyellow "\<(if|while|do|else|case|switch)\>"
color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
## Here is a short example for HTML
#syntax "HTML" "\.html$"
#color blue start="<" end=">"
#color red "&[^; ]*;"
## Here is a short example for TeX files
# syntax "TeX" "\.tex$"
# color green "\\.|\\[A-Za-z]*"
# color magenta "[{}]"
# color blue "%.*"
## Here is an example for quoted emails (under e.g. mutt)
# syntax "mutt"
# color green "^>.*"
## Here is an example for groff
##
# 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 color
# 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]"
## Here is an example for perl
##
# syntax "perl" "\.p[lm]$"
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
# color cyan start="[$@%]" end="( |\\W|-)"
# color yellow "".*"|qq\|.*\|"
# color white "[sm]/.*/"
# color white start="(^use| = new)" end=";"
# color green "#.*"
# color yellow start="<< 'STOP'" end="STOP"
## Here is an example for Java source
##
# syntax "Java source" "\.java$"
# color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
# color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
# color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
# color red ""[^\"]*""
# color yellow "\<(true|false|null)\>"
# color blue "//.*"
# color blue start="/\*" end="\*/"
# color brightblue start="/\*\*" end="\*/"
# color brightgreen,brightgreen "[ ]+$"
## Here is an example for your .nanorc
##
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|historylog|view)"
color brightwhite "^ *syntax [^ ]*"
color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
color white "^ *color\>.*"
color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
color magenta "^ *color\>"
color green "^#.*$"
## PHP syntax highlighting
##
syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$"
#special
color brightwhite "([^A-Za-z0-9])|(<\?php|\?>|var|and|or|default|class|extends|true|false|global|function|new|switch|case|break|next|prev|elseif|if|else|foreach|for|as|do|while|exit|decalre|require_once|require|include_once|include|return)([^A-Za-z0-9])"
#types
color brightblue "([^A-Za-z0-9])|(null|int|string|array|float|bool|object|resource)[^A-Za-z0-9]"
#functions (Ack! - Too many!)
color brightmagenta "([^A-Za-z0-9])|(setcookie|base64_encode|base64_decode|serialize|unserialize|sprintf|rmdir|move_uploaded_file|readdir|chdir|closedir|getcwd|shuffle|strpos|array_reverse|rsort|arsort|array_search|array_merge|array_slice|strnatcasecmp|strtolower|strtoupper|round|ceil|floor|filetype|fileowner|filegroup|fileperms|filesize|fileatime|filemtime|array_push|array_pop|is_dir|realpath|sort|usort|substr_count|file_get_contents|in_array|chr|opendir|substr|mktime|getdata|date|fopen|fwrite|fread|fclose|sizeof|nl2br|str_replace|strstr|preg_match_all|preg_replace|preg_match|preg_split|basename|file_exists|copy|isset|strtotime|time|unlink|session_start|trim|rtrim|md5|echo|print|printf|explode|implode|array|split|join|stripslashes|addslashes|die|function|mysql_error|mysql_connect|mysql_fetch_row|mysql_fetch_array|sybase_connect|sybase_query|sybase_fetch_row|sybase_fetch_array|mysql_select_db|mysql_close|mysql_query)([^A-Za-z0-9])*"
#Etc global command ;) (added by ObsidianX)
#color brightblue "([^A-Za-z0-9])|(global|if|else)([^A-Za-z0-9])*"
color brightblue "([^A-Za-z0-9])|(global)([^A-Za-z0-9])*"
#Variables
color brightcyan "\$[A-Za-z0-9_\>-]*"
#strings
color brightyellow ""(\\.|[^\"])*""
color brightyellow "'(\\.|[^\'])*'"
#color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
#color brightblue start="\".*" end=".*\""
#comments
color brightred "#.*"
color brightred start="/\*" end="\*/"
syntax "HTML" "\.html$" "\.tpl$"
color brightblue start="<" end=">"
color red "&[^; ]*;"
color brightgreen start="<script" end="\/script>"
#strings
color brightyellow ""(\\.|[^\"])*""
color brightyellow "'(\\.|[^\'])*'"
#comments
color brightred start="<!--" end="-->"
color brightred start="\{\*" end="\*\}"
#literals
color brightcyan "\{\/?literal\}"