Magellan Linux

Contents of /trunk/nano/nanorc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65 - (show annotations) (download)
Mon Apr 10 10:45:50 2006 UTC (18 years, 1 month ago) by niro
File size: 12837 byte(s)
initial release

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