Advertisement
gnihtemoSgnihtemos

nanorc

Apr 21st, 2015
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 68.55 KB | None | 0 0
  1. ## 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. set tabsize 4
  19.  
  20. ## Use auto-indentation.
  21. set autoindent
  22.  
  23. ## Backup files to filename~.
  24. # set backup
  25.  
  26. ## The directory to put unique backup files in.
  27. # set backupdir ""
  28.  
  29. ## Do backwards searches by default.
  30. # set backwards
  31.  
  32. ## Use bold text instead of reverse video text.
  33. # set boldtext
  34.  
  35. ## The characters treated as closing brackets when justifying
  36. ## paragraphs. They cannot contain blank characters. Only closing
  37. ## punctuation, optionally followed by closing brackets, can end
  38. ## sentences.
  39. ##
  40. # set brackets ""')>]}"
  41.  
  42. ## Do case sensitive searches by default.
  43. # set casesensitive
  44.  
  45. ## Constantly display the cursor position in the statusbar. Note that
  46. ## this overrides "quickblank".
  47. set const
  48.  
  49. ## Use cut to end of line by default.
  50. # set cut
  51.  
  52. ## Set the line length for wrapping text and justifying paragraphs.
  53. ## If fill is 0 or less, the line length will be the screen width less
  54. ## this number.
  55. ##
  56. # set fill -8
  57.  
  58. ## Enable ~/.nano_history for saving and reading search/replace strings.
  59. # set historylog
  60.  
  61. ## The opening and closing brackets that can be found by bracket
  62. ## searches. They cannot contain blank characters. The former set must
  63. ## come before the latter set, and both must be in the same order.
  64. ##
  65. # set matchbrackets "(<[{)>]}"
  66.  
  67. ## Use the blank line below the titlebar as extra editing space.
  68. # set morespace
  69.  
  70. ## Enable mouse support, if available for your system. When enabled,
  71. ## mouse clicks can be used to place the cursor, set the mark (with a
  72. ## double click), and execute shortcuts. The mouse will work in the X
  73. ## Window System, and on the console when gpm is running.
  74. ##
  75. # set mouse
  76.  
  77. ## Allow multiple file buffers (inserting a file will put it into a
  78. ## separate buffer). You must have configured with --enable-multibuffer
  79. ## for this to work.
  80. ##
  81. # set multibuffer
  82.  
  83. ## Don't convert files from DOS/Mac format.
  84. # set noconvert
  85.  
  86. ## Don't follow symlinks when writing files.
  87. # set nofollow
  88.  
  89. ## Don't display the helpful shortcut lists at the bottom of the screen.
  90. # set nohelp
  91.  
  92. ## Don't add newlines to the ends of files.
  93. # set nonewlines
  94.  
  95. ## Don't wrap text at all.
  96. # set nowrap
  97.  
  98. ## Set operating directory. nano will not read or write files outside
  99. ## this directory and its subdirectories. Also, the current directory
  100. ## is changed to here, so any files are inserted from this dir. A blank
  101. ## string means the operating directory feature is turned off.
  102. ##
  103. # set operatingdir ""
  104.  
  105. ## Preserve the XON and XOFF keys (^Q and ^S).
  106. # set preserve
  107.  
  108. ## The characters treated as closing punctuation when justifying
  109. ## paragraphs. They cannot contain blank characters. Only closing
  110. ## punctuation, optionally followed by closing brackets, can end
  111. ## sentences.
  112. ##
  113. # set punct "!.?"
  114.  
  115. ## Do quick statusbar blanking. Statusbar messages will disappear after
  116. ## 1 keystroke instead of 26. Note that "const" overrides this.
  117. ##
  118. # set quickblank
  119.  
  120. ## The email-quote string, used to justify email-quoted paragraphs.
  121. ## This is an extended regular expression if your system supports them,
  122. ## otherwise a literal string. Default:
  123. # set quotestr "^([ ]*[#:>\|}])+"
  124. ## if you have extended regular expression support, otherwise:
  125. # set quotestr "> "
  126.  
  127. ## Fix Backspace/Delete confusion problem.
  128. # set rebinddelete
  129.  
  130. ## Fix numeric keypad key confusion problem.
  131. # set rebindkeypad
  132.  
  133. ## Do extended regular expression searches by default.
  134. # set regexp
  135.  
  136. ## Make the Home key smarter. When Home is pressed anywhere but at the
  137. ## very beginning of non-whitespace characters on a line, the cursor
  138. ## will jump to that beginning (either forwards or backwards). If the
  139. ## cursor is already at that position, it will jump to the true
  140. ## beginning of the line.
  141. # set smarthome
  142.  
  143. ## Use smooth scrolling as the default.
  144. # set smooth
  145.  
  146. ## Use this spelling checker instead of the internal one. This option
  147. ## does not properly have a default value.
  148. ##
  149. # set speller "aspell -x -c"
  150.  
  151. ## Allow nano to be suspended.
  152. # set suspend
  153.  
  154. ## Use this tab size instead of the default; it must be greater than 0.
  155. # set tabsize 8
  156.  
  157. ## Convert typed tabs to spaces.
  158. # set tabstospaces
  159.  
  160. ## Save automatically on exit, don't prompt.
  161. # set tempfile
  162.  
  163. ## Disallow file modification; why would you want this in an rcfile? ;)
  164. # set view
  165.  
  166. ## The two single-column characters used to display the first characters
  167. ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
  168. ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
  169. # set whitespace " "
  170.  
  171. ## Detect word boundaries more accurately by treating punctuation
  172. ## characters as part of a word.
  173. # set wordbounds
  174.  
  175.  
  176. ## Color setup
  177. ##
  178. ## Format:
  179. ##
  180. ## syntax "short description" ["filename regex" ...]
  181. ##
  182. ## The "none" syntax is reserved; specifying it on the command line is
  183. ## the same as not having a syntax at all. The "default" syntax is
  184. ## special: it takes no filename regexes, and applies to files that
  185. ## don't match any other syntax's filename regexes.
  186. ##
  187. ## color foreground,background "regex" ["regex"...]
  188. ## or
  189. ## icolor foreground,background "regex" ["regex"...]
  190. ##
  191. ## "color" will do case sensitive matches, while "icolor" will do case
  192. ## insensitive matches.
  193. ##
  194. ## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
  195. ## For foreground colors, you may use the prefix "bright" to get a
  196. ## stronger highlight.
  197. ##
  198. ## To use multi-line regexes, use the start="regex" end="regex"
  199. ## [start="regex" end="regex"...] format.
  200. ##
  201. ## If your system supports transparency, not specifying a background
  202. ## color will use a transparent color. If you don't want this, be sure
  203. ## to set the background color to black or white.
  204. ##
  205. ## If you wish, you may put your syntaxes in separate files. You can
  206. ## make use of such files (which can only include "syntax", "color", and
  207. ## "icolor" commands) as follows:
  208. ##
  209. ## include "/path/to/syntax_file.nanorc"
  210. ##
  211. ## Unless otherwise noted, the name of the syntax file (without the
  212. ## ".nanorc" extension) should be the same as the "short description"
  213. ## name inside that file. These names are kept fairly short to make
  214. ## them easier to remember and faster to type using nano's -Y option.
  215. ##
  216. ## All regexes should be extended regular expressions.
  217.  
  218. #####################################################################################################################
  219.  
  220. ## Default - makes ## as comment
  221. ##include "/usr/share/nano/default.nanorc"
  222.  
  223. syntax "default"
  224. color green "^#.*"
  225. color brightgreen "^##.*"
  226. color yellow "^###.*"
  227. #color green "^[ \t]*#.*
  228.  
  229. #####################################################################################################################
  230.  
  231. ## Emacs
  232. ##include "/usr/share/nano/dotemacs.nanorc"
  233.  
  234. syntax "dotemacs" "^.emacs$"
  235. color green "^;.*"
  236.  
  237. #####################################################################################################################
  238.  
  239. ## C/C++
  240. ##include "/usr/share/nano/c.nanorc"
  241.  
  242.  
  243. ## Here is an example for C/C++.
  244. ##
  245. syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
  246. color brightred "\<[A-Z_][0-9A-Z_]+\>"
  247. color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
  248. color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
  249. color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
  250. color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
  251. color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
  252. color magenta "\<(goto|continue|break|return)\>"
  253. color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
  254. color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
  255. ##
  256. ## GCC builtins
  257. color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
  258. ##
  259. ## String highlighting. You will in general want your comments and
  260. ## strings to come last, because syntax highlighting rules will be
  261. ## applied in the order they are read in.
  262. color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
  263. ##
  264. ## This string is VERY resource intensive!
  265. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
  266.  
  267. ## Comment highlighting
  268. color brightblue "//.*"
  269. color brightblue start="/\*" end="\*/"
  270.  
  271.  
  272. #####################################################################################################################
  273.  
  274. ## HTML
  275. #there is better one in xml.nanorc
  276. # include "/usr/share/nano/html.nanorc"
  277.  
  278. ## Here is a short example for HTML.
  279. ##
  280. syntax "html" "\.html$"
  281. color blue start="<" end=">"
  282. color red "&[^;[[:space:]]]*;"
  283.  
  284. #####################################################################################################################
  285.  
  286. ## TeX
  287. ##include "/usr/share/nano/tex.nanorc"
  288.  
  289. ## Here is a short example for TeX files.
  290. ##
  291. syntax "tex" "\.tex$"
  292. icolor green "\\.|\\[A-Z]*"
  293. color magenta "[{}]"
  294. color blue "%.*"
  295.  
  296. #####################################################################################################################
  297.  
  298. ## Quoted emails (under e.g. mutt)
  299. ##include "/usr/share/nano/mutt.nanorc"
  300.  
  301. ## Here is an example for quoted emails (under e.g. mutt).
  302. ##
  303. syntax "mutt"
  304. color green "^>.*"
  305.  
  306. #####################################################################################################################
  307.  
  308. ## Patch files
  309. ##include "/usr/share/nano/patch.nanorc"
  310.  
  311. ## Here is an example for patch files.
  312. ##
  313. syntax "patch" "\.(patch|diff)$"
  314. color brightgreen "^\+.*"
  315. color green "^\+\+\+.*"
  316. color brightblue "^ .*"
  317. color brightred "^-.*"
  318. color red "^---.*"
  319. color brightyellow "^@@.*"
  320. color magenta "^diff.*"
  321.  
  322. #####################################################################################################################
  323.  
  324. ## Manpages
  325. ##include "/usr/share/nano/man.nanorc"
  326.  
  327. ## Here is an example for manpages.
  328. ##
  329. syntax "man" "\.[1-9]x?$"
  330. color green "\.(S|T)H.*$"
  331. color brightgreen "\.(S|T)H" "\.TP"
  332. color brightred "\.(BR?|I[PR]?).*$"
  333. color brightblue "\.(BR?|I[PR]?|PP)"
  334. color brightwhite "\\f[BIPR]"
  335. color yellow "\.(br|DS|RS|RE|PD)"
  336.  
  337. #####################################################################################################################
  338.  
  339. ## Groff
  340. ##include "/usr/share/nano/groff.nanorc"
  341.  
  342. ## Here is an example for groff.
  343. ##
  344. syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
  345. ## The argument of .ds or .nr
  346. color cyan "^\.(ds|nr) [^[[:space:]]]*"
  347. ## Single character escapes
  348. color brightmagenta "\\."
  349. ## Highlight the argument of \f or \s in the same color
  350. color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
  351. ## Newlines
  352. color cyan "(\\|\\\\)n(.|\(..)"
  353. color cyan start="(\\|\\\\)n\[" end="]"
  354. ## Requests
  355. color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
  356. ## Comments
  357. color yellow "^\.\\".*$"
  358. ## Strings
  359. color green "(\\|\\\\)\*(.|\(..)"
  360. color green start="(\\|\\\\)\*\[" end="]"
  361. ## Characters
  362. color brightred "\\\(.."
  363. color brightred start="\\\[" end="]"
  364. ## Macro arguments
  365. color brightcyan "\\\\\$[1-9]"
  366.  
  367. #####################################################################################################################
  368.  
  369. ## Perl
  370. ##include "/usr/share/nano/perl.nanorc"
  371.  
  372. ## Here is an example for Perl.
  373. ##
  374. syntax "perl" "\.p[lm]$"
  375. 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)\>"
  376. 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)\>"
  377. icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)"
  378. color yellow "".*"|qq\|.*\|"
  379. color white "[sm]/.*/"
  380. color white start="(^use| = new)" end=";"
  381. color green "#.*"
  382. color yellow start="<< 'STOP'" end="STOP"
  383.  
  384. #####################################################################################################################
  385.  
  386. ## Python
  387. ##include "/usr/share/nano/python.nanorc"
  388.  
  389. ## Here is an example for Python.
  390. ##
  391. syntax "python" "\.py$"
  392. icolor brightblue "def [0-9A-Z_]+"
  393. color brightcyan "\<(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|return|try|while)\>"
  394. color brightgreen "["'].*[^\\]["']" "["']{3}.*[^\\]["']{3}"
  395. color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
  396. color brightred "#.*$"
  397.  
  398. #####################################################################################################################
  399.  
  400. ## Ruby
  401. ##include "/usr/share/nano/ruby.nanorc"
  402.  
  403. ## Here is an example for Ruby.
  404. ##
  405. syntax "ruby" "\.rb$"
  406. ## Asciibetical list of reserved words
  407. color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
  408. ## Constants
  409. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
  410. ## Ruby "symbols"
  411. icolor magenta "([ ]|^):[0-9A-Z_]+\>"
  412. ## Some unique things we want to stand out
  413. color brightyellow "\<(__FILE__|__LINE__)\>"
  414. ## Regular expressions
  415. color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  416. ## Shell command expansion is in `backticks` or like %x{this}. These are
  417. ## "double-quotish" (to use a perlism).
  418. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  419. ## Strings, double-quoted
  420. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  421. ## Expression substitution. These go inside double-quoted strings,
  422. ## "like #{this}".
  423. color brightgreen "#\{[^}]*\}"
  424. ## Strings, single-quoted
  425. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  426. ## Comments
  427. color cyan "#[^{].*$" "#$"
  428. color brightcyan "##[^{].*$" "##$"
  429. ## "Here" docs
  430. color green start="<<-?'?EOT'?" end="^EOT"
  431. ## Some common markers
  432. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
  433.  
  434. #####################################################################################################################
  435.  
  436. ## Java
  437. ##include "/usr/share/nano/java.nanorc"
  438.  
  439. ## Here is an example for Java.
  440. ##
  441. syntax "java" "\.java$"
  442. color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
  443. color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
  444. color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
  445. color red ""[^"]*""
  446. color yellow "\<(true|false|null)\>"
  447. color blue "//.*"
  448. color blue start="/\*" end="\*/"
  449. color brightblue start="/\*\*" end="\*/"
  450. color ,green "[[:space:]]+$"
  451.  
  452. #####################################################################################################################
  453.  
  454. ## Assembler
  455. ##include "/usr/share/nano/asm.nanorc"
  456.  
  457.  
  458. ## Here is an example for assembler.
  459. ##
  460. syntax "asm" "\.(S|s|asm)$"
  461. color red "\<[A-Z_]{2,}\>"
  462. color brightgreen "\.(data|subsection|text)"
  463. color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
  464. color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
  465. icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
  466. color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
  467. ## Highlight strings (note: VERY resource intensive)
  468. color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
  469. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
  470. ## Highlight comments
  471. color brightblue "//.*"
  472. color brightblue start="/\*" end="\*/"
  473.  
  474.  
  475. #####################################################################################################################
  476.  
  477. ## Bourne shell scripts
  478. ##include "/usr/share/nano/sh.nanorc"
  479.  
  480. ## Here is an example for Bourne shell scripts.
  481. ##
  482. syntax "sh" "\.sh$"
  483. icolor red "^[a-zA-Z_0-9]+\(\)"
  484. color brightblue "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
  485. color white "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
  486. color green "-[Ldefgruwx]\>"
  487. color white "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
  488. color white "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
  489. icolor cyan "\$\{?[0-9A-Z_!@#$*?-]+\}?"
  490. color green "(^|[[:space:]])#.*$"
  491. color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
  492.  
  493. #####################################################################################################################
  494.  
  495. ## Gentoo ebuilds and such
  496. ##include "/usr/share/nano/gentoo.nanorc"
  497.  
  498. ## Here is an example for ebuilds/eclasses
  499. ##
  500. syntax "ebuild" "\.e(build|class)$"
  501. ## All the standard portage functions
  502. color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
  503. ## Highlight bash related syntax
  504. color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
  505. color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
  506. color green "-(e|d|f|r|g|u|w|x|L)\>"
  507. color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
  508. ## Highlight variables ... official portage ones in red, all others in bright red
  509. color brightred "\$\{?[a-zA-Z_0-9]+\}?"
  510. color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
  511. color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
  512. ## Highlight portage commands
  513. color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
  514. color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>"
  515. color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
  516. color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
  517. color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
  518. color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
  519. color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
  520. ## Highlight common commands used in ebuilds
  521. color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
  522. ## Highlight comments (doesnt work that well)
  523. color yellow "#.*$"
  524. ## Highlight strings (doesnt work that well)
  525. color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
  526.  
  527. ## Here is an example for Portage control files
  528. ##
  529. syntax "/etc/portage" "\.(keywords|mask|unmask|use)$"
  530. ## Base text:
  531. color green "^.+$"
  532. ## Use flags:
  533. color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
  534. color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
  535. ## Likely version numbers:
  536. color magenta "-[[:digit:]].*([[:space:]]|$)"
  537. ## Accepted arches:
  538. color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>"
  539. color white "[[:space:]][~-]?\*"
  540. ## Categories:
  541. color cyan "^[[:space:]]*.*/"
  542. ## Masking regulators:
  543. color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
  544. ## Comments:
  545. color yellow "#.*$"
  546.  
  547. #####################################################################################################################
  548.  
  549. ## PHP something missing in there...
  550. #include "/usr/share/nano/php.nanorc"
  551.  
  552. syntax "php" "\.php[2345s~]?$"
  553. color brightblue "(.*)\("
  554. color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
  555. color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
  556. color green "[.,{}();]"
  557. color red "('.*')|(\".*\")"
  558. color brightyellow "(#.*|//.*)$"
  559. color brightyellow start="/\*" end="\*/"
  560. color brightblue "(<\?(php)?|\?>)"
  561. color white start="\?>" end="<\?(php)?"
  562.  
  563. #####################################################################################################################
  564.  
  565. ## PHP
  566. ##include "/usr/share/nano/php2.nanorc"
  567.  
  568. # PHP Syntax Highlighting
  569. syntax "php2" "\.php[2345s~]?$"
  570. color brightblue "(.*)\("
  571. color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
  572. color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
  573. color green "[.,{}();]"
  574. color red "('.*')|(\".*\")"
  575. color brightyellow "(#.*|//.*)$"
  576. color brightyellow start="/\*" end="\*/"
  577. color brightblue "(<\?(php)?|\?>)"
  578. color white start="\?>" end="<\?(php)?"
  579.  
  580.  
  581. #####################################################################################################################
  582.  
  583. ## Xorg config
  584. ##include "/usr/share/nano/xorg.nanorc"
  585.  
  586. ## syntax highlighting in xorg.conf
  587. ##
  588. syntax "xorg" "xorg\.conf$"
  589. color brightwhite "[^A-Za-z0-9](End)?Sub[sS]ection([^A-Za-z0-9]|[[:space:]]*)"
  590. color brightwhite "^[[:space:]]*(End)?Section([^A-Za-z0-9]|[[:space:]]*)"
  591. color yellow "[^A-Za-z0-9](Monitor|View[pP]ort|Virtual)[^A-Za-z0-9]"
  592. color yellow "[^A-Za-z0-9]Mod(e|es|eline|ulePath|elName)[^A-Za-z0-9]"
  593. color yellow "[^A-Za-z0-9](\+vsync|\+hsync|HorizSync|VertRefresh)[^A-Za-z0-9]"
  594. color yellow "[^A-Za-z0-9](Rgb|Font)Path[^A-Za-z0-9]"
  595. color yellow "[^A-Za-z0-9](Default(Color)?)?Depth[^A-Za-z0-9]"
  596. color yellow "[^A-Za-z0-9](Input)?Device[^A-Za-z0-9]"
  597. color yellow "[^A-Za-z0-9](Identifier|Screen|Option)[^A-Za-z0-9]"
  598. color yellow "[^A-Za-z0-9]((Left|Right)Of|Driver|Load)[^A-Za-z0-9]"
  599. color yellow "[^A-Za-z0-9](VendorName|BoardName|BusID)[^A-Za-z0-9]"
  600. color magenta "[0-9]"
  601. color white ""(\\.|[^\"])*""
  602. color green "#.*"
  603.  
  604. #####################################################################################################################
  605.  
  606. ## XML
  607. ##include "/usr/share/nano/xml.nanorc"
  608.  
  609. ##****************************************************************************
  610. #
  611. # Syntax highlighting for XML files
  612. #
  613. # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
  614. # License: GPL 2 or later
  615. #
  616. # Version: 2004-02-25
  617. #
  618. ##****************************************************************************
  619.  
  620. syntax "ml" ".*\.([jrs]?html?|xml|sgml?|lhtml|opml|kdevelop|vcproj|glade|xsd|plist|gcs|dtd|dcl)$" "catalog$" "docbook"
  621. color white "^.+$"
  622. color green start="<" end=">"
  623. color cyan "<[^> ]+"
  624. color cyan ">"
  625. color yellow start="<!DOCTYPE" end="[/]?>"
  626. color yellow start="<!--" end="-->"
  627. color red "&[^;]*;"
  628.  
  629. #####################################################################################################################
  630.  
  631. ## URLS
  632. ##include "/usr/share/nano/urls.nanorc"
  633.  
  634. ##****************************************************************************
  635. #
  636. # Syntax highlighting for HTTP codes
  637. #
  638. # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
  639. # License: GPL 2 or later
  640. #
  641. # Version: 2004-02-25
  642. #
  643. ##****************************************************************************
  644.  
  645. syntax "urls"
  646. color brightmagenta "^.*$"
  647. color cyan "^(1[0-9][0-9]|20[256]|30[45]).*$"
  648. color green "^20[03].*$"
  649. color brightyellow "^(201|30[0-37]).*$"
  650. color brightred "^(204|[45][0-9][0-9]|666).*$"
  651.  
  652. #####################################################################################################################
  653.  
  654. ## CSS
  655. ##include "/usr/share/nano/css.nanorc"
  656.  
  657. ##****************************************************************************
  658. #
  659. # Syntax highlighting for CSS files
  660. #
  661. # Author: Simon Rupf, simon.rupf(a)int-ag.ch
  662. # License: GPL 2 or later
  663. #
  664. # Version: 2005-02-14
  665. #
  666. ##****************************************************************************
  667.  
  668. syntax "css" "\.css$"
  669. color brightred "."
  670. color brightyellow start="\{" end="\}"
  671. color brightwhite start=":" end="[;^\{]"
  672. color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
  673. color brightblue start="\/\*" end="\\*/"
  674. color green ";|:|\{|\}"
  675.  
  676. #####################################################################################################################
  677.  
  678. ## Conky
  679. ##include "/usr/share/nano/conky.nanorc"
  680.  
  681. ## Conky config highlighting
  682. ##
  683. syntax "Conky" ".conkyrc$"
  684. color brightblue "(use_spacer|background|use_xft|xftfont|xftalpha)"
  685. color brightblue "(mail_spool|update_interval|own_window)"
  686. color brightblue "(double_buffer|minimum_size)"
  687. color brightblue "(draw_(outline|borders|shades)|stippled_borders)"
  688. color brightblue "border_(margin|width)"
  689. color brightblue "default_((shade_|outline_)?color)"
  690. color brightblue "(alignment|gap_x|gap_y|no_buffers|uppercase)"
  691. color brightblue "^TEXT[[:space:]]*$"
  692. color brightred "[[:space:]]+(yes|no)[[:space:]]*"
  693. color brightred "(top_left|top_right|bottom_left|bottom_right)[[:space:]]*$"
  694. color magenta "[[:space:]]+([[:space:]]*([0-9]\.?))+[[:space:]]*"
  695. color brightred "\$\{?[a-zA-Z_0-9\# ]+\}?"
  696. color green "^[[:space:]]*#.*"
  697. color white "[[:space:]]+\#[0-9A-Fa-f]{6}"
  698.  
  699. #####################################################################################################################
  700.  
  701. ## .cf
  702. ##include "/usr/share/nano/maincf.nanorc"
  703.  
  704. ### all *cf files (e.g. main.cf, Postfix )
  705. syntax "maincf" "(\.|/|)cf$"
  706. color magenta "\=.*$"
  707. color green "#.*$"
  708. color cyan "[A-Z0-9\_]+="
  709. color blue ""(\\.|[^\"])*""
  710. color red "\@"
  711.  
  712. #####################################################################################################################
  713.  
  714. ## *rc - catches more files for now
  715. ##include "/usr/share/nano/rcfiles.nanorc"
  716.  
  717. ### all *rc files ( e.g. .bashrc, inputrc, xtermcontrol .... )
  718. syntax "rcfiles" "\rc$" "(\.|/|)control$"
  719. color red "'(\\.|[^'])*'"
  720. color blue ""(\\.|[^\"])*""
  721. color magenta "[A-Z0-9\_]+="
  722. color magenta "\<(sudo)\>"
  723. color cyan "\<(alias)\>"
  724. color brightcyan "\<(export)\>"
  725. color yellow "\<(shopt)\>"
  726. color brightred "\<(umask)\>.*$"
  727. color green "#.*$"
  728.  
  729. #####################################################################################################################
  730.  
  731. ## *rc
  732. ##include "/usr/share/nano/rcfiles-new.nanorc"
  733.  
  734. ## this .rc is not meant for rcs in etc but those used in apps like wine
  735. syntax "rc" "\.rc$"
  736. color cyan start="\{" end="\}"
  737. color brightgreen start="<" end=">"
  738. color brightyellow "(\"(\\.|[^\"])*\"|[0-9])"
  739. color green start="\/\*" end="\*\/"
  740. color yellow "(#(define|include)|LANGUAGE|FONT)"
  741.  
  742. ### all *rc files ( e.g. .bashrc, inputrc, xtermcontrol .... )
  743. ##syntax "rcfiles" "(\.|/|)rc$" "(\.|/|)control$"
  744. syntax "rcfiles2" "((.ba|ba|c|.c)sh|input|xinit|eix|(.w|w)minet)|gtk|rc$"
  745. color red "'(\\.|[^'])*'"
  746. color blue ""(\\.|[^\"])*""
  747. color magenta "[A-Z0-9\_]+="
  748. color magenta "\<(sudo)\>"
  749. color cyan "\<(alias)\>"
  750. color brightcyan "\<(export)\>"
  751. color yellow "\<(shopt)\>"
  752. color brightred "\<(umask)\>.*$"
  753. color green "#.*$"
  754.  
  755. ## rc...
  756. syntax "rc2" "(wop|wget)rc$"
  757. color cyan "\=.*$"
  758. color brightgreen start="<" end=">"
  759. color brightyellow "[0-9]"
  760. icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]\="
  761. color brightred "[[:space:]]off"
  762. color brightgreen "[[:space:]]on"
  763. color green "#.*$"
  764.  
  765. #####################################################################################################################
  766.  
  767. ## profile
  768. ##include "/usr/share/nano/profile.nanorc"
  769.  
  770. ### all *profile files ( ~/.bash_profile, /etc/profile)
  771. syntax "profiles" "(\.|/|)profile$"
  772. color red "'(\\.|[^'])*'"
  773. color blue ""(\\.|[^\"])*""
  774. color magenta "[a-zA-Z0-9\_]+="
  775. color magenta "\<(sudo)\>"
  776. color cyan "\<(export)\>" "\<(alias)\>"
  777. color brightred "\<(umask)\>.*$"
  778. color green "#.*$"
  779.  
  780. #####################################################################################################################
  781.  
  782. ## java script
  783. ##include "/usr/share/nano/js.nanorc"
  784.  
  785. ### all *js files ( e.g. Firefox user.js, prefs.js )
  786. syntax "jsfiles" "(\.|/|)js$"
  787. color green "//.*$" start="\/\*" end="\*\/"
  788. color blue "'(\\.|[^'])*'"
  789. color red ""(\\.|[^\"])*""
  790. color brightgreen "\<(true)\>"
  791. color brightred "\<(false)\>" "http\:\/\/.*$"
  792. color brightmagenta "[0-9](\\.|[^\"])*)"
  793.  
  794. #####################################################################################################################
  795.  
  796. ## configs
  797. ##include "/usr/share/nano/configfiles.nanorc"
  798.  
  799. ### all *conf files (e.g. make.conf, xorg.conf, grub.conf, make.globals, Xfce files...)
  800. syntax "configfiles" "(\.|/|)conf$" "(\.|/|)ample$" "(\.|/|)globals$" "xfce.*$" "syslog-ng" "sudoers"
  801. color brightwhite "\<(alias)\>"
  802. color blue "<(\\.|[^'])*>"
  803. color magenta "[a-zA-Z0-9\_]+="
  804. color white ">(\\.|[^'><])*</"
  805. color green "//.*$"
  806. color red ""(\\.|[^\"])*""
  807. color red "title.*$" "\<(server)\>" "\<(logfile)\>" "\<(driftfile)\>" "\<(restrict)\>"
  808. color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
  809. color magenta "'(\\.|[^'])*'"
  810. color brightwhite "[0-9]"
  811. color brightwhite "[<>]"
  812. color magenta "Section" "EndSection" "SubSection" "EndSubSection"
  813. color red "\<(root)\>"
  814. color brightred,blue "^.*-->" start="<!--.*" end="$"
  815. color green "#.*$" start="<!--" end="-->"
  816.  
  817. #####################################################################################################################
  818.  
  819. ## Xstuff
  820. ##include "/usr/share/nano/xdefaults.nanorc"
  821.  
  822. ## Xdefaults
  823. syntax "Xdefaults" "(\.|/|)default.$" "(\.|/|)resource.$" "fonts.alias"
  824. color magenta "XTerm"
  825. color cyan "Rxvt"
  826. color white "\*(\\.|[^'])*\:"
  827. color brightblue "\<(true)\>"
  828. color brightred "\<(false)\>"
  829. color brightwhite "[0-9]"
  830. color green "!.*$" "#.*$"
  831.  
  832.  
  833. #####################################################################################################################
  834.  
  835. ## configs
  836. ##include "/usr/share/nano/config.nanorc"
  837.  
  838. ### several config files
  839. syntax "config" "(\.|/|)config$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$"
  840. color red "/.*$" "TERM" "\..*$" "=.*$" "\*.*$"
  841. color white ":unscaled" "[0-9]"
  842. color blue "setenv|export" "\;"
  843. color green "#.*$"
  844.  
  845. #####################################################################################################################
  846.  
  847. ## configs
  848. ##include "/usr/share/nano/config2.nanorc"
  849.  
  850.  
  851. ### more config files
  852. syntax "config2" "(\.|/|)env$" "(\.|/|)server.$" "hosts" "gpm" "local.*$" "bootsplash" "crypto-loop"
  853. color red "/.*$" "http\:\/\/.*$"
  854. color white ":unscaled"
  855. color blue "setenv|export"
  856. color brightwhite "[0-9]"
  857. color green "#.*$"
  858. color white "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
  859.  
  860.  
  861. #####################################################################################################################
  862.  
  863. ## configs
  864. ##include "/usr/share/nano/config3.nanorc"
  865.  
  866.  
  867. ### even more config files ;-)
  868. syntax "config3" "iptables" "ntp.*$" "rsyncd" "xfs" "saslauthd" "timidity" "net.*$" "hdparm" "esound" "login.*$"
  869. color red "/.*$" "http\:\/\/.*$" ""(\\.|[^\"])*"" "\<(server)\>" "\<(logfile)\>""\<(driftfile)\>"
  870. color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
  871. color blue "setenv|export"
  872. color brightwhite "[0-9]"
  873. color green "#.*$"
  874.  
  875.  
  876. #####################################################################################################################
  877.  
  878. ## configs
  879. ##include "/usr/share/nano/tab.nanorc"
  880.  
  881. ### all *tab files ( e.g. fstab, crontab, inittab )
  882. syntax "fstab" "(\.|/|)tab$"
  883. color magenta "\<(none)\>.*$" "\<(wait)\>" "\<(respawn)\>"
  884. color red "/dev/hd.*$" "\<(ctrlaltdel)\>" "\<(initdefault)\>"
  885. color blue "/dev/sr.*$" "/dev/cd.*$" "\/sbin.*$"
  886. color cyan "/dev/sd.*$"
  887. color brightcyan "^.*(nfs|smbfs).*$"
  888. color yellow "/dev/fd.*$"
  889. color red "root"
  890. color brightwhite "[0-9]"
  891. color green "#.*$"
  892.  
  893. #####################################################################################################################
  894.  
  895. ## configs
  896. ##include "/usr/share/nano/passwd.nanorc"
  897.  
  898. ### etc/passwd
  899. syntax "passwd" "(\.|/|)passwd$" "(\.|/|)shadow$"
  900. color white ".*$"
  901. color blue "\:.*$"
  902. color yellow "\:*\:"
  903. color cyan "/.*$"
  904. color red "/bin/false"
  905. color brightred "root"
  906. color brightgreen "/bin/.*sh"
  907. color white "[0-9]"
  908. color magenta "\:\/.*\:"
  909.  
  910. #####################################################################################################################
  911.  
  912. ##include "/usr/share/nano/desc.nanorc"
  913.  
  914. ### all *desc files ( e.g. use.desc, use.local.desc )
  915. syntax "use" "(\.|/|)desc$"
  916. color green ".*\-"
  917. color white "\:.*$"
  918. color white "\-.*$"
  919. color magenta "\:(\\.|[^'])*\-"
  920. color blue "\-(\\.|[^'])*\:"
  921. color yellow "\/(\\.|[^'])*\:"
  922. color red "x86" "http\:\/\/.*$"
  923. color brightred "\!\!(\\.|[^'])*\!\!" "DO NOT SET THIS FLAG YOURSELF!"
  924. color green "#.*$"
  925.  
  926. #####################################################################################################################
  927.  
  928. ## Delphi
  929. ##include "/usr/share/nano/delphi.nanorc"
  930.  
  931. syntax "Delphi Source" "\.pas$"
  932. color brightcyan "\<(boolean|byte|char|double|float|integer|long|new|short|this|transient|void)\>"
  933. color brightred "\<(break|case|catch|continue|default|do|else|finally|for|if|then|return|switch|throw|try|while|function)\>"
  934. #color cyan "\<(abstract|unit|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|$color brightyellow "\<(until|repeat|var|uses|type|begin|end|const)\>"
  935. color magenta "\<(true|false|null|procedure)\>"
  936. color brightblue "//.*"
  937. color brightblue start="\{" end="\}"
  938.  
  939. #####################################################################################################################
  940.  
  941. # ChangeLog - colors everything in blue
  942. ##include "/usr/share/nano/changelog.nanorc"
  943.  
  944. syntax "changelog" "ChangeLog$"
  945. color brightgreen "^\+.*"
  946. color green "^\+\+\+.*"
  947. color brightblue "^ .*"
  948. color brightred "^-.*"
  949. color red "^---.*"
  950. color red "(\d\d\s\w\+\s\d\{4\})"
  951. color brightyellow "^@@.*"
  952. color magenta "^diff.*"
  953.  
  954. #syn region GentooChangeLogRelease start=/^\*/ end=/$/ contains=GentooChangeLogReleaseDate
  955. #syn match GentooChangeLogReleaseDate contained /(\d\d\s\w\+\s\d\{4\})/
  956. #syn region GentooChangeLogEntry start=/^\s\+/ end=/\n\n/
  957. # \ contains=GentooChangeLogEntryDate,GentooBug
  958. #syn region GentooChangeLogEntryDate contained start=/\d\?\d\s\w\+\s\d\{4\}/ end=/;/
  959. # \ nextgroup=GentooChangeLogEntryAuthor,GentooChangeLogEntryEmail skipwhite skipnl
  960. #syn region GentooChangeLogEntryAuthor contained start=/\S/ end=/\( <\)\@=/
  961. # \ nextgroup=GentooChangeLogEntryEmail skipwhite skipnl
  962. #syn match GentooChangeLogEntryEmail contained /<\?[a-zA-Z0-9\.\-\_]\+@[a-zA-Z0-9\.\-\_]\+>\?/
  963. # \ nextgroup=GentooChangeLogFiles skipwhite skipnl
  964. #syn region GentooChangeLogFiles contained start=/\(\S\)\@=/ end=/:/
  965. # \ contains=GentooChangeLogAddFile,GentooChangeLogDelFile,GentooChangeLogModFile
  966. #" Add / delete / changed files
  967. #syn region GentooChangeLogAddFile contained start=/+/ end=/\([,:]\)\@=/
  968. #syn region GentooChangeLogDelFile contained start=/-/ end=/\([,:]\)\@=/
  969. #syn region GentooChangeLogModFile contained start=/[a-zA-Z0-9]/ end=/\([,:]\)\@=/
  970.  
  971. #####################################################################################################################
  972.  
  973. ## ChangeLog (C)ryszardzonk
  974. ##include "/usr/share/nano/changelogs.nanorc"
  975.  
  976. ## Changelog file syntax
  977. ##
  978. syntax "changelogs" "ChangeLog*$" "HISTORY$" "NEWS$"
  979.  
  980. color green "\+"
  981. color red "\-"
  982. color brightwhite "[0-9]"
  983. color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
  984. color blue "[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]"
  985. color blue "[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]"
  986. color blue "\<(CEST|CET|CST||CDT|EDT)\>"
  987. color yellow "[0-9]\..*$"
  988. color cyan "\*.*$"
  989. color brightblue "\<(pre.*$|beta.*$|rc.*$|release.*$)\>"
  990. color green "#.*$"
  991. icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
  992. color magenta "[.0-9A-Za-z_]*[[:space:]]*[.0-9A-Za-z_]*[[:space:]]<"
  993. color brightyellow "<(\\.|[^\"])*>"
  994. color brightwhite "commit[[:space:]]*[.0-9A-Z_]*$"
  995.  
  996. #####################################################################################################################
  997.  
  998. ## video metadata info (C)ryszardzonk
  999. ##include "/usr/share/nano/info.nanorc"
  1000.  
  1001. ## *.Info file syntax
  1002. ##
  1003. syntax "info" "Info.txt$"
  1004. color green "[0-9]"
  1005. color brightblue "\<(video|codec|bitrate|width|height|General|FileSize|Format|OveralBitRate|PlayTime)\>"
  1006. color brightblue "\<(Video|Codec|Bitrate|BitRate|Width|Height|AspectRatio|FrameRate|Bits|SamplingRate)\>"
  1007. color brightblue "\<(audio|channel|V(i|I)DEO|CODEC|FORMAT|B(I|i)TRATE|METHOD|R(I|i)P|AUD(I|i)O|RESOLUT(I|i)ON|GENRE)\>"
  1008. color brightblue "\<(Audio|Channel|Sound|ASPECT|RAT(i|I)O|MOV(I|i)E|S(i|I)ZE|RUNT(I|i)ME)\>"
  1009. color magenta "Movie.*$"
  1010. color blue "\<(KHz|kHz|Kbps|fps|MB|KB|channels|MiB|min|kbit\/s|Min)\>"
  1011. color brightyellow "\<(DivX|XviD|MPEG\-4|AAC\ LC|H\.264|LAME|NTSC|MPEG1|AVI)\>"
  1012. color brightblack "\="
  1013. icolor brightcyan "[.0-9A-Z_]*:"
  1014. icolor brightyellow "http:.*$"
  1015.  
  1016. #####################################################################################################################
  1017.  
  1018. ## configs in /etc (C)ryszardzonk
  1019. ##include "/usr/share/nano/etc-stuff.nanorc"
  1020.  
  1021. ## /etc/ stuff syntax
  1022. ##
  1023. syntax "group" "group$"
  1024. color green "[0-9]\:.*$"
  1025. color brightwhite "[0-9]"
  1026. icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
  1027.  
  1028. syntax "modules" "modules.conf$" "modules.d/(\.|/|)"
  1029. color brightwhite "[0-9]"
  1030. color red "alias"
  1031. color brightred "(probeall|options)"
  1032. color green "#.*$"
  1033.  
  1034. syntax "modprobe" "modprobe.conf$"
  1035. color brightwhite "[0-9]"
  1036. color red "alias"
  1037. color brightred "options"
  1038. color magenta "[a-zA-Z0-9\_]+="
  1039. color green "#.*$"
  1040.  
  1041. syntax "hosts" "hosts$"
  1042. color brightwhite "[0-9]"
  1043. color cyan "\:\:"
  1044. color yellow "127.0.0.1"
  1045. color green "#.*$"
  1046.  
  1047. syntax "mplayer" "mplayer.conf$"
  1048. color brightgreen "\=.*$"
  1049. color brightred "no"
  1050. color cyan "\="
  1051. color green "#.*$"
  1052.  
  1053. syntax "mplayerplugin" "mplayerplug\-in.conf$"
  1054. color brightgreen "\=.*$"
  1055. color brightred "0"
  1056. color cyan "\="
  1057. color green "#.*$"
  1058.  
  1059. syntax "sensors" "sensors.conf$"
  1060. color brightyellow "\".*$"
  1061. color yellow "\<(label|compute|set|chip)\>"
  1062. color green "#.*$"
  1063.  
  1064. syntax "sysctl" "sysctl.conf$"
  1065. color brightwhite "[0-9]"
  1066. color cyan "\="
  1067. color green "#.*$"
  1068.  
  1069. syntax "dircolors" "DIR_COLORS$"
  1070. color yellow "\<(TERM|NORMAL|FILE|DIR|LINK|FIFO|SOCK|DOOR|BLK|CHR|ORPHAN|MISSING|SETUID|SETGID)\>"
  1071. color yellow "\<(STICKY|EXEC|STICKY_OTHER_WRITABLE|OTHER_WRITABLE)\>"
  1072. color brightblack "[0-9][0-9]\;.*$"
  1073. color cyan "\.[.0-9A-Z_]*[[:space:]]"
  1074. color green "#.*$"
  1075.  
  1076. syntax "modes" "fb.modes$"
  1077. color yellow "\<(mode|endmode)\>"
  1078. color cyan "\<(geometry|timings|hsync|vsync|double)\>"
  1079. color green "#.*$"
  1080.  
  1081. syntax "serial" "serial.conf$"
  1082. color brightwhite "[0-9]"
  1083. color cyan "\<(uart|port|irq|fourport)\>"
  1084. color green "#.*$"
  1085.  
  1086. syntax "services" "services$"
  1087. color cyan "/tcp"
  1088. color magenta "udp"
  1089. color brightblack "/"
  1090. color brightwhite "[0-9]"
  1091. color green "#.*$"
  1092.  
  1093. syntax "crontab" "crontab$"
  1094. color brightwhite "[0-9]"
  1095. color cyan "\*"
  1096. color yellow "[[:space:]]/.*$"
  1097. color brightblack "(&|>)"
  1098. color green "#.*$"
  1099.  
  1100. syntax "nscd" "nscd.conf$"
  1101. color cyan "(passwd|group|hosts)"
  1102. color yellow "([0-9]|yes)"
  1103. color green "#.*$"
  1104.  
  1105. syntax "rsync" "rsyncd.conf$"
  1106. color cyan "(hosts|(u|g)id|pid\ file|use\ chroot|read\ only|address|max\ connections|motd\ file)"
  1107. color cyan "(log\ format|syslog\ facility|timeout)"
  1108. color yellow "(path|comment|exclude)"
  1109. color brightyellow start="\[" end="\]"
  1110. color green "#.*$"
  1111.  
  1112. syntax "lilo" "lilo.conf$"
  1113. color cyan "(boot|map|install|menu\-scheme|timeout|delay|prompt|vga|default)"
  1114. color brightwhite "[0-9]"
  1115. color magenta "(lba32|linear|compact|image)"
  1116. color brightyellow "(root|label|read\-only)"
  1117. color yellow "\/.*$"
  1118. color green "#.*$"
  1119.  
  1120. syntax "hdparm" "hdparm$"
  1121. color cyan "(pata|sata)_all_args"
  1122. color cyan "[A-Za-z0-9]*_args"
  1123. color magenta "\".*$"
  1124. color green "#.*$"
  1125.  
  1126. syntax "ini" "\.ini$"
  1127. color yellow "\[.*]"
  1128. color green "\;.*$"
  1129.  
  1130. syntax "smbconf" "smb.conf$"
  1131. color brightcyan "\=.*$"
  1132. color cyan "\/.*$"
  1133. color brightred "(no|No)"
  1134. color brightgreen "(yes|Yes)"
  1135. color brightyellow "(workgroup.*$|hosts\ allow.*$|interfaces.*$|netbios\ name.*$)"
  1136. color yellow "\[.*]|\="
  1137. icolor magenta "^[[:space:]]*[.A-Z]*"
  1138. icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
  1139. icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
  1140. color green "\;.*$"
  1141. color green "#.*$"
  1142.  
  1143. syntax "mke2fs" "mke2fs.conf$"
  1144. color cyan "(base_features|blocksize|inode_ratio)"
  1145. color yellow "(small|floppy|news|largefile|largefile4)"
  1146. color brightwhite "[0-9]"
  1147. color brightyellow start="\[" end="\]"
  1148. color blue "\{|\}"
  1149. color brightblack "\="
  1150. color green "#.*$"
  1151.  
  1152. #this on may need fewer colors ;)
  1153. syntax "squidconf" "squid.conf$"
  1154. color brightyellow "(http_port|hierarchy_stoplist|maximum_object_size|cache_dir|dns_testnames)"
  1155. color brightyellow "(coredump_dir|pipeline_prefetch|cache_mgr|visible_hostname|ftp_user|client_netmask)"
  1156. color cyan "(acl|refresh_pattern|quick_abort_(min|max)|(cache|memory)_replacement_policy|(access|cache|cache_store)_log|cache_host)"
  1157. color yellow "((http|icp|snmp)_access|snmp_port|parent|sibling|anonymize_headers|fake_user_agent)"
  1158. color brightgreen "(allow|transparent|[[:space:]]on)"
  1159. color brightred "(deny|reload\-into\-ims|override\-expire|override\-lastmod|[[:space:]]off)"
  1160. color magenta "(src|dst|method)"
  1161. color brightcyan "(seconds|minutes|hours|(G|M|K)B)"
  1162. color brightblack "[0-9]"
  1163. color green "#.*$"
  1164.  
  1165. syntax "distcchosts" "/etc/distcc/hosts$"
  1166. color brightblue "[0-9]"
  1167. color yellow "localhost"
  1168. color magenta "(/|@|:)"
  1169. color green "#.*$"
  1170.  
  1171. syntax "logrotate" "logrotate.conf$"
  1172. color brightwhite "[0-9]"
  1173. color magenta start="/" end="[[:space:]]"
  1174. color cyan "(create|compress|include|notifempty|nomail|noolddir|\{|\})"
  1175. color yellow "(weekly|daily|rotate|postrotate|sharedscripts)"
  1176. color magenta "logrotate"
  1177. color green "#.*$"
  1178.  
  1179. syntax "ppppears" "/etc/ppp/peers/(\.|/|)"
  1180. color brightwhite "user.*$"
  1181. color brightyellow "user"
  1182. color brightyellow start="\"" end="\""
  1183. color yellow "lcp\-(echo\-(interval|failure)|max\-configure|restart)"
  1184. color yellow "(debug|sync|no(ccp|pcomp|accomp)|deflate|bsdcomp|usepeerdns|pty)"
  1185. color cyan "(lock|defaultroute|noipdefault|noauth|holdoff|maxfail|persist|asyncmap|detach|updetach|cdtrcts)"
  1186. color brightwhite "[0-9]"
  1187. color magenta "(\@|\,|\.)"
  1188. color green "#.*$"
  1189.  
  1190. syntax "dhcpconf" "dhcpd.conf$"
  1191. icolor brightgreen "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
  1192. color cyan "(authoritative|ddns\-update\-style|subnet|host)"
  1193. color brightblue "(netmask|routers|option|domain-nam(e|e-servers)|(default|max)-lease-time)|range|broadcast\-address"
  1194. color brightyellow start="\"" end="\""
  1195. color yellow "(hardware|ethernet|fixed\-address)"
  1196. color brightblack "\:|\;|\{|\})""
  1197. color green "#.*$"
  1198.  
  1199. syntax "hibernateconf" "/etc/hibernate/common.conf$"
  1200. color magenta "^[[:space:]]*[.A-Z]*"
  1201. color brightwhite start="'" end="'"
  1202. color brightgreen "yes"
  1203. color brightred "no"
  1204. color brightcyan "auto"
  1205. color green "#.*$"
  1206. color brightcyan "##.*$"
  1207. color yellow "###.*$"
  1208. color cyan "####.*$"
  1209.  
  1210. syntax "nsswitch" "nsswitch.conf$"
  1211. icolor cyan "^[[:space:]]*[.0-9A-Z_]*:"
  1212. color magenta "\:"
  1213. color green "#.*$"
  1214.  
  1215. syntax "sane" "sane.d/(\.|/|)"
  1216. color brightgreen "(scsi|usb|parport|auto)"
  1217. color brightred "option"
  1218. color yellow "(override|vendor|model)"
  1219. color cyan "/.*$"
  1220. color green "#.*$"
  1221.  
  1222. syntax "syslogconf" "syslog.conf$"
  1223. icolor cyan "(\*|\;|\.|\,|\\)"
  1224. color magenta "/.*$"
  1225. color brightblue "-.*$"
  1226. color brightwhite "\="
  1227. color green "#.*$"
  1228.  
  1229. ## these colors need to change...
  1230. syntax "udevrules" "\.rules$"
  1231. color brightwhite "[0-9]"
  1232. color brightblack "(ACTION|SUBSYSTEM|DEVPATH|OPTIONS|WAIT_FOR_SYSFS|ENV|KERNEL|NAME|MODE|GROUP|SYMLINK|DRIVERS|PROGRAM|RUN)"
  1233. color brightblack "(GOTO|IMPORT|ATTRS|SUBSYSTEMS|DVB|IR|BUS|SYSFS|ATTR|LABEL)"
  1234. color yellow "(add|net|scsi|drivers|module|address|bus|devices|ioerr_cnt|ignore_device|svga|video|tt(y(S|USB)|y|s)|last_rule)"
  1235. color yellow "(pnp|(au|ra)dio|tape|disk|snd|microcode|f(b|d|loppy|irmware)|usb|lp|kbd|parport|block|ide|misc|netlink|input)"
  1236. color yellow "(mouse|event|joystick|psmouse|atkbd|spkr|pcspkr|ir|dvb|persistent|storage|end|scanner|sound|dialout|console)"
  1237. color yellow "(cdrom|cdrw|dvd|dvdrw|isdn|pty|vcs|vcsa|ippp|dcbri|ircomm|capi|card|nvidia|rtc|agpgart|psaux|ptmx|sd|dasd|)"
  1238. color yellow "(ataraid|cciss|ida|rd|3dfx|control|hw|pcm|midi|timer|seq|cpu|msr|dm|i2c|mice|js|ts|loop|md|uinput|inotify|aoe)"
  1239. color brightyellow "(ID_(SERIAL|PATH|CLASS|EDD|CDROM|CDROM_(DVD|DVD_R|CD_RW))|program|parent|removable|GENERATED|COMMENT)"
  1240. color brightyellow "(id(Vendor|Product)|PHYSDEVBUS|(UDEV|UDEVD)_EVENT|INTERFACE_NEW|MODALIAS|modalias|alias|name)"
  1241. color brightred "(\%(k|r|c|n))"
  1242. color blue "(\;|\.|\"|\,)"
  1243. color brightblue "(\=|\*|\?)"
  1244. color green "#.*$"
  1245.  
  1246. syntax "mailalias" "/etc/mail/aliases$"
  1247. icolor brightblue "^[[:space:]]*[.0-9A-Z_]*:"
  1248. icolor brightblue "^[[:space:]]*[.0-9A-Z_]*\-[.0-9A-Z_]*:"
  1249. color yellow "(\/.*$|root)"
  1250. color green "#.*$"
  1251.  
  1252. syntax "wifiradar" "wifi-radar.conf$"
  1253. color brightwhite "[0-9]"
  1254. color yellow "((f|F)alse|eth[.0-9])|yes|no|[[:space:]]auto|ssid"
  1255. color brightgreen start="\[" end="\]"
  1256. color green "#.*$"
  1257.  
  1258. syntax "irssi" "irssi.conf$"
  1259. icolor brightwhite "(^[[:space:]]*[.0-9A-Z_]*[[:space:]]=|address|name|chatnet|port|autojoin)"
  1260. color brightblue ""(\\.|[^\"])*""
  1261. color yellow "(\{|\}|\;)"
  1262. color brightblack "\="
  1263. color brightgreen "(Y|y)es|[0-9]"
  1264. color brightred "No"
  1265. color blue "\""
  1266. color cyan "(servers|chatnets|channels|aliases|statusbar)"
  1267. color green "#.*$"
  1268.  
  1269. syntax "proftpd" "proftpd.conf$"
  1270. icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
  1271. color brightyellow "ServerType|DefaultServer|ServerIdent|Port[[:space:]]|Umask|MaxInstances|User|Group"
  1272. color yellow "(UserAlias|UseFtpUsers)"
  1273. color brightgreen "([[:space:]]on|[0-9]|AllowAll)"
  1274. color brightred "(off|DenyAll)"
  1275. icolor cyan start="<" end=">"
  1276. icolor cyan start=""" end="""
  1277. color cyan "xinetd|inetd|standalone"
  1278. color green "#.*$"
  1279.  
  1280. syntax "xinetd" "xinetd.conf$"
  1281. icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
  1282. color brightgreen "([0-9]|yes)"
  1283. color brightred "(off|no)"
  1284. color magenta "defaults"
  1285. color brightblack "="
  1286. color brightyellow "(\{|\})"
  1287. color cyan "/.*$"
  1288. color green "#.*$"
  1289.  
  1290. syntax "xinetd.d" "xinetd.d/(\.|/|)"
  1291. icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
  1292. color brightgreen "([0-9]|yes)"
  1293. color brightred "(off|[[:space:]]no)"
  1294. color brightblack "="
  1295. color brightyellow "(\{|\})"
  1296. color cyan "/.*$"
  1297. color green "#.*$"
  1298.  
  1299. syntax "localegen" "locale(.gen|s.build)"
  1300. color cyan "ISO.*$"
  1301. color yellow "UTF.*$"
  1302. color green "#.*$"
  1303.  
  1304. syntax "clamd" "clamd.conf$"
  1305. color brightblack "[0-9]M"
  1306. color brightwhite "[0-9]"
  1307. color yellow "^[[:space:]]*[.0-9A-Z_]*"
  1308. color cyan "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
  1309. color green "#.*$"
  1310.  
  1311. syntax "grcconf" "grc.conf$"
  1312. color cyan "conf\..*$"
  1313. color yellow "\(.*$|\\.*$"
  1314. color green "#.*$"
  1315.  
  1316. syntax "freshclamconf" "freshclam.conf$"
  1317. icolor brightcyan "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z_]*"
  1318. color cyan "\/.*$|[0-9]"
  1319. icolor yellow "^[[:space:]]*[.A-Z]*"
  1320. color green "#.*$"
  1321.  
  1322.  
  1323. #####################################################################################################################
  1324.  
  1325. ## logs in /var/log (C)ryszardzonk
  1326. ##include "/usr/share/nano/log-stuff.nanorc"
  1327.  
  1328. ## to have logs interpreted for you in just about 1000 ways use log analyzers
  1329. ## this only helps in viewing them directly
  1330.  
  1331. ## TODO
  1332. # getdelta, others...
  1333.  
  1334. syntax "logs" "midentd.log$" "mldonkey.log$"
  1335. color brightwhite "[0-9]"
  1336. color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
  1337. color blue "[0-9][0-9][0-9][0-9]"
  1338. color cyan "\].*$"
  1339. color brightblack start="\[" end="\]"
  1340.  
  1341. syntax "emergelog" "emerge.log$"
  1342. color brightwhite "[0-9]"
  1343. color yellow ">>>.*$"
  1344. color cyan "\*\*\*.*$"
  1345. color magenta "\:\:\:.*$"
  1346. color green start="\(" end="\)"
  1347. color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
  1348. color blue "[0-9][0-9][0-9][0-9]"
  1349. icolor red "^[[:space:]]*[.0-9A-Z_]*:"
  1350.  
  1351. syntax "ntplog" "ntp.log$"
  1352. icolor red "^[[:space:]]*[.0-9A-Z_]*:"
  1353. color brightwhite "[0-9]"
  1354. color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
  1355. color cyan "\].*$"
  1356. color brightblack start="\[" end="\]"
  1357.  
  1358. syntax "cronlog" "cron.log$"
  1359. color cyan "/.*$"
  1360. color brightblue "[0-9][0-9]\-[.A-Z_]*\-[0-9][0-9]"
  1361. color brightwhite "[0-9][0-9]\:[0-9][0-9]"
  1362. color magenta "(FILE|USER)"
  1363. color yellow "(pid|cmd)"
  1364.  
  1365. syntax "miniserv" "miniserv.log$" "miniserv.error$"
  1366. color cyan "Bad\ Request.*$"
  1367. color brightred "Access\ denied.*$"
  1368. color brightwhite "[0-9]"
  1369. color green "(POST|GET|HTTP)"
  1370. color brightred "\""
  1371. color yellow "(\:|\+|/|\.|\-)"
  1372. color green ".*started$"
  1373.  
  1374.  
  1375. #####################################################################################################################
  1376.  
  1377. ## nanorc syntax
  1378. ##include "/usr/share/nano/nanorc.nanorc"
  1379.  
  1380. ## Here is an example for nanorc files.
  1381. ##
  1382. syntax "nanorc" "\.?nanorc$"
  1383. ## Possible errors and parameters
  1384. icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
  1385. ## Keywords
  1386. icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace|wordbounds)\>"
  1387. icolor green "^[[:space:]]*(set|unset|include|syntax)\>"
  1388. ## Colors
  1389. icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
  1390. icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
  1391. ## Strings
  1392. icolor white ""(\\.|[^"])*""
  1393. ## Comments
  1394. icolor brightblue "^[[:space:]]*#.*$"
  1395. icolor cyan "^[[:space:]]*##.*$"
  1396.  
  1397.  
  1398. #####################################################################################################################
  1399.  
  1400. ## *.po files (C)ryszardzonk
  1401. ##include "/usr/share/nano/po.nanorc"
  1402.  
  1403. ## *.po file syntax
  1404. ##
  1405. syntax "po" "\.po$" "\.pot$"
  1406. color brightblue "\<(msgid|msgstr)\>"
  1407. color brightred "\/"
  1408. color green "#.*$"
  1409. color red "\<fuzzy\>"
  1410. color yellow "\<c-format\>"
  1411. color yellow "\""
  1412. color red "\"\""
  1413. color brightyellow "\"\\n\""
  1414. color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language\-Team|charset)\>"
  1415. color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>"
  1416. color yellow "\<(Copyright|(C))\>"
  1417. color yellow "[0-9]"
  1418. color brightyellow "\<(UTF|ISO|Windows|Mac|IBM)\>\-[0-9]"
  1419. color red "#~.*$"
  1420.  
  1421.  
  1422. #####################################################################################################################
  1423.  
  1424. ## Apache 2
  1425. ##include "/usr/share/nano/apache2.nanorc"
  1426.  
  1427. ## Apache httpd.conf highlighting
  1428. ##
  1429. #how to add sites-enabled files? "default" is too generic to keep in here I think
  1430. syntax "Apache2" "httpd.conf$"
  1431. color brightwhite "(ServerRoot|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)"
  1432. color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)"
  1433. color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)"
  1434. color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)"
  1435. color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)"
  1436. color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)"
  1437. color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)"
  1438. color brightwhite "((Force)?LanguagePriority|NameVirtualHost)"
  1439. color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)"
  1440. color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)"
  1441. color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)"
  1442. color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)"
  1443. color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)"
  1444. color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)"
  1445. color yellow "((Min|Max)Spare(Threads|Servers)|Start(Threads|Servers))"
  1446. color yellow "(MaxClients|(Max)?ThreadsPerChild|MaxRequestsPerChild)"
  1447. color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks)"
  1448. color brightred "(On|Off)[[:space:]]*$"
  1449. color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$"
  1450. color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$"
  1451. color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*"
  1452. color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*"
  1453. color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*"
  1454. color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*"
  1455. color brightred "[[:space:]]+type-map[[:space:]]*"
  1456. color magenta "[[:space:]]+[0-9]+[[:space:]]*"
  1457. color magenta "(/)?(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[1-9])(\.(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])){3}([[:space:]]+::(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])/(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9]))?"
  1458. color brightcyan start="<" end=">"
  1459. color white ""(\\.|[^\"])*""
  1460. # Unix-based paths
  1461. # can't use \] in the regex for some reason?!? Maybe a bug?
  1462. # this is preventing a 100% "to the end of the line" match for a few
  1463. # lines (the trailing characters from ] to the EOL are not highlighted.
  1464. # if anyone knows how to make it work, let me know.. ;)
  1465. color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+"
  1466. color green "^[[:space:]]*#.*"
  1467. color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>"
  1468.  
  1469.  
  1470. #####################################################################################################################
  1471.  
  1472. ## Apache 2 Virtual Host
  1473. ##include "/usr/share/nano/vhost.nanorc"
  1474.  
  1475. ## Apache httpd.conf highlighting
  1476. ##
  1477. #how to add sites-enabled files? "default" is too generic to keep in here I think
  1478. syntax "vhost" "(\.|/|)vhost\.conf"
  1479. color brightwhite "(ServerRoot|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)"
  1480. color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)"
  1481. color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)"
  1482. color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)"
  1483. color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)"
  1484. color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)"
  1485. color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)"
  1486. color brightwhite "((Force)?LanguagePriority|NameVirtualHost)"
  1487. color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)"
  1488. color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)"
  1489. color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)"
  1490. color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)"
  1491. color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)"
  1492. color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)"
  1493. color yellow "((Min|Max)Spare(Threads|Servers)|Start(Threads|Servers))"
  1494. color yellow "(MaxClients|(Max)?ThreadsPerChild|MaxRequestsPerChild)"
  1495. color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks)"
  1496. color brightred "(On|Off)[[:space:]]*$"
  1497. color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$"
  1498. color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$"
  1499. color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*"
  1500. color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*"
  1501. color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*"
  1502. color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*"
  1503. color brightred "[[:space:]]+type-map[[:space:]]*"
  1504. color magenta "[[:space:]]+[0-9]+[[:space:]]*"
  1505. color magenta "(/)?(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[1-9])(\.(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])){3}([[:space:]]+::(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])/(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9]))?"
  1506. color brightcyan start="<" end=">"
  1507. color white ""(\\.|[^\"])*""
  1508. # Unix-based paths
  1509. # can't use \] in the regex for some reason?!? Maybe a bug?
  1510. # this is preventing a 100% "to the end of the line" match for a few
  1511. # lines (the trailing characters from ] to the EOL are not highlighted.
  1512. # if anyone knows how to make it work, let me know.. ;)
  1513. color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+"
  1514. color green "^[[:space:]]*#.*"
  1515. color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>"
  1516.  
  1517.  
  1518.  
  1519. #####################################################################################################################
  1520.  
  1521. ## /etc/init.d/* custom gentoo.nanorc
  1522. ##include "/usr/share/nano/initscript.nanorc"
  1523.  
  1524. ## initscripts syntax (stolen from gentoo.nanorc) ;)
  1525. ##
  1526. syntax "initscript" "/etc/init.d/(\.|/|)"
  1527. ## All the standard portage functions
  1528. #color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
  1529. ## Highlight bash related syntax
  1530. color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
  1531. color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
  1532. color green "-(e|d|f|r|g|u|w|x|L)\>"
  1533. color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
  1534. ## Highlight variables ... official portage ones in red, all others in bright red
  1535. color brightred "\$\{?[a-zA-Z_0-9]+\}?"
  1536. color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
  1537. color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
  1538. ## Highlight portage commands
  1539. color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
  1540. color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>"
  1541. color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
  1542. color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
  1543. color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
  1544. color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
  1545. color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
  1546. ## Highlight common commands used in ebuilds
  1547. color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
  1548. ## Highlight comments (doesnt work that well)
  1549. color yellow "#.*$"
  1550. ## Highlight strings (doesnt work that well)
  1551. color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
  1552.  
  1553. #####################################################################################################################
  1554.  
  1555. ## Named (C)ryszardzonk
  1556. ##include "/usr/share/nano/named.nanorc"
  1557.  
  1558. ## named.conf syntax
  1559. ##
  1560. syntax "named" "named.conf"
  1561.  
  1562. color brightcyan "(\{|\}|\;)"
  1563. color brightwhite "[0-9]"
  1564. color magenta "(options|zone|IN)"
  1565. color yellow "(type|file|allow\-update|notify)"
  1566. color cyan "(directory|statistics\-file|forward\ first|forwarders|listen\-on\-v6|listen\-on|allow\-query)"
  1567. color cyan "(query\-source\ address|pid\-file)"
  1568. color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
  1569. ## comments
  1570. color green "#.*$"
  1571. color green "//.*$"
  1572.  
  1573. #####################################################################################################################
  1574.  
  1575. ## File Types (C)ryszardzonk
  1576. ##include "/usr/share/nano/mimetype.nanorc"
  1577.  
  1578. syntax "mimetype" "mime.types"
  1579. icolor cyan "[.A-Z_]*/"
  1580. color brightwhite "/"
  1581. color green "[[:space:]].*$"
  1582. ## comments
  1583. color green "#.*$"
  1584.  
  1585. #####################################################################################################################
  1586.  
  1587. ## /etc/initng/ custom sh.nanorc
  1588. ##include "/usr/share/nano/initng.nanorc"
  1589.  
  1590. ## InitNG syntax
  1591. ##
  1592. syntax "initngscripts" "\.i$"
  1593. icolor brightgreen "^[0-9A-Z_]+\(\)"
  1594. color magenta "(daemon|virtual)"
  1595. color brightwhite "virtual/.*$"
  1596. color brightblack "daemon/.*$"
  1597. color yellow "(need|use|respawn|exec\ daemon|also_stop)"
  1598. color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
  1599. color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
  1600. color green "-[Ldefgruwx]\>"
  1601. color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
  1602. color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
  1603. icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
  1604. color cyan "(^|[[:space:]])#.*$"
  1605. color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
  1606.  
  1607. syntax "initng-settings" "system.virtual$" "\.runlevel$"
  1608. color magenta "daemon"
  1609. color cyan "system"
  1610. color blue "net"
  1611. color red "debug"
  1612.  
  1613. #####################################################################################################################
  1614.  
  1615. ## /etc/xml custom xml.nanorc
  1616. ##include "/usr/share/nano/etcxml.nanorc"
  1617.  
  1618. ##****************************************************************************
  1619. #
  1620. # Syntax highlighting for XML files (/etc/fonts/*)
  1621. #
  1622. # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
  1623. # License: GPL 2 or later
  1624. #
  1625. # Version: 2004-02-25
  1626. #
  1627. ##****************************************************************************
  1628.  
  1629. syntax "etcxml" "/etc/fonts/(\.|/|)" "/etc/xdg/(\.|/|)"
  1630. color white "^.+$"
  1631. color green start="<" end=">"
  1632. color cyan "<[^> ]+"
  1633. color cyan ">"
  1634. color yellow start="<!DOCTYPE" end="[/]?>"
  1635. color yellow start="<!--" end="-->"
  1636. color red "&[^;]*;"
  1637.  
  1638. syntax "etcxml2" "gentoorc$"
  1639. color white "^.+$"
  1640. color green start="<" end=">"
  1641. color cyan "<[^> ]+"
  1642. color cyan ">"
  1643. color yellow start="<!DOCTYPE" end="[/]?>"
  1644. color yellow start="<!--" end="-->"
  1645. color red "&[^;]*;"
  1646.  
  1647. #####################################################################################################################
  1648.  
  1649. ## sh.nanorc syntax for custom files
  1650. ##include "/usr/share/nano/shlike.nanorc"
  1651.  
  1652. ## Here is an example for Bourne shell scripts.
  1653. ##
  1654. syntax "shlike" "\.(m4|sub|guess)$" "missing$" "configure\.ac$" "config\.(charset|rpath|status)$" "configure$"
  1655. icolor brightgreen "^[0-9A-Z_]+\(\)"
  1656. color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
  1657. color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
  1658. color green "-[Ldefgruwx]\>"
  1659. color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
  1660. color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
  1661. icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
  1662. color cyan "(^|[[:space:]])#.*$"
  1663. color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
  1664.  
  1665. #####################################################################################################################
  1666.  
  1667. ## c.nanorc syntax for custom files
  1668. ##include "/usr/share/nano/clike.nanorc"
  1669.  
  1670.  
  1671. ## Here is an example for C/C++.
  1672. ##
  1673. syntax "clike" "\.(m|pch)$"
  1674. color brightred "\<[A-Z_][0-9A-Z_]+\>"
  1675. color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
  1676. color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
  1677. color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
  1678. color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
  1679. color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
  1680. color magenta "\<(goto|continue|break|return)\>"
  1681. color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
  1682. color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
  1683. ##
  1684. ## GCC builtins
  1685. color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
  1686. ##
  1687. ## String highlighting. You will in general want your comments and
  1688. ## strings to come last, because syntax highlighting rules will be
  1689. ## applied in the order they are read in.
  1690. color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
  1691. ##
  1692. ## This string is VERY resource intensive!
  1693. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
  1694.  
  1695. ## Comment highlighting
  1696. color brightblue "//.*"
  1697. color brightblue start="/\*" end="\*/"
  1698.  
  1699.  
  1700. #####################################################################################################################
  1701.  
  1702. ## EKG History view (C)ryszardzonk
  1703. ##include "/usr/share/nano/ekghistory.nanorc"
  1704.  
  1705. syntax "ekghistory" "(\.|/|)/.gg/history"
  1706. icolor cyan start="<" end=">"
  1707. icolor green ",(\\.|[^\"])*,"
  1708. color yellow "chatrecv"
  1709. color cyan "chatsend"
  1710. color brightwhite "[0-9]"
  1711.  
  1712.  
  1713.  
  1714. #####################################################################################################################
  1715. ## others (C)ryszardzonk
  1716. ##include "/usr/share/nano/others.nanorc"
  1717.  
  1718. syntax "makefile" "(m|M)akefile$" "\.mak$"
  1719. icolor yellow start="^[[:space:]]*[.0-9A-Z_]" end="\=[[:space:]]|\:|\:\:|\/"
  1720. color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include"
  1721. icolor cyan start="\{" end="\}"
  1722. icolor cyan start="\(" end="\)"
  1723. color brightyellow "\$"
  1724. color green "#.*$"
  1725.  
  1726. syntax "infile" ".in$" ".am$"
  1727. icolor brightgreen start="\{" end="\}"
  1728. color magenta "(if[[:space:]]|endif|else)"
  1729. color yellow "^[[:space:]]*[.0-9A-Z_](\\.|[^\"])*(\=|\:)"
  1730. color cyan "\((\\.|[^\"])*\)"
  1731. color cyan "@(\\.|[^\"])*@"
  1732. color brightblack "(\-[.a-z]*|\HAVE[.a-zA-Z_]*)"
  1733. color yellow "\/"
  1734. color brightblue ""(\\.|[^\"])*""
  1735. color brightyellow "(\$|dnl.*$)"
  1736. color green "#.*$"
  1737.  
  1738.  
  1739. syntax "spec" ".spec$"
  1740. color brightwhite "[0-9]"
  1741. color cyan "stub"
  1742. color yellow "pascal|stdcall|varargs|cdecl"
  1743. color brightyellow "\((\\.|[^\"])*\)"
  1744. color brightgreen "\@"
  1745. color green "#.*$"
  1746.  
  1747. syntax "configurelog" "config.log$"
  1748. color cyan "(\:.*$|\=.*$)"
  1749. color yellow ""(\\.|[^\"])*""
  1750. color magenta "[.0-9A-Z_a-z]*:"
  1751. color yellow "[.A-Z_a-z]*:[0-9]*:"
  1752. color cyan start="\/\*" end="\*\/"
  1753. color brightgreen "[[:space:]]yes"
  1754. color brightred "[[:space:]]no"
  1755. color green "#.*$"
  1756. color brightgreen "\|.*$"
  1757.  
  1758. syntax "texi" ".texi$"
  1759. color brightcyan "\((\\.|[^\"])*\)"
  1760. color yellow "(\{|\})"
  1761. color brightblue "\$"
  1762. color brightblack "\[(\\.|[^\"])*\]"
  1763. color brightyellow "@[.a-zA-Z_]*"
  1764. color cyan "^[[:space:]]*[.a-zA-Z_]*\:"
  1765. color brightred "@c[.a-zA-Z_]*"
  1766. color green "#.*$"
  1767.  
  1768.  
  1769. syntax "desktop" "\.desktop$"
  1770. color brightblue "\[(\\.|[^\"])*\]"
  1771. color yellow "=.*$"
  1772. color brightgreen "\="
  1773.  
  1774. syntax "lua" "\.lua$"
  1775. color brightwhite "[0-9]"
  1776. color cyan "local.*$"
  1777. color brightblack "\{|\}"
  1778. color brightgreen "\="
  1779. color red "\[|\]"
  1780. color yellow "\"(\\.|[^\"])*\""
  1781. color green "\-\-.*$"
  1782.  
  1783. syntax "m3u" "\.m3u$"
  1784. color green "#.*$"
  1785. color brightgreen "http.*$"
  1786. color yellow "\/"
  1787. color cyan "[.0-9a-zA-Z_-]*\.mp3"
  1788.  
  1789. syntax "bat" "\.bat$"
  1790. color yellow "%(\\.|[^\"])*%"
  1791. color brightyellow "set[[:space:]]"
  1792. color brightgreen "\="
  1793. color green "REM.*$"
  1794.  
  1795. syntax "authors" "AUTHORS$"
  1796. color brightgreen "((T|t)ranslators|(D|d)ocumenters|(A|a)uthors|(C|c)ontributors)"
  1797. color brightyellow "<(\\.|[^\"])*>"
  1798. color yellow "\@"
  1799. color cyan "\*.*$"
  1800. color brightcyan "\:"
  1801. color brightblue "\((\\.|[^\"])*\)"
  1802. color green "#.*$"
  1803.  
  1804. syntax "kconfig" "Kconfig$" "Kconfig.(cpu|debug)$"
  1805. color brightyellow "(<(\\.|[^\"])*>|\!)"
  1806. color brightyellow "\((\\.|[^\"])*\)"
  1807. color blue "source.*$"
  1808. color brightgreen "(ult[[:space:]]y|\"(\\.|[^\"])*\")"
  1809. color brightblue "ult[[:space:]]m"
  1810. color brightred "ult[[:space:]]n"
  1811. color magenta "default"
  1812. color cyan "config.*$"
  1813. color yellow "config|menu|(main|end)menu|choice|endchoice"
  1814. color brightcyan "(^[[:space:]](bool|def_bool|tristate|depends[[:space:]]on|select|prompt|range|help|string|int|hex))"
  1815. color brightmagenta "(\||\&)"
  1816. color brightred "\"off\""
  1817. color green "#.*$"
  1818.  
  1819. syntax "la_file" "\.la$"
  1820. icolor yellow "^[[:space:]]*[.0-9A-Z_]*="
  1821. color white "\="
  1822. color brightgreen "yes"
  1823. color brightred "no"
  1824. color brightwhite "[0-9]"
  1825. color brightyellow "'(\\.|[^\"])*'"
  1826. color green "#.*$"
  1827.  
  1828.  
  1829.  
  1830.  
  1831. #####################################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement