Contents of /trunk/nano/nanorc
Parent Directory | Revision Log
Revision 69 -
(show annotations)
(download)
Mon May 1 19:01:51 2006 UTC (18 years, 6 months ago) by niro
File size: 12679 byte(s)
Mon May 1 19:01:51 2006 UTC (18 years, 6 months ago) by niro
File size: 12679 byte(s)
do not backup files per default
1 | ## Sample initialization file for GNU nano |
2 | # $Header: /root/magellan-cvs/src/nano/nanorc,v 1.3 2006-05-01 19:01:51 niro Exp $ |
3 | |
4 | ## Please note that you must have configured nano with --enable-nanorc |
5 | ## for this file to be read! Also note that characters specially |
6 | ## interpreted by the shell should not be escaped here. |
7 | ## |
8 | ## To make sure a value is not enabled, 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 | ## Use auto-indentation. |
14 | # set autoindent |
15 | |
16 | ## Backup files to filename~. |
17 | # set backup |
18 | |
19 | ## The directory to put unique backup files in. |
20 | # set backupdir "" |
21 | |
22 | ## Do backwards searches by default. |
23 | # set backwards |
24 | |
25 | ## The characters treated as closing brackets. They cannot contain |
26 | ## blank characters. Only closing punctuation, optionally followed by |
27 | ## closing brackets, can end sentences. |
28 | ## |
29 | # set brackets "'")}]>" |
30 | |
31 | ## Do case sensitive searches by default. |
32 | # set casesensitive |
33 | |
34 | ## Constantly display the cursor position in the statusbar. Note that |
35 | ## this cancels out "quickblank". |
36 | # set const |
37 | |
38 | ## Use cut to end of line by default. |
39 | # set cut |
40 | |
41 | ## Set the line length for wrapping text and justifying paragraphs. |
42 | ## If fill is 0 or less, the line length will be the screen width less |
43 | ## this number. |
44 | ## |
45 | # set fill -8 |
46 | |
47 | ## Enable ~/.nano_history for saving and reading search/replace strings. |
48 | # set historylog |
49 | |
50 | ## Use the blank line below the titlebar as extra editing space. |
51 | # set morespace |
52 | |
53 | ## Enable mouse support, so that mouse clicks can be used to set the |
54 | ## mark and run shortcuts. |
55 | # set mouse |
56 | |
57 | ## Allow multiple file buffers (inserting a file will put it into a |
58 | ## separate buffer). You must have configured with --enable-multibuffer |
59 | ## for this to work. |
60 | ## |
61 | # set multibuffer |
62 | |
63 | ## Don't convert files from DOS/Mac format. |
64 | # set noconvert |
65 | |
66 | ## Don't follow symlinks when writing files. |
67 | # set nofollow |
68 | |
69 | ## Don't display the helpful shortcut lists at the bottom of the screen. |
70 | # set nohelp |
71 | |
72 | ## Don't wrap text at all. |
73 | # set nowrap |
74 | |
75 | ## Set operating directory. nano will not read or write files outside |
76 | ## this directory and its subdirectories. Also, the current directory |
77 | ## is changed to here, so files are inserted from this dir. A blank |
78 | ## string means the operating directory feature is turned off. |
79 | ## |
80 | # set operatingdir "" |
81 | |
82 | ## Preserve the XON and XOFF keys (^Q and ^S). |
83 | # set preserve |
84 | |
85 | ## The characters treated as closing punctuation. They cannot contain |
86 | ## blank characters. Only closing punctuation, optionally followed by |
87 | ## closing brackets, can end sentences. |
88 | ## |
89 | # set punct ".?!" |
90 | |
91 | ## Do quick statusbar blanking. Statusbar messages will disappear after |
92 | ## 1 keystroke instead of 25. Note that "const" cancels this out. |
93 | ## |
94 | # set quickblank |
95 | |
96 | ## The email-quote string, used to justify email-quoted paragraphs. |
97 | ## This is an extended regular expression if your system supports them, |
98 | ## otherwise a literal string. Default: |
99 | # set quotestr "^([ ]*[\|>:}#])+" |
100 | ## if you have regexps, otherwise: |
101 | # set quotestr "> " |
102 | ## You can get old nano quoted-justify behavior via: |
103 | # set quotestr "(> )+" |
104 | |
105 | ## Fix Backspace/Delete confusion problem. |
106 | # set rebinddelete |
107 | |
108 | ## Do extended regular expression searches by default. |
109 | # set regexp |
110 | |
111 | ## Make the Home key smarter. When Home is pressed anywhere but at the |
112 | ## very beginning of non-whitespace characters on a line, the cursor |
113 | ## will jump to that beginning (either forwards or backwards). If the |
114 | ## cursor is already at that position, it will jump to the true |
115 | ## beginning of the line. |
116 | # set smarthome |
117 | |
118 | ## Use smooth scrolling as the default. |
119 | set smooth |
120 | |
121 | ## Use this spelling checker instead of the internal one. This option |
122 | ## does not properly have a default value. |
123 | ## |
124 | # set speller "aspell -x -c" |
125 | |
126 | ## Allow nano to be suspended. |
127 | # set suspend |
128 | |
129 | ## Use this tab size instead of the default; it must be greater than 0. |
130 | # set tabsize 8 |
131 | |
132 | ## Convert typed tabs to spaces. |
133 | # set tabstospaces |
134 | |
135 | ## Save automatically on exit, don't prompt. |
136 | # set tempfile |
137 | |
138 | ## Disallow file modification; why would you want this in an rcfile? ;) |
139 | # set view |
140 | |
141 | ## The two single-column characters used to display the first characters |
142 | ## of tabs and spaces. 187 decimal (00BB hexadecimal) and 183 decimal |
143 | ## (00B7 hexadecimal) seem to be good values for these. |
144 | # set whitespace " " |
145 | |
146 | ## Color setup |
147 | ## |
148 | ## Format: |
149 | ## |
150 | ## syntax "short description" ["filename regex" ...] |
151 | ## |
152 | ## color foreground,background "regex" ["regex"...] |
153 | ## or |
154 | ## icolor foreground,background "regex" ["regex"...] |
155 | ## |
156 | ## "color" will do case sensitive matches, while "icolor" will do case |
157 | ## insensitive matches. |
158 | ## |
159 | ## Legal colors: white, black, red, blue, green, yellow, magenta, cyan. |
160 | ## You may use the prefix "bright" to mean a stronger color highlight |
161 | ## for the foreground. |
162 | ## |
163 | ## To use multi-line regexes, use the start="regex" end="regex" format. |
164 | ## |
165 | ## If your system supports transparency, not specifying a background |
166 | ## color will use a transparent color. If you don't want this, be sure |
167 | ## to set the background color to black or white. |
168 | ## |
169 | #syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$" |
170 | # color red "\<[A-Z_]{2,}\>" |
171 | # color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>" |
172 | # color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" |
173 | # color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>" |
174 | # color brightyellow "\<(try|throw|catch|operator|new|delete)\>" |
175 | # color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" |
176 | # color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'" |
177 | ## |
178 | ## GCC builtins |
179 | ## |
180 | # color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(asm|builtin|inline|restrict|typeof)__" |
181 | ## |
182 | ## You will in general want your comments and strings to come last, |
183 | ## because syntax highlighting rules will be applied in the order they |
184 | ## are read in. |
185 | ## |
186 | # color brightyellow "<[^= ]*>" ""(\\.|[^\"])*"" |
187 | ## |
188 | ## This string is VERY resource intensive!!! |
189 | # color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*"" |
190 | ## |
191 | ## And we want to have some nice comment highlighting too |
192 | # color brightblue "//.*" |
193 | # color brightblue start="/\*" end="\*/" |
194 | |
195 | ## Here is a short example for HTML |
196 | #syntax "HTML" "\.html$" |
197 | # color blue start="<" end=">" |
198 | # color red "&[^;[[:space:]]]*;" |
199 | |
200 | ## Here is a short example for TeX files |
201 | # syntax "TeX" "\.tex$" |
202 | # color green "\\.|\\[A-Za-z]*" |
203 | # color magenta "[{}]" |
204 | # color blue "%.*" |
205 | |
206 | ## Here is an example for quoted emails (under e.g. mutt) |
207 | # syntax "mutt" |
208 | # color green "^>.*" |
209 | |
210 | ## Here is an example for groff |
211 | ## |
212 | # syntax "groff" "\.m[ems]$" "\.tmac$" "^tmac." ".rof" |
213 | ## The argument of .nr or .ds |
214 | # color cyan "^\.ds [^[[:space:]]]*" |
215 | # color cyan "^\.nr [^[[:space:]]]*" |
216 | ## Single character escapes |
217 | # color brightmagenta "\\." |
218 | ## Highlight the argument of \f or \s in the same color |
219 | # color brightmagenta "\\f." |
220 | # color brightmagenta "\\f\(.." |
221 | # color brightmagenta "\\s(\+|\-)?[0-9]" |
222 | ## \n |
223 | # color cyan "(\\|\\\\)n." |
224 | # color cyan "(\\|\\\\)n\(.." |
225 | # color cyan start="(\\|\\\\)n\[" end="]" |
226 | ## Requests |
227 | # color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" |
228 | ## Comments |
229 | # color yellow "^\.\\\".*$" |
230 | ## Strings |
231 | # color green "(\\|\\\\)\*." |
232 | # color green "(\\|\\\\)\*\(.." |
233 | # color green start="(\\|\\\\)\*\[" end="]" |
234 | ## Characters |
235 | # color brightred "\\\(.." |
236 | # color brightred start="\\\[" end="]" |
237 | ## Macro arguments |
238 | # color brightcyan "\\\\\$[1-9]" |
239 | |
240 | ## Here is an example for perl |
241 | ## |
242 | # syntax "perl" "\.p[lm]$" |
243 | # 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(dir)?)\>" "\<(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)\>" |
244 | # 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)\>" |
245 | # color cyan start="[$@%]" end="( |\\W|-)" |
246 | # color yellow "".*"|qq\|.*\|" |
247 | # color white "[sm]/.*/" |
248 | # color white start="(^use| = new)" end=";" |
249 | # color green "#.*" |
250 | # color yellow start="<< 'STOP'" end="STOP" |
251 | |
252 | ## Here is an example for Java source |
253 | ## |
254 | # syntax "Java source" "\.java$" |
255 | # color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" |
256 | # color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" |
257 | # color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" |
258 | # color red ""[^\"]*"" |
259 | # color yellow "\<(true|false|null)\>" |
260 | # color blue "//.*" |
261 | # color blue start="/\*" end="\*/" |
262 | # color brightblue start="/\*\*" end="\*/" |
263 | # color brightgreen,green "[[:space:]]+$" |
264 | |
265 | ## Here is an example for patch files |
266 | ## |
267 | syntax "patch" "\.(patch|diff)$" |
268 | color brightgreen "^\+.*" |
269 | color green "^\+\+\+.*" |
270 | color brightblue "^ .*" |
271 | color brightred "^-.*" |
272 | color red "^---.*" |
273 | color brightyellow "^@@.*" |
274 | color magenta "^diff.*" |
275 | |
276 | ## Here is an example for manpages |
277 | ## |
278 | # syntax "manpage" "\.[1-9]x?$" |
279 | # color green "\.(S|T)H.*$" |
280 | # color brightgreen "\.(S|T)H" "\.TP" |
281 | # color brightred "\.(BR?|I[PR]?).*$" |
282 | # color brightblue "\.(BR?|I[PR]?|PP)" |
283 | # color brightwhite "\\f[BIPR]" |
284 | # color yellow "\.(br|DS|RS|RE|PD)" |
285 | |
286 | ## Here is an example for assembler |
287 | ## |
288 | # syntax "asm-file" "\.(S|s|asm)$" |
289 | # color red "\<[A-Z_]{2,}\>" |
290 | # color brightgreen "\.(data|subsection|text)" |
291 | # color green "\.(align|file|globl|global|hidden|section|size|type|weak)" |
292 | # color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)" |
293 | # icolor brightred "^[[:space:]]*[._A-Z0-9]*:" |
294 | # color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" |
295 | ## Highlight strings (note: VERY resource intensive) |
296 | # color brightyellow "<[^= ]*>" ""(\\.|[^\"])*"" |
297 | # color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*"" |
298 | ## Highlight comments |
299 | # color brightblue "//.*" |
300 | # color brightblue start="/\*" end="\*/" |
301 | |
302 | ## Here is an example for your .nanorc |
303 | ## |
304 | # syntax "nanorc" "(\.|/|)nanorc$" |
305 | ## highlight possible errors and parameters |
306 | # icolor brightwhite "^[[:space:]]*(set|unset|syntax|i?color).*$" |
307 | ## set, unset and syntax |
308 | # icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>" |
309 | # icolor green "^[[:space:]]*(set|unset|syntax)\>" |
310 | ## colors |
311 | # icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" |
312 | # icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" |
313 | ## strings |
314 | # icolor white "\"(\\.|[^\"])*\"" |
315 | ## comments |
316 | # icolor blue "^[[:space:]]*#.*$" |
317 | |
318 | syntax "magellan" "\.(smage2|sminc|mage|minc)$" |
319 | color brightcyan "^ *minclude\>" "^ *smcinclude\>" |
320 | color brightwhite "^ *src [^ ]*" |
321 | color brightblue "src_compile\>" "src_prepare\>" "src_install\>" "preinstall\>" "postinstall\>" "preremove\>" "postremove\>" |
322 | color cyan "m(unpack|configure|make|install|installdocs|patch|groupadd|groupdel|useradd|userdel|striplibs|stripbins|libdir|include)|sminclude\>" "^ *die\>" |
323 | color yellow "^ *export\>" |
324 | color magenta "\<(if|then|else|fi|case|esac|in|for|do|done|while)\>" |
325 | color brightgreen "\$\{(.|([A-Z_]*))\}" |
326 | color green "#.*$" |
327 | color brightgreen "\<(P(NAME|VER|BUILD|CATEGORIE)|HOMEPAGE|DESCRIPTION|SRC(_URI|DIR|FILE)|(P|S)?DEPEND|PROVIDE|STATE|SPECIAL_(VARS|FUNCTIONS))\>" |
328 |