diff options
author | Justin Patera <serialhex@gmail.com> | 2016-10-23 07:43:31 +0300 |
---|---|---|
committer | Justin Patera <serialhex@gmail.com> | 2016-10-23 07:43:31 +0300 |
commit | 2f549bd546f626a5105dbd267d683dd8656e6eee (patch) | |
tree | 98baf9cff30ab1333cf4a0c2e4d90c91dfb0a1e0 | |
parent | eabd45004c389f4422a526eeccdd7bba20bdd006 (diff) | |
parent | b6f9a4a556f43ed399d549615c23450cd511b5a8 (diff) |
fixing merge conflict
-rw-r--r-- | LICENSE | 24 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | apache2.nanorc | 11 | ||||
-rw-r--r-- | apacheconf.nanorc | 1 | ||||
-rw-r--r-- | aptsrclist.nanorc | 21 | ||||
-rw-r--r-- | asm.nanorc | 10 | ||||
-rw-r--r-- | bash.nanorc | 29 | ||||
-rw-r--r-- | c.nanorc | 16 | ||||
-rw-r--r-- | changelog.nanorc | 19 | ||||
-rw-r--r-- | changelogs.nanorc | 5 | ||||
-rw-r--r-- | coffee.nanorc | 14 | ||||
-rw-r--r-- | conf.nanorc | 19 | ||||
-rw-r--r-- | config.nanorc | 1 | ||||
-rw-r--r-- | config2.nanorc | 1 | ||||
-rw-r--r-- | config3.nanorc | 1 | ||||
-rw-r--r-- | configfiles.nanorc | 1 | ||||
-rw-r--r-- | conky.nanorc | 4 | ||||
-rw-r--r-- | css.nanorc | 23 | ||||
-rw-r--r-- | cython.nanorc | 16 | ||||
-rw-r--r-- | debian.nanorc | 20 | ||||
-rw-r--r-- | delphi.nanorc | 2 | ||||
-rw-r--r-- | desc.nanorc | 1 | ||||
-rw-r--r-- | dotemacs.nanorc | 2 | ||||
-rw-r--r-- | dummy.nanorc | 3 | ||||
-rw-r--r-- | emailquote.nanorc | 4 | ||||
-rw-r--r-- | etc-stuff.nanorc | 5 | ||||
-rw-r--r-- | etcxml.nanorc | 29 | ||||
-rw-r--r-- | fortran.nanorc | 11 | ||||
-rw-r--r-- | gentoo.nanorc | 68 | ||||
-rw-r--r-- | groff.nanorc | 15 | ||||
-rw-r--r-- | haskell.nanorc | 30 | ||||
-rw-r--r-- | havp.nanorc | 1 | ||||
-rw-r--r-- | html.nanorc | 6 | ||||
-rw-r--r-- | info.nanorc | 2 | ||||
-rw-r--r-- | ini.nanorc | 21 | ||||
-rw-r--r-- | initng.nanorc | 2 | ||||
-rw-r--r-- | initscript.nanorc | 25 | ||||
-rw-r--r-- | java.nanorc | 6 | ||||
-rw-r--r-- | js.nanorc | 22 | ||||
-rw-r--r-- | lex.nanorc | 10 | ||||
-rw-r--r-- | log-stuff.nanorc | 6 | ||||
-rw-r--r-- | lua.nanorc | 48 | ||||
-rw-r--r-- | maincf.nanorc | 1 | ||||
-rw-r--r-- | makefile.nanorc | 21 | ||||
-rw-r--r-- | man.nanorc | 2 | ||||
-rw-r--r-- | markdown.nanorc | 43 | ||||
-rw-r--r-- | mcchangelog.nanorc | 19 | ||||
-rw-r--r-- | mimetype.nanorc | 3 | ||||
-rw-r--r-- | named.nanorc | 5 | ||||
-rw-r--r-- | nanorc.nanorc | 7 | ||||
-rw-r--r-- | paludis.nanorc | 140 | ||||
-rw-r--r-- | passwd.nanorc | 1 | ||||
-rw-r--r-- | patch.nanorc | 2 | ||||
-rw-r--r-- | perl.nanorc | 5 | ||||
-rw-r--r-- | php.nanorc | 14 | ||||
-rw-r--r-- | po.nanorc | 2 | ||||
-rw-r--r-- | pov.nanorc | 5 | ||||
-rw-r--r-- | privoxy.nanorc | 23 | ||||
-rw-r--r-- | profile.nanorc | 10 | ||||
-rw-r--r-- | python.nanorc | 24 | ||||
-rw-r--r-- | rcfiles.nanorc | 11 | ||||
-rw-r--r-- | reST.nanorc | 36 | ||||
-rw-r--r-- | ruby.nanorc | 16 | ||||
-rw-r--r-- | sh.nanorc | 13 | ||||
-rw-r--r-- | sourceslist.nanorc (renamed from sources_list.nanorc) | 8 | ||||
-rw-r--r-- | tab.nanorc | 1 | ||||
-rw-r--r-- | tcl.nanorc | 11 | ||||
-rw-r--r-- | tex.nanorc | 2 | ||||
-rw-r--r-- | todo.nanorc | 24 | ||||
-rw-r--r-- | txt2tags.nanorc | 13 | ||||
-rw-r--r-- | urls.nanorc | 11 | ||||
-rw-r--r-- | vhost.nanorc | 42 | ||||
-rw-r--r-- | xdefaults.nanorc | 1 | ||||
-rw-r--r-- | xml.nanorc | 11 | ||||
-rw-r--r-- | xorg.nanorc | 2 | ||||
-rw-r--r-- | yacc.nanorc | 15 |
76 files changed, 490 insertions, 614 deletions
@@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to <http://unlicense.org/> @@ -5,7 +5,7 @@ a spiffy collection of nano syntax highlighting files ----------------------------------------------------- *most* (ok, prettymuch all) of these have been stol\*COUGH\* politely included in this repository. proper -attribution follows at the end of it all... +attribution follows at the end of it all... Unless otherwise specified, all files are under the [unlicense](http://unlicense.org/) WTF do i need these stupid things for??? ---------------------------------------- @@ -37,7 +37,7 @@ then simply add the different \*.nanorc files that you want to use to your `~/.n include "~/.nano/python.nanorc" ## Bourne shell scripts - include "~/.nano/sh.nanorc" + include "~/.nano/bash.nanorc" ## CSS include "~/.nano/css.nanorc" @@ -77,6 +77,7 @@ config.nanorc etcxml.nanorc makefile.nanorc php.nanorc ### files from [scopatz / nanorc][] ('do whatever you want' licence) ### [scopatz / nanorc]: https://github.com/scopatz/nanorc +*his repo has since changed, see LICENSE for the new license these fall under* apacheconf.nanorc css.nanorc groff.nanorc man.nanorc patch.nanorc python.nanorc sh.nanorc asm.nanorc cython.nanorc html.nanorc markdown.nanorc perl.nanorc tex.nanorc c.nanorc diff --git a/apache2.nanorc b/apache2.nanorc index ab3a06a..564d700 100644 --- a/apache2.nanorc +++ b/apache2.nanorc @@ -1,7 +1,4 @@ -## Apache httpd.conf highlighting -## -#how to add sites-enabled files? "default" is too generic to keep in here I think -syntax "Apache2" "httpd.conf$" +syntax "apache2" "httpd.conf$" "(\.|/)vhost\.conf$" color brightwhite "(ServerRoot|LoadModule|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)" color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)" color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)" @@ -32,11 +29,7 @@ color magenta "[[:space:]]+[0-9]+[[:space:]]*" 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]))?" color brightcyan start="<" end=">" color white ""(\\.|[^\"])*"" -# Unix-based paths -# can't use \] in the regex for some reason?!? Maybe a bug? -# this is preventing a 100% "to the end of the line" match for a few -# lines (the trailing characters from ] to the EOL are not highlighted. -# if anyone knows how to make it work, let me know.. ;) +# FIXME: Unix paths can't use \] in the regex for some reason?!? Maybe a bug? this is preventing a 100% "to the end of the line" match for a few lines (the trailing characters from ] to the EOL are not highlighted. color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+" color green "^[[:space:]]*#.*" color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>" diff --git a/apacheconf.nanorc b/apacheconf.nanorc index 5be43e0..ce38f23 100644 --- a/apacheconf.nanorc +++ b/apacheconf.nanorc @@ -1,4 +1,3 @@ -# Apache files syntax "apacheconf" "httpd\.conf|mime\.types|\.conf$" color yellow ".+" color brightcyan "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)" diff --git a/aptsrclist.nanorc b/aptsrclist.nanorc index 82ea805..379cb36 100644 --- a/aptsrclist.nanorc +++ b/aptsrclist.nanorc @@ -1,17 +1,20 @@ -## syntax highlighting for /etc/apt/sources.list - syntax "apt/sources.list" "sources\.list(\.old|~)?$" -# component +## Component color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/) [^ ]+ .+$" -# distribution + +## Distribution color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/) [^ ]+" -# URI + +## URI color brightgreen "(http|file|ftp):/[^ ]+" -# cdroms -# [^\]] does not workÉ + +## CD-ROMs +# FIXME: [^\]] does not work. color brightgreen "cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/" -# deb / deb-src + +## deb / deb-src color cyan "^deb" color brightblue "^deb-src" -# comments + +## Comments color brightyellow "#.*" @@ -1,5 +1,3 @@ -## assembler. -## syntax "asm" "\.(S|s|asm)$" color red "\<[A-Z_]{2,}\>" color brightgreen "\.(data|subsection|text)" @@ -7,12 +5,16 @@ color green "\.(align|file|globl|global|hidden|section|size|type|weak)" color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)" icolor brightred "^[[:space:]]*[.0-9A-Z_]*:" color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" -## Highlight strings (note: VERY resource intensive) + +## Strings +# NOTE: Very resource intensive. color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + ## Highlight comments color brightblue ";.*" color brightblue "//.*" color brightblue start="/\*" end="\*/" -## Highlight trailing whitespace + +## Trailing whitespace color ,green "[[:space:]]+$" diff --git a/bash.nanorc b/bash.nanorc index fbef81d..3e9eb99 100644 --- a/bash.nanorc +++ b/bash.nanorc @@ -1,36 +1,29 @@ -# Bash Syntax Highlighting -# -# Bram Schoenmakers <me@bramschoenmakers.nl> -# -# Version 1.1 - -syntax "bash" "\.sh$" "\.bash$" +syntax "bash" "\.sh$" "\.bash$" "/.bash_profile$" "(\.|/)profile$" "\rc$" "(\.|/)control$" header "^#!.*/(ba|k|pdk)?sh[-0-9_]*" -# Some Bash syntax first - -# Control +## Control color magenta "\<(if|else|for|function|case|esac|in|select|until|while|do|elif|then|set|\.|done|fi)\>" -# Brackets and redirects +## Brackets and redirects color yellow "[(){}[;|<>]" color yellow "\]" -# Builtins +## Builtins color red "\<(source|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|suspend|test|times|trap|type|ulimit|umask|unalias|wait)\>" -# Unix Commands +## Unix Commands color red "\<(arch|awk|bash|bunzip2|bzcat|bzcmp|bzdiff|bzegrep|bzfgrep|bzgrep|bzip2|bzip2recover|bzless|bzmore|cat|chattr|chgrp|chmod|chown|chvt|cp|date|dd|deallocvt|df|dir|dircolors|dmesg|dnsdomainname|domainname|du|dumpkeys|echo|ed|egrep|false|fgconsole|fgrep|fuser|gawk|getkeycodes|gocr|grep|groups|gunzip|gzexe|gzip|hostname|igawk|install|kbd_mode|kbdrate|killall|last|lastb|link|ln|loadkeys|loadunimap|login|ls|lsattr|lsmod|lsmod.old|mapscrn|mesg|mkdir|mkfifo|mknod|mktemp|more|mount|mv|nano|netstat|nisdomainname|openvt|pgawk|pidof|ping|ps|pstree|pwd|rbash|readlink|red|resizecons|rm|rmdir|run-parts|sash|sed|setfont|setkeycodes|setleds|setmetamode|setserial|sh|showkey|shred|sleep|ssed|stat|stty|su|sync|tar|tempfile|touch|true|umount|uname|unicode_start|unicode_stop|unlink|utmpdump|uuidgen|vdir|wall|wc|ypdomainname|zcat|zcmp|zdiff|zegrep|zfgrep|zforce|zgrep|zless|zmore|znew|zsh)\>" -# More Unix Commands -color red "\<(aclocal|aconnect|aplay|apm|apmsleep|apropos|ar|arecord|as|as86|autoconf|autoheader|automake|awk|basename|bc|bison|c\+\+|cal|cat|cc|cdda2wav|cdparanoia|cdrdao|cd-read|cdrecord|chfn|chgrp|chmod|chown|chroot|chsh|clear|cmp|co|col|comm|cp|cpio|cpp|cut|dc|dd|df|diff|diff3|dir|dircolors|directomatic|dirname|du|env|expr|fbset|file|find|flex|flex\+\+|fmt|free|ftp|funzip|fuser|g\+\+|gawk|gc|gcc|gdb|getent|getopt|gettext|gettextize|gimp|gimp-remote|gimptool|gmake|gs|head|hexdump|id|install|join|kill|killall|ld|ld86|ldd|less|lex|ln|locate|lockfile|logname|lp|lpr|ls|lynx|m4|make|man|mkdir|mknod|msgfmt|mv|namei|nasm|nawk|nice|nl|nm|nm86|nmap|nohup|nop|od|passwd|patch|pcregrep|pcretest|perl|perror|pidof|pr|printf|procmail|prune|ps2ascii|ps2epsi|ps2frag|ps2pdf|ps2ps|psbook|psmerge|psnup|psresize|psselect|pstops|rcs|rev|rm|scp|sed|seq|setterm|shred|size|size86|skill|slogin|snice|sort|sox|split|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|stat|strings|strip|sudo|suidperl|sum|tac|tail|tee|test|tr|uniq|unlink|unzip|updatedb|updmap|uptime|users|vmstat|w|wc|wget|whatis|whereis|which|who|whoami|write|xargs|yacc|yes|zip|zsoelim)\>" +## More Unix Commands +color red "\<(aclocal|aconnect|aplay|apm|apmsleep|apropos|ar|arecord|as|as86|autoconf|autoheader|automake|awk|basename|bc|bison|c\+\+|cal|cat|cc|cdda2wav|cdparanoia|cdrdao|cd-read|cdrecord|chfn|chgrp|chmod|chown|chroot|chsh|clear|cmp|co|col|comm|cp|cpio|cpp|cut|dc|dd|df|diff|diff3|dir|dircolors|directomatic|dirname|du|env|expr|fbset|file|find|flex|flex\+\+|fmt|free|ftp|funzip|fuser|g\+\+|gawk|gc|gcc|gdb|getent|getopt|gettext|gettextize|gimp|gimp-remote|gimptool|gmake|gs|head|hexdump|id|install|join|kill|killall|ld|ld86|ldd|less|lex|ln|locate|lockfile|logname|lp|lpr|ls|lynx|m4|make|man|mkdir|mknod|msgfmt|mv|namei|nasm|nawk|nc|nice|nl|nm|nm86|nmap|nohup|nop|od|passwd|patch|pcregrep|pcretest|perl|perror|pidof|pr|printf|procmail|prune|ps2ascii|ps2epsi|ps2frag|ps2pdf|ps2ps|psbook|psmerge|psnup|psresize|psselect|pstops|rcs|rev|rm|scp|sed|seq|setterm|shred|size|size86|skill|slogin|snice|sort|sox|split|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|stat|strings|strip|sudo|suidperl|sum|tac|tail|tee|test|tr|uniq|unlink|unzip|updatedb|updmap|uptime|users|vmstat|w|wc|wget|whatis|whereis|which|who|whoami|write|xargs|yacc|yes|zip|zsoelim)\>" -# Strings +## Strings color blue "\"(\\.|[^\"])*\"" color blue "'(\\.|[^\'])*'" -# Variables, keep it below the strings, such that vars are highlighted inside strings. +## Variables +# NOTE: Keep this section below the Strings section, such that Variables are highlighted inside strings. color cyan start="[$@%]" end="([[:alnum:]]|_)*" -# Comments +## Comments color green "#.*$" @@ -1,5 +1,3 @@ -## C/C++. -## syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" color brightred "\<[A-Z_][0-9A-Z_]+\>" color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" @@ -10,19 +8,17 @@ color brightyellow "\<(try|throw|catch|operator|new|delete)\>" color magenta "\<(goto|continue|break|return)\>" color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" -## + ## GCC builtins color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" -## -## String highlighting. You will in general want your comments and -## strings to come last, because syntax highlighting rules will be -## applied in the order they are read in. + +## Strings +# NOTE: You will in general want your comments and strings to come last, because syntax highlighting rules will be applied in the order they are read in. color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" -## -## This string is VERY resource intensive! +# NOTE: Very resource intensive. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" -## Comment highlighting +## Comments color brightblue "//.*" color brightblue start="/\*" end="\*/" diff --git a/changelog.nanorc b/changelog.nanorc index d465206..70fede8 100644 --- a/changelog.nanorc +++ b/changelog.nanorc @@ -1,4 +1,5 @@ syntax "changelog" "ChangeLog$" + color brightgreen "^\+.*" color green "^\+\+\+.*" color brightblue "^ .*" @@ -7,21 +8,3 @@ color red "^---.*" color red "(\d\d\s\w\+\s\d\{4\})" color brightyellow "^@@.*" color magenta "^diff.*" - -#syn region GentooChangeLogRelease start=/^\*/ end=/$/ contains=GentooChangeLogReleaseDate -#syn match GentooChangeLogReleaseDate contained /(\d\d\s\w\+\s\d\{4\})/ -#syn region GentooChangeLogEntry start=/^\s\+/ end=/\n\n/ -# \ contains=GentooChangeLogEntryDate,GentooBug -#syn region GentooChangeLogEntryDate contained start=/\d\?\d\s\w\+\s\d\{4\}/ end=/;/ -# \ nextgroup=GentooChangeLogEntryAuthor,GentooChangeLogEntryEmail skipwhite skipnl -#syn region GentooChangeLogEntryAuthor contained start=/\S/ end=/\( <\)\@=/ -# \ nextgroup=GentooChangeLogEntryEmail skipwhite skipnl -#syn match GentooChangeLogEntryEmail contained /<\?[a-zA-Z0-9\.\-\_]\+@[a-zA-Z0-9\.\-\_]\+>\?/ -# \ nextgroup=GentooChangeLogFiles skipwhite skipnl -#syn region GentooChangeLogFiles contained start=/\(\S\)\@=/ end=/:/ -# \ contains=GentooChangeLogAddFile,GentooChangeLogDelFile,GentooChangeLogModFile -#" Add / delete / changed files -#syn region GentooChangeLogAddFile contained start=/+/ end=/\([,:]\)\@=/ -#syn region GentooChangeLogDelFile contained start=/-/ end=/\([,:]\)\@=/ -#syn region GentooChangeLogModFile contained start=/[a-zA-Z0-9]/ end=/\([,:]\)\@=/ - diff --git a/changelogs.nanorc b/changelogs.nanorc index 791e9cd..6d9ec57 100644 --- a/changelogs.nanorc +++ b/changelogs.nanorc @@ -1,5 +1,3 @@ -## Changelog file syntax -## syntax "changelogs" "ChangeLog*$" "HISTORY$" "NEWS$" color green "\+" @@ -8,7 +6,8 @@ color brightwhite "[0-9]" color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" color blue "[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]" color blue "[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]" -color blue "\<(CEST|CET|CST|CDT|EDT)\>" +# NOTE: Alphabetical timezone codes are goofy, and this is hardly an exhaustive list of them. +color blue "\<(CEST|CET|CST|CDT|EDT|UTC)\>" color yellow "[0-9]\..*$" color cyan "\*.*$" color brightblue "\<(pre.*$|beta.*$|rc.*$|release.*$)\>" diff --git a/coffee.nanorc b/coffee.nanorc index 620ee0b..d6b4949 100644 --- a/coffee.nanorc +++ b/coffee.nanorc @@ -1,28 +1,28 @@ syntax "coffee" "\.coffee$" -## Decimal, octal and hexadecimal numbers. +## Decimal, octal and hexadecimal numbers color red "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" -## Floating-point numbers. +## Floating-point numbers color red "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color red "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" -## Keywords and punctuation of similar purpose. +## Keywords and punctuation of similar purpose color brightblue "\<(break|case|catch|continue|default|delete|do|else|finally)\>" color brightblue "\<(and|by|class|do|extends|for|function|if|isnt|is|in|instanceof|new|null|of|return|switch)\>" color brightblue "\<(switch|this|throw|try|typeof|until|undefined|var|void|while|when|with)\>" color brightblue "(->|=|\.\.|<|>|\|\|&&|!)" -## Type specifiers and special types. +## Type specifiers and special types color magenta "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" color magenta "\<(Number|Object|RegExp|String)\>" color magenta "\<(true|yes|on|false|off|no)\>" -## Strings. +## Strings color green "L?\"(\\"|[^"])*\"" color green "L?'(\'|[^'])*'" -## Escapes. +## Escapes color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" -## Comments. +## Comments color cyan "#\ .*$"
\ No newline at end of file diff --git a/conf.nanorc b/conf.nanorc index 6dac74a..d082a0f 100644 --- a/conf.nanorc +++ b/conf.nanorc @@ -1,21 +1,18 @@ -# Generic *.conf file syntax highlighting -# +syntax "conf" "\.c(onf|nf|fg)$" -syntax "conf" "\.(c(onf|nf|fg))$" - -# string +# Strings icolor yellow ""(\\.|[^"])*"" -# variable name & value +# Variable name and value icolor brightyellow start="=" end="$" -icolor magenta start="(^|[[:space:]])[0-9a-z-]" end="=" +icolor magenta start="^[[:space:]]*[0-9a-z-]" end="=" -# bracket/parenthesis +# Braces and parentheses icolor brightred "(^|[[:space:]])((\[|\()[0-9a-z_!@#$%^&*-]+(\]|\)))" -# number -color green "[[:space:]][0-9.KM]+" +# Numbers +icolor green "[[:space:]][0-9]+[0-9.]*[KMGT]*" -# comment +# Comments color cyan start="(^|[[:space:]])(#|;).*$" end="$" color brightblue "(^|[[:space:]])(#|;)" diff --git a/config.nanorc b/config.nanorc index 9fd227f..a62431f 100644 --- a/config.nanorc +++ b/config.nanorc @@ -1,4 +1,3 @@ -### several config files syntax "config" "(\.|/)config$" "(\.|/)logout$" "(\.|/)COLORS$" "(\.|/)colors$" color red "/.*$" "TERM" "\..*$" "=.*$" "\*.*$" color white ":unscaled" "[0-9]" diff --git a/config2.nanorc b/config2.nanorc index 5ea3b80..7b160b4 100644 --- a/config2.nanorc +++ b/config2.nanorc @@ -1,4 +1,3 @@ -### more config files syntax "config2" "(\.|/)env$" "(\.|/)server.$" "hosts" "gpm" "local.*$" "bootsplash" "crypto-loop" color red "/.*$" "http\:\/\/.*$" color white ":unscaled" diff --git a/config3.nanorc b/config3.nanorc index 63fe000..31a8bcd 100644 --- a/config3.nanorc +++ b/config3.nanorc @@ -1,4 +1,3 @@ -### even more config files ;-) syntax "config3" "iptables" "ntp.*$" "rsyncd" "xfs" "saslauthd" "timidity" "net.*$" "hdparm" "esound" "login.*$" color red "/.*$" "http\:\/\/.*$" ""(\\.|[^\"])*"" "\<(server)\>" "\<(logfile)\>""\<(driftfile)\>" color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/" diff --git a/configfiles.nanorc b/configfiles.nanorc index e9e90cb..c0da07a 100644 --- a/configfiles.nanorc +++ b/configfiles.nanorc @@ -1,4 +1,3 @@ -### all *conf files (e.g. make.conf, xorg.conf, grub.conf, make.globals, Xfce files...) syntax "configfiles" "(\.|/)conf$" "(\.|/)ample$" "(\.|/)globals$" "xfce.*$" "syslog-ng" "sudoers" color brightwhite "\<(alias)\>" color blue "<(\\.|[^'])*>" diff --git a/conky.nanorc b/conky.nanorc index b0b7a87..651ee8e 100644 --- a/conky.nanorc +++ b/conky.nanorc @@ -1,6 +1,4 @@ -## Conky config highlighting -## -syntax "Conky" ".conkyrc$" +syntax "conky" ".conkyrc$" color brightblue "(use_spacer|background|use_xft|xftfont|xftalpha)" color brightblue "(mail_spool|update_interval|own_window)" color brightblue "(double_buffer|minimum_size)" @@ -1,19 +1,8 @@ -############################################################################## -# -# Syntax highlighting for CSS files -# -# Author: Simon Rupf, simon.rupf(a)int-ag.ch -# License: GPL 2 or later -# -# Version: 2005-02-14 -# -############################################################################## - syntax "css" "\.css$" -color brightred "." -color brightyellow start="\{" end="\}" -color brightwhite start=":" end="[;^\{]" -color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" -color brightblue start="\/\*" end="\\*/" -color green ";|:|\{|\}" +color brightred "." +color brightyellow start="\{" end="\}" +color brightwhite start=":" end="[;^\{]" +color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" +color brightblue start="\/\*" end="\\*/" +color green ";|:|\{|\}" diff --git a/cython.nanorc b/cython.nanorc index ab71a82..4775100 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -1,30 +1,26 @@ -## Cython nanorc, based off of Python nanorc. -## syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$" icolor brightred "def [ 0-9A-Z_]+" icolor brightred "cpdef [ 0-9A-Z_]+\(.\*?\):" icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.\*?\):" - - -# Python Keyword Color +## Python keywords color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" color brightmagenta "\<(continue|break|return)\>" -# Cython Keyword Color +## Cython keywords color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>" color red "\<(bint|char|double|int|public|void)\>" -#Operator Color +## Operators color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" -#Parenthetical Color +## Braces and parentheses color magenta "[(){}]" "\[" "\]" -#String Color +## Strings color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" -# Comment Color +## Comments color brightblue "#.*$" diff --git a/debian.nanorc b/debian.nanorc deleted file mode 100644 index a945dee..0000000 --- a/debian.nanorc +++ /dev/null @@ -1,20 +0,0 @@ -## Here is an exmaple for apt's sources.list -## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano -## (mail@milianw.de). -## -syntax "apt/sources.list" "sources\.list(\.old|~)?$" -# component -color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+ .+$" -# distribution -color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+" -# URI -color brightgreen "(http|file|ftp):/[^ ]+" -# cdroms -# [^\]] does not work... -color brightgreen "cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/" -# deb / deb-src -color yellow "^deb" -color yellow "^deb-src" -# comments -color brightblue "#.*" - diff --git a/delphi.nanorc b/delphi.nanorc index 147eca2..4a5af81 100644 --- a/delphi.nanorc +++ b/delphi.nanorc @@ -1,4 +1,4 @@ -syntax "Delphi Source" "\.pas$" +syntax "delphi" "\.pas$" color brightcyan "\<(boolean|byte|char|double|float|integer|long|new|short|this|transient|void)\>" color brightred "\<(break|case|catch|continue|default|do|else|finally|for|if|then|return|switch|throw|try|while|function)\>" #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)\>" diff --git a/desc.nanorc b/desc.nanorc index ac3a341..209004d 100644 --- a/desc.nanorc +++ b/desc.nanorc @@ -1,4 +1,3 @@ -### all *desc files ( e.g. use.desc, use.local.desc ) syntax "use" "(\.|/)desc$" color green ".*\-" color white "\:.*$" diff --git a/dotemacs.nanorc b/dotemacs.nanorc index dc2f0aa..f5f455d 100644 --- a/dotemacs.nanorc +++ b/dotemacs.nanorc @@ -1,2 +1,2 @@ syntax "dotemacs" "^.emacs$" -color green "^;.*" +color green "^;.*" diff --git a/dummy.nanorc b/dummy.nanorc index a69e53c..e7791b4 100644 --- a/dummy.nanorc +++ b/dummy.nanorc @@ -1,8 +1,7 @@ ########################################################################## -########################################################################## # # -# D U M M Y Ruleset +# Dummy ruleset # # # If you want to create your own rules you can use this simple example: diff --git a/emailquote.nanorc b/emailquote.nanorc index 94b7909..21d82c5 100644 --- a/emailquote.nanorc +++ b/emailquote.nanorc @@ -1,4 +1,2 @@ -## Email quoting -## -syntax "emailquote" +syntax "emailquote" "/tmp/mutt-*" color green "^>.*" diff --git a/etc-stuff.nanorc b/etc-stuff.nanorc index e3980e8..95c244b 100644 --- a/etc-stuff.nanorc +++ b/etc-stuff.nanorc @@ -1,5 +1,3 @@ -## /etc/ stuff syntax -## #syntax "etcconf.d" "conf.d/(\.|/)" #color magenta "\".*$" #color blue "#.*$" @@ -135,7 +133,6 @@ color blue "\{|\}" color brightblack "\=" color green "#.*$" -#this on may need fewer colors ;) syntax "squidconf" "squid.conf$" color brightyellow "(http_port|hierarchy_stoplist|maximum_object_size|cache_dir|dns_testnames)" color brightyellow "(coredump_dir|pipeline_prefetch|cache_mgr|visible_hostname|ftp_user|client_netmask)" @@ -212,7 +209,6 @@ color brightblue "-.*$" color brightwhite "\=" color green "#.*$" -## these colors need to change... syntax "udevrules" "\.rules$" color brightwhite "[0-9]" color brightblack "(ACTION|SUBSYSTEM|DEVPATH|OPTIONS|WAIT_FOR_SYSFS|ENV|KERNEL|NAME|MODE|GROUP|SYMLINK|DRIVERS|PROGRAM|RUN)" @@ -362,7 +358,6 @@ color brightred "no" color brightgreen "yes" color green "#.*$" -#these look stupid if you ask me, but hey do better :P syntax "protocols" "protocols$" icolor brightgreen "[0-9][[:space:]][[:space:]]*[.A-Z0-9-]*" icolor brightblue "[.a-z0-9][[:space:]][[:space:]]*[.0-9]" diff --git a/etcxml.nanorc b/etcxml.nanorc index 63b09b9..3d0821d 100644 --- a/etcxml.nanorc +++ b/etcxml.nanorc @@ -1,29 +1,8 @@ -############################################################################## -# -# Syntax highlighting for XML files (/etc/fonts/*) -# -# Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org -# License: GPL 2 or later -# -# Version: 2004-02-25 -# -############################################################################## - syntax "etcxml" "/etc/fonts/(\.|/)" "/etc/xdg/(\.|/)" color white "^.+$" -color green start="<" end=">" -color cyan "<[^> ]+" -color cyan ">" +color green start="<" end=">" +color cyan "<[^> ]+" +color cyan ">" color yellow start="<!DOCTYPE" end="[/]?>" color yellow start="<!--" end="-->" -color red "&[^;]*;" - -syntax "etcxml2" "gentoorc$" -color white "^.+$" -color green start="<" end=">" -color cyan "<[^> ]+" -color cyan ">" -color yellow start="<!DOCTYPE" end="[/]?>" -color yellow start="<!--" end="-->" -color red "&[^;]*;" - +color red "&[^;]*;" diff --git a/fortran.nanorc b/fortran.nanorc index 10c7730..fad848a 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -1,8 +1,5 @@ -## Fortran 90/95 - syntax "fortran" "\.(f|f90|f95|for)$" -#color red "\<[A-Z_]a[0-9A-Z_]+\>" color red "\<[0-9]+\>" icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>" @@ -33,14 +30,14 @@ icolor yellow "\<(.or.|repeat|select case|then|where|while)\>" icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>" -#Operator Color +## Operators color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" -#Parenthetical Color +## Braces and parentheses color magenta "[(){}]" "\[" "\]" -## String highlighting. +## Strings icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" -## Comment highlighting +## Comments icolor brightred "^!.*" "^c.*" "^C.*" diff --git a/gentoo.nanorc b/gentoo.nanorc index f2a80d9..0983b3b 100644 --- a/gentoo.nanorc +++ b/gentoo.nanorc @@ -1,18 +1,22 @@ -## ebuilds/eclasses -## +### ebuilds/eclasses syntax "ebuild" "\.e(build|class)$" -## All the standard portage functions + +## Standard portage functions color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" -## Highlight bash related syntax + +## Bash related syntax color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>" color green "(\{|\}|\(\)|\;|\]|\[|`|\\|\$|<|>|!|=|&)" color green "-(e|d|f|r|g|u|w|x|L)\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" -## Highlight variables ... official portage ones in red, all others in bright red + +## Variables +# NOTE: Official portage variables in red, others in bright red. color brightred "\$\{?[a-zA-Z_0-9]+\}?" color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>" color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" -## Highlight portage commands + +## Portage commands color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*" color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>" color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>" @@ -20,31 +24,57 @@ color brightblue "\<(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|conf color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" color brightblue "\<(doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" -## Highlight common commands used in ebuilds + +## Common commands used in ebuilds color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" -## Highlight comments (doesnt work that well) + +## Comments +# NOTE: Not reliable. color yellow "#.*$" -## Highlight strings (doesnt work that well) + +## Strings +# NOTE: Not reliable. color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" -## Trailing space is bad! + +## Trailing whitespace color ,green "[[:space:]]+$" -## Portage control files -## + + +### Portage control files syntax "/etc/portage" "\.(keywords|mask|unmask|use)$" -## Base text: + +## Base text color green "^.+$" -## Use flags: + +## Use flags color brightred "[[:space:]]+\+?[a-zA-Z0-9_\-]+" color brightblue "[[:space:]]+-[a-zA-Z0-9_\-]+" -## Likely version numbers: + +## Likely version numbers color magenta "-[[:digit:]].*([[:space:]]|$)" -## Accepted arches: + +## Accepted arches color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>" color white "[[:space:]][~-]?\*" -## Categories: + +## Categories color cyan "^[[:space:]]*.*/" -## Masking regulators: + +## Masking regulators color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" -## Comments: + +## Comments color yellow "#.*$" + + + +### Gentoorc +syntax "gentoorc" "gentoorc$" +color white "^.+$" +color green start="<" end=">" +color cyan "<[^> ]+" +color cyan ">" +color yellow start="<!DOCTYPE" end="[/]?>" +color yellow start="<!--" end="-->" +color red "&[^;]*;" diff --git a/groff.nanorc b/groff.nanorc index 621351f..55ecf43 100644 --- a/groff.nanorc +++ b/groff.nanorc @@ -1,24 +1,31 @@ -## groff. -## syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac." -## The argument of .ds or .nr + +## Argument of .ds or .nr color cyan "^\.(ds|nr) [^[[:space:]]]*" + ## Single character escapes color brightmagenta "\\." -## Highlight the argument of \f or \s in the same color + +## Argument of \f or \s color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]" + ## Newlines color cyan "(\\|\\\\)n(.|\(..)" color cyan start="(\\|\\\\)n\[" end="]" + ## Requests color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" + ## Comments color yellow "^\.\\".*$" + ## Strings color green "(\\|\\\\)\*(.|\(..)" color green start="(\\|\\\\)\*\[" end="]" + ## Characters color brightred "\\\(.." color brightred start="\\\[" end="]" + ## Macro arguments color brightcyan "\\\\\$[1-9]" diff --git a/haskell.nanorc b/haskell.nanorc index d2b3f0d..8c6bdf0 100644 --- a/haskell.nanorc +++ b/haskell.nanorc @@ -1,30 +1,30 @@ -## Haskell syntax highlighting -## found here: http://www.wubutu.com/2011/05/syntax-highlighting-nano-ban.html syntax "haskell" "\.hs$" -## language words + +## Keywords color red "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]" color red "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]" color red "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)" -## lang symbols + +## Various symbols color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})" -## lang operators + +## Operators color magenta "(==|/=|&&|\|\||<|>|<=|>=)" -## lang symbols + +## Various symbols color cyan "(->|<-)" color magenta "\.|\$" -## data types -## color yellow "(Maybe|Double|Int|Integer|Float|Rational|Either|Char|String)" -## data constructors + +## Data constructors color magenta "(True|False|Nothing|Just|Left|Right|LT|EQ|GT)" -## data classes -color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)" -## other -## color yellow "'\\[ntfr]'" +## Data classes +color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)" -## strings +## Strings color yellow ""[^\"]*"" -## Comment highlighting + +## Comments color green "--.*" color green start="\{-" end="-\}" diff --git a/havp.nanorc b/havp.nanorc index 8c5cb9d..073d520 100644 --- a/havp.nanorc +++ b/havp.nanorc @@ -1,4 +1,3 @@ - syntax "havp" "havp.config$" color brightred "REMOVETHISLINE" color red "(deleteme|false)" diff --git a/html.nanorc b/html.nanorc index 257ae76..4705fac 100644 --- a/html.nanorc +++ b/html.nanorc @@ -1,5 +1,3 @@ -## HTML. -## -syntax "html" "\.html$" -color blue start="<" end=">" +syntax "html" "\.htm[l]?$" +color cyan start="<" end=">" color red "&[^;[[:space:]]]*;" diff --git a/info.nanorc b/info.nanorc index 1899196..0dc4e34 100644 --- a/info.nanorc +++ b/info.nanorc @@ -1,5 +1,3 @@ -## *.Info file syntax -## syntax "info" "Info.txt$" color green "[0-9]" color brightblue "\<(video|codec|bitrate|width|height|General|FileSize|Format|OveralBitRate|PlayTime)\>" @@ -1,17 +1,22 @@ -# ini highlighting syntax "ini" "\.ini(\.old|~)?$" -# values +## Values color brightred "=.*$" -# equal sign + +## Equal sign color green "=" -# numbers + +## Numbers color brightblue "-?[0-9\.]+\s*($|;)" -# ON/OFF + +## ON/OFF color brightmagenta "ON|OFF|On|Off|on|off\s*($|;)" -# sections + +## Sections color brightcyan "^\s*\[.*\]" -# keys + +## Keys color cyan "^\s*[a-zA-Z0-9_\.]+" -# comments + +## Comments color brightyellow ";.*$"
\ No newline at end of file diff --git a/initng.nanorc b/initng.nanorc index 7027952..2c845b5 100644 --- a/initng.nanorc +++ b/initng.nanorc @@ -1,5 +1,3 @@ -## InitNG syntax -## syntax "initngscripts" "\.i$" icolor brightgreen "^[0-9A-Z_]+\(\)" color magenta "(daemon|virtual)" diff --git a/initscript.nanorc b/initscript.nanorc index 0461ef6..89708ec 100644 --- a/initscript.nanorc +++ b/initscript.nanorc @@ -1,18 +1,18 @@ -## initscripts syntax (stolen from gentoo.nanorc) ;) -## syntax "initscript" "/etc/init.d/(\.|/)" -## All the standard portage functions -#color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" -## Highlight bash related syntax + +## Bash related syntax color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(\)|\;|\]|\[|`|\\|\$|<|>|!|=|&)" color green "-(e|d|f|r|g|u|w|x|L)\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" -## Highlight variables ... official portage ones in red, all others in bright red + +## Variables +# NOTE: Official portage variables are in red, others in bright red. color brightred "\$\{?[a-zA-Z_0-9]+\}?" color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>" color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" -## Highlight portage commands + +## Portage commands color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*" color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>" color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>" @@ -20,9 +20,14 @@ color brightblue "\<(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|conf color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" color brightblue "\<(doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" -## Highlight common commands used in ebuilds + +## Common commands used in ebuilds color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" -## Highlight comments (doesnt work that well) + +## Comments +# NOTE: Not reliable. color yellow "#.*$" -## Highlight strings (doesnt work that well) + +## Strings +# NOTE: Not reliable. color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" diff --git a/java.nanorc b/java.nanorc index 0eb966f..d7011ac 100644 --- a/java.nanorc +++ b/java.nanorc @@ -1,12 +1,14 @@ -## Java. -## syntax "java" "\.java$" color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" color red ""[^"]*"" color yellow "\<(true|false|null)\>" + +# Comments color blue "//.*" color blue start="/\*" end="\*/" color brightblue start="/\*\*" end="\*/" + +# Trailing whitespace color ,green "[[:space:]]+$" @@ -1,38 +1,32 @@ -### all *js files ( e.g. Firefox user.js, prefs.js ) +syntax "javascript" "\.js$" -## Old version - -#syntax "jsfiles" "(\.|/)js$" -#color green "//.*$" start="\/\*" end="\*\/" -#color blue "'(\\.|[^'])*'" -#color red ""(\\.|[^\"])*"" -#color brightgreen "\<(true)\>" -#color brightred "\<(false)\>" "http\:\/\/.*$" -#color brightmagenta "[0-9](\\.|[^\"])*)" - -## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting - -syntax "JavaScript" "\.(js)$" ## Default color white "^.+$" + ## Decimal, cotal and hexadecimal numbers color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" + ## Floating point number with at least one digit before decimal point color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" + ## Keywords color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>" color green "\<(for|function|if|in|instanceof|new|null|return|switch)\>" color green "\<(switch|this|throw|try|typeof|undefined|var|void|while|with)\>" + ## Type specifiers color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" color red "\<(Number|Object|RegExp|String)\>" color red "\<(true|false)\>" + ## String color brightyellow "L?\"(\\"|[^"])*\"" color brightyellow "L?'(\'|[^'])*'" + ## Escapes color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" + ## Comments color magenta start="/\*" end="\*/" color magenta "//.*$" @@ -1,11 +1,11 @@ -## Syntax highlighting for lex/flex input files syntax "lex" "\.(l|lex|flex)$" color red "%[^[[:space:]]]*" -## String highlighting. You will in general want your comments and -## strings to come last, because syntax highlighting rules will be -## applied in the order they are read in. + +## Strings +# NOTE: You will in general want your comments and strings to come last, because syntax highlighting rules will be applied in the order they are read in. color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" -## This string is VERY resource intensive! +# NOTE: Very resource intensive. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + ## Comments color brightblue start="/\*" end="\*/" diff --git a/log-stuff.nanorc b/log-stuff.nanorc index 7a1c036..0bce339 100644 --- a/log-stuff.nanorc +++ b/log-stuff.nanorc @@ -1,9 +1,3 @@ -## to have logs interpreted for you in just about 1000 ways use log analyzers -## this only helps in viewing them directly - -## TODO -# getdelta, others... - syntax "logs" "midentd.log$" "mldonkey.log$" color brightwhite "[0-9]" color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" @@ -1,33 +1,19 @@ -############################################################################## -# -# Lua syntax highlighting for Nano. -# -# Author: Matthew Wild <mwild1 (at) gmail.com> -# License: GPL 2 or later -# -# Version: 2007-06-06 -# -# Notes: Originally based on Ruby syntax rc by Josef 'Jupp' Schugt -############################################################################## - - -# Automatically use for '.lua' files syntax "lua" ".*\.lua$" -# General +## General color brightwhite ".+" -# Operators +## Operators color brightyellow ":|\*\*|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>" -# Statements +## Statements color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\>" -# Keywords +## Keywords color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\." color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\(" -# Standard library +## Standard library color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\>" color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|modf|pi|pow|rad|random|randomseed|sinh|tan)\>" color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>" @@ -37,36 +23,32 @@ color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>" color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>" color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>" -# File handle methods +## File handle methods color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>" -# false, nil, true +## false, nil, true color brightmagenta "\<(false|nil|true)\>" -# External files +## External files color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>" -# Numbers +## Numbers color red "\<([0-9]+)\>" -# Symbols +## Symbols color brightmagenta "(\(\)|\[|\]|\{|\})" -# Strings -#color green "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" - -# Strings +## Strings color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" -# Escapes +## Escapes color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)." - -# Shebang +## Shebang color brightcyan "^#!.*" -# Simple comments +## Simple comments color green "\-\-.*$" -# Multiline comments +## Multiline comments color green start="\-\-\[" end="]" diff --git a/maincf.nanorc b/maincf.nanorc index f11642e..47c7044 100644 --- a/maincf.nanorc +++ b/maincf.nanorc @@ -1,4 +1,3 @@ -### all *cf files (e.g. main.cf, Postfix ) syntax "maincf" "(\.|/)cf$" color magenta "\=.*$" color green "#.*$" diff --git a/makefile.nanorc b/makefile.nanorc index ae5cbf8..cf98c7f 100644 --- a/makefile.nanorc +++ b/makefile.nanorc @@ -1,25 +1,4 @@ -## my own - -#syntax "makefile" "(m|M)akefile$" "\.mak$" -#icolor yellow start="^[[:space:]]*[.0-9A-Z_]" end="\=[[:space:]]|\:|\:\:|\/" -#color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include" -#icolor cyan start="\{" end="\}" -#icolor cyan start="\(" end="\)" -#color brightyellow "\$" -#color green "#.*$" - -## taken form http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting - -#syntax "makefile" "^Makefile\.?" -#color red "[:=]" -#color magenta "\<(if|ifeq|else|endif)\>" -#color blue "\$\{.*}" -#color brightblue "\w+:" -#color green "#.*$" - -## two of the above compiled syntax "makefile" "(m|M)akefile$" "\.mak$" -#icolor yellow start="^[[:space:]]*[.0-9A-Z_]" end="\=[[:space:]]|\:|\:\:|\/" color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include" icolor cyan start="\{" end="\}" icolor cyan start="\(" end="\)" @@ -1,5 +1,3 @@ -## manpages. -## syntax "man" "\.[1-9]x?$" color green "\.(S|T)H.*$" color brightgreen "\.(S|T)H" "\.TP" diff --git a/markdown.nanorc b/markdown.nanorc index 145f5cf..968c605 100644 --- a/markdown.nanorc +++ b/markdown.nanorc @@ -1,33 +1,38 @@ -## found: http://lists.gnu.org/archive/html/help-nano/2006-08/msg00000.html -## edited by serialhex -## http://daringfireball.net/projects/markdown/syntax -syntax "markdown" "\.txt$" "\.text$" "\.md$" "\.markdown$" -# Quotations +syntax "markdown" "\.md$" "\.markdown$" + +## Quotations color cyan "^>.*" -# Emphasis + +## Emphasis color green "_[^_]*_" color green "\*[^\*]*\*" -# Strong emphasis + +## Strong emphasis color brightgreen "\*\*[^\*]*\*\*" color brightgreen "__[\_]*__" -# Underline headers + +## Underline headers color brightblue "^====(=*)" color brightblue "^----(-*)" -# Hash headers + +## Hash headers color brightblue "^#.*" -# Linkified URLs (and inline html tags) + +## Linkified URLs (and inline html tags) color brightmagenta start="<" end=">" -# Links + +## Links color brightmagenta "\[.*\](\([^\)]*\))?" -# Link id's: + +## Link id's: color brightmagenta "^\[.*\]:( )+.*" -# Code spans + +## Code spans color brightyellow "`[^`]*`" -# Code blocks -# disabled, because indented lines aren't always code blocks -# color brightyellow "^( ).*" -# Links and inline images + +## Links and inline images color brightmagenta start="!\[" end="\]" color brightmagenta start="\[" end="\]" -# Lists -color yellow "^( )*(\*|\+|\-|[0-9]+\.) "
\ No newline at end of file + +## Lists +color yellow "^( )*(\*|\+|\-|[0-9]+\.) " diff --git a/mcchangelog.nanorc b/mcchangelog.nanorc deleted file mode 100644 index 9f8a8cd..0000000 --- a/mcchangelog.nanorc +++ /dev/null @@ -1,19 +0,0 @@ -## Changelog file syntax -## -syntax "changelogs" "ChangeLog*" - -color green "\+" -color red "\-" -color brightwhite "[0-9]" -color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" -color blue "[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]" -color blue "[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]" -color blue "\<(CEST|CET|CST|CDT|EDT)\>" -color yellow "[0-9]\..*$" -color cyan "\*.*$" -color brightblue "\<(pre.*$|beta.*$|rc.*$|release.*$)\>" -color green "#.*$" -icolor brightred "^[[:space:]]*[.0-9A-Z_]*:" -color green "[[:space:]]*[.0-9A-Z_]*[[:space:]]*[.0-9A-Z_]*[[:space:]]<" -color brightyellow "<.*>$" -color brightwhite "commit[[:space:]]*[.0-9A-Z_]*$" diff --git a/mimetype.nanorc b/mimetype.nanorc index b8e0b42..10ef83f 100644 --- a/mimetype.nanorc +++ b/mimetype.nanorc @@ -2,5 +2,6 @@ syntax "mimetype" "mime.types" icolor cyan "[.A-Z_]*/" color brightwhite "/" color green "[[:space:]].*$" -## comments + +## Comments color green "#.*$" diff --git a/named.nanorc b/named.nanorc index c10d53c..3d3bd16 100644 --- a/named.nanorc +++ b/named.nanorc @@ -1,5 +1,3 @@ -## named.conf syntax -## syntax "named" "named.conf" color brightcyan "(\{|\}|\;)" @@ -9,6 +7,7 @@ color yellow "(type|file|allow\-update|notify)" color cyan "(directory|statistics\-file|forward\ first|forwarders|listen\-on\-v6|listen\-on|allow\-query)" color cyan "(query\-source\ address|pid\-file)" color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" -## comments + +## Comments color green "#.*$" color green "//.*$" diff --git a/nanorc.nanorc b/nanorc.nanorc index 8790bee..8a87095 100644 --- a/nanorc.nanorc +++ b/nanorc.nanorc @@ -1,16 +1,19 @@ -## nanorc. -## syntax "nanorc" "\.?nanorc$" + ## Possible errors and parameters icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$" + ## Keywords 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)\>" icolor green "^[[:space:]]*(set|unset|include|syntax)\>" + ## Colors icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" + ## Strings icolor white ""(\\.|[^"])*"" + ## Comments icolor brightblue "^[[:space:]]*#.*$" icolor cyan "^[[:space:]]*##.*$" diff --git a/paludis.nanorc b/paludis.nanorc index 4147fa9..433659a 100644 --- a/paludis.nanorc +++ b/paludis.nanorc @@ -1,7 +1,9 @@ syntax "bashrc" "bashrc$" -## Base text: + +## Base text color brightblack "^.+$" -## sh syntax: + +## sh syntax color brightwhite "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" icolor magenta "(.+\)|\[.+\])" color brightwhite "(\{|\}|\(\)|\;|\]|\[|`|\\|\$|<|>|!|==|&)" @@ -13,115 +15,167 @@ color ,green "[[:space:]]+$" color green "\".*\"" color brightwhite "case[[:space:]]\".+\"" color brightgreen "\$\{.+\}" -## Package name: + +## Package name color brightmagenta "\$\{PN\}" -## Keywords: + +## Keywords color brightwhite "(CHOST|CFLAGS|CXXFLAGS|MAKEOPTS)=" color white "(SKIP_FUNCTIONS|PATH|CCACHE_SIZE|CCACHE_DIR|PALUDIS_USE_SAFE_RESUME)=" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" syntax "license-use" "(licenses|use)\.conf$" -## Base text: +## Base text color brightblack "^.+$" -## Package name: + +## Package name color brightblue "/.*[[:space:]]" -## Categories: + +## Categories color cyan "^.*/" -## Version number: + +## Version number color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*([[:space:]]|::)" -## Repository name: + +## Repository name color magenta "::.*[[:space:]]" -## licenses and use: + +## Licenses and use color green "[[:space:]][^[:space:]]*" color red "[[:space:]]-[^[:space:]]*" -## Masking regulators: + +## Masking regulators color brightred "^(<|<=|=|>=|>)*" color brightwhite "^(<|<=|=|>=|>)" -## Additional variables: + +## Additional variables color brightgreen "(ALSA_CARDS|INPUT_DEVICES|LANGUAGE|LINGUAS|VIDEO_CARDS|PALUDIS_HOOKS):?" -## Mark lines with spaces at end of it: + +## Trailing whitespace color brightred ".*[[:space:]]$" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" + + + syntax "keywords" "keywords\.conf$" -## Base text: + +## Base text color brightblack "^.+$" -## Package name: + +## Package name color brightblue "/.*[[:space:]]" -## Categories: + +## Categories color cyan "^.*/" -## Version number: + +## Version number color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*([[:space:]]|::)" -## Repository name: + +## Repository name color magenta "::.*[[:space:]]" -## Accepted arches: + +## Accepted arches color green "[[:space:]][~]?(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd|\*)" color red "-\*" -## Masking regulators: + +## Masking regulators color brightred "^(<|<=|=|>=|>)*" color brightwhite "^(<|<=|=|>=|>)" -## Mark lines with spaces at end of it: + +## Trailing whitespace color brightred ".*[[:space:]]$" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" + + + syntax "mask-unmask" "package_(mask|unmask)\.conf$" -## Base text: + +## Base text color brightblack "^.+$" -## Package name: + +## Package name color brightblue "/.*" -## Categories: + +## Categories color cyan "^.*/" -## Version number: + +## Version number color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*($|::)" -## Repository name: + +## Repository name color magenta "::.*$" -## Masking regulators: + +## Masking regulators color brightred "^(<|<=|=|>=|>)*" color brightwhite "^(<|<=|=|>=|>)" -## Mark lines with spaces at end of it: + +## Trailing whitespace color brightred ".*[[:space:]]$" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" + + + syntax "mirrors" "mirrors\.conf$" -## Base text: + +## Base text color red "^.+$" -## Serwer name: + +## Server name color brightwhite "^.*[[:space:]]" -## Adress + +## Address color brightblue "[[:space:]](ftp://|http://).*$" -## Mark lines with spaces at end of it: + +## Trailing whitespace color brightred ".*[[:space:]]$" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" + + + syntax "repositories" "repo" -## Base text: + +## Base text color brightblack "^.+$" -## Parameters: + +## Parameters color magenta "=[[:space:]].+$" color brightwhite "^.*[[:space:]]=[[:space:]]" -## Path: + +## Path color green "/.+" color brightgreen "\$\{.*\}" -## Adress: + +## Address: color brightblue "(svn\+https|svn\+http|http|rsync)://.*$" -## Mark lines with spaces at end of it: + +## Trailing whitespace color brightred ".*[[:space:]]$" -## Comments: + +## Comments color brightred "#.*$" color yellow "^#.*$" color brightyellow "^##[[:space:]].*$" diff --git a/passwd.nanorc b/passwd.nanorc index e450592..94a91d5 100644 --- a/passwd.nanorc +++ b/passwd.nanorc @@ -1,4 +1,3 @@ -### etc/passwd syntax "passwd" "(\.|/)passwd$" "(\.|/)shadow$" color white ".*$" color blue "\:.*$" diff --git a/patch.nanorc b/patch.nanorc index f4c9330..1e14b25 100644 --- a/patch.nanorc +++ b/patch.nanorc @@ -1,5 +1,3 @@ -## patch files. -## syntax "patch" "\.(patch|diff)$" color brightgreen "^\+.*" color green "^\+\+\+.*" diff --git a/perl.nanorc b/perl.nanorc index c875e68..d23c26e 100644 --- a/perl.nanorc +++ b/perl.nanorc @@ -1,10 +1,9 @@ -## Perl. -## syntax "perl" "\.p[lm]$" color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(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)\>" 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)\>" icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)" -color yellow "".*"|qq\|.*\|" +color yellow "qq\|.*\|" +color yellow ""([^"\\]++|\\.)*+"" color white "[sm]/.*/" color white start="(^use| = new)" end=";" color green "#.*" @@ -1,24 +1,24 @@ syntax "php" "\.php[2345s~]?$" -## php markings +## PHP inline tags color brightgreen "(<\?(php)?|\?>)" -## functions +## Functions color white "\<[a-z_]*\(" -## types +## Types color green "\<(var|float|global|double|bool|char|int|enum|const)\>" -## structure +## Structures color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>" -## control flow +## Basic control flow color magenta "\<(goto|continue|break|return)\>" -## strings +## Strings color brightyellow "<[^= ]*>" ""(\.|[^"])*"" -## comments +## Comments color brightblue "//.*" color brightblue start="/\*" end="\*/" @@ -1,5 +1,3 @@ -## *.po file syntax -## syntax "po" "\.po$" "\.pot$" color brightblue "\<(msgid|msgstr)\>" color brightred "\/" @@ -1,5 +1,3 @@ -## POV-Ray. -## syntax "pov" "\.(pov|POV|povray|POVRAY)$" color brightcyan "^[[:space:]]*#[[:space:]]*(declare)" color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>" @@ -10,6 +8,7 @@ color brightred "\<(light_source|background)\>" color brightred "\<(fog|object|camera)\>" color green "(\{|\}|\(\)|\;|\]|\[|`|\\|\$|<|>|!|=|&)" color brightmagenta "\<(union|group|subgroup)\>" -## Comment highlighting + +## Comments color brightblue "//.*" color brightblue start="/\*" end="\*/" diff --git a/privoxy.nanorc b/privoxy.nanorc index a98a161..ea9a250 100644 --- a/privoxy.nanorc +++ b/privoxy.nanorc @@ -1,4 +1,5 @@ syntax "privoxycfg" "(\.|/)privoxy/config$" + color brightwhite "[0-9]" color cyan "^[[:space:]]*[.a-z0-9-]*" color brightgreen "\ 1" @@ -7,13 +8,15 @@ color brightblue "\ \/.*$" color brightred "\ 0" color magenta "http:.*$" -# important config settings without which it may not work the way You want it to :) +## Important config settings color yellow "(listen-address|forward|accept-intercepted-requests)" -# comments +## Comments color green "#.*$" -####################################### + + + syntax "privoxyaction" "(\.|/).action$" color brightyellow start="\{" end="\}" @@ -24,18 +27,8 @@ color cyan "(\+|\-)(handle-as-image|inspect-jpegs|limit-connect|overwrite-last-m color cyan "(\+|\-)(session-cookies-only|set-image-blocker|crunch-(outgoing|incoming)-cookies|kill-popups|redirect|send(-|-vanilla-)wafer)" color yellow "\{\{(settings|alias)\}\}" -# comments + +## Comments color green "#.*$" color brightwhite "##.*$" color brightgreen "#-.*$" - -####################################### -#syntax "privoxytemplate" "/etc/privoxy/templates/(\.|/)" -#color white "^.+$" -#color green start="<" end=">" -#color cyan "<[^> ]+" -#color cyan ">" -#color yellow start="<!DOCTYPE" end="[/]?>" -#color yellow start="<!--" end="-->" -#color red "&[^;]*;" - diff --git a/profile.nanorc b/profile.nanorc deleted file mode 100644 index cd92305..0000000 --- a/profile.nanorc +++ /dev/null @@ -1,10 +0,0 @@ -### all *profile files ( ~/.bash_profile, /etc/profile) -syntax "profiles" "(\.|/)profile$" -color red "'(\\.|[^'])*'" -color blue ""(\\.|[^\"])*"" -color magenta "[a-zA-Z0-9\_]+=" -color magenta "\<(sudo)\>" -color cyan "\<(export)\>" "\<(alias)\>" -color brightred "\<(umask)\>.*$" -color green "#.*$" - diff --git a/python.nanorc b/python.nanorc index 4c58aee..5fd6f47 100644 --- a/python.nanorc +++ b/python.nanorc @@ -1,9 +1,23 @@ -## Python. -## syntax "python" "\.py$" -icolor brightblue "def [0-9A-Z_]+" -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)\>" +icolor brightred "def [ 0-9A-Z_]+" + +## Python keywords +color brightcyan "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" +color brightmagenta "\<(break|continue|return)\>" + +# Python objects +color red "\<(str|bytearray|bytes|list|tuple|set|frozenset|dict|int|float|complex|bool)\>" + +## Operators +color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" + +## Braces and parentheses +color magenta "[(){}]" "\[" "\]" + +# Python strings color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''" -color brightred "#.*$" + +## Comments +color brightblue "#.*$" diff --git a/rcfiles.nanorc b/rcfiles.nanorc deleted file mode 100644 index 4cec9d6..0000000 --- a/rcfiles.nanorc +++ /dev/null @@ -1,11 +0,0 @@ -### all *rc files ( e.g. .bashrc, inputrc, xtermcontrol .... ) -syntax "rcfiles" "\rc$" "(\.|/)control$" -color red "'(\\.|[^'])*'" -color blue ""(\\.|[^\"])*"" -color magenta "[A-Z0-9\_]+=" -color magenta "\<(sudo)\>" -color cyan "\<(alias)\>" -color brightcyan "\<(export)\>" -color yellow "\<(shopt)\>" -color brightred "\<(umask)\>.*$" -color green "#.*$" diff --git a/reST.nanorc b/reST.nanorc index 233e697..ea8bc2d 100644 --- a/reST.nanorc +++ b/reST.nanorc @@ -1,27 +1,35 @@ -## For reST syntax "rest" "\.rest$" "\.rst$" -# italics -#color magenta "\*[^*]\*" -# bold + +## Bold color red "\*\*[^*]+\*\*" -# code block + +## Code block color brightred "::" -# link reference + +## Link reference color blue "`[^`]+`_{1,2}" -# code + +## Code color yellow "``[^`]+``" -# directives or comments + +## Directives or comments color cyan "^\.\. .*$" -# anon link targets + +## Anon link targets color cyan "^__ .*$" -# h1 + +## h1 color yellow "^###+$" color yellow "^\*\*\*+$" -# h2 + +## h2 color magenta "^===+$" -# h3 + +## h3 color red "^---+$" -# h4 + +## h4 color green "^\^\^\^+$" -# h5 + +## h5 color blue "^"""+$" diff --git a/ruby.nanorc b/ruby.nanorc index c1d4a35..bb51d87 100644 --- a/ruby.nanorc +++ b/ruby.nanorc @@ -1,30 +1,40 @@ -## Ruby. -## syntax "ruby" "\.rb$" + ## Asciibetical list of reserved words 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)\>" + ## Constants color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" + ## Ruby "symbols" icolor magenta "([ ]|^):[0-9A-Z_]+\>" + ## Some unique things we want to stand out color brightyellow "\<(__FILE__|__LINE__)\>" + ## Regular expressions color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*" + ## Shell command expansion is in `backticks` or like %x{this}. These are ## "double-quotish" (to use a perlism). color brightblue "`[^`]*`" "%x\{[^}]*\}" + ## Strings, double-quoted color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" + ## Expression substitution. These go inside double-quoted strings, -## "like #{this}". +# "like #{this}". color brightgreen "#\{[^}]*\}" + ## Strings, single-quoted color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" + ## Comments color cyan "#[^{].*$" "#$" color brightcyan "##[^{].*$" "##$" + ## "Here" docs color green start="<<-?'?EOT'?" end="^EOT" + ## Some common markers color brightcyan "(XXX|TODO|FIXME|\?\?\?)" diff --git a/sh.nanorc b/sh.nanorc new file mode 100644 index 0000000..13af71b --- /dev/null +++ b/sh.nanorc @@ -0,0 +1,13 @@ +## Here is an example for Bourne shell scripts. +## +syntax "sh" "\.sh$" +icolor brightgreen "^[0-9A-Z_]+\(\)" +color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color green "-[Ldefgruwx]\>" +color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" +color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" +color cyan "(^|[[:space:]])#.*$" +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color ,green "[[:space:]]+$"
\ No newline at end of file diff --git a/sources_list.nanorc b/sourceslist.nanorc index 7232a87..985f318 100644 --- a/sources_list.nanorc +++ b/sourceslist.nanorc @@ -1,16 +1,14 @@ -## derived form http://milianw.de/code-snippets - ## syntax highlighting for /etc/apt/sources.list syntax "apt/sources.list" "sources\.list(\.old|~)?$" # component -color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/) [^ ]+ .+$" +color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$" # distribution -color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/) [^ ]+" +color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+" # URI color brightgreen "(http|file|ftp):/[^ ]+" # cdroms # [^\]] does not work… -color brightgreen "cdrom:\[[a-zA-Z0-9\._\-\(\) ]+\]/" +color brightgreen "cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/" # deb / deb-src color cyan "^deb" color brightblue "^deb-src" @@ -1,4 +1,3 @@ -### all *tab files ( e.g. fstab, crontab, inittab ) syntax "fstab" "(\.|/)tab$" color magenta "\<(none)\>.*$" "\<(wait)\>" "\<(respawn)\>" color red "/dev/hd.*$" "\<(ctrlaltdel)\>" "\<(initdefault)\>" @@ -1,13 +1,16 @@ syntax "tcl" "\.tcl$" -## Standard Tcl [info commands] +## Standard Tcl color green "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>" -## Basic Tcl sub commands. + +## Basic Tcl sub commands color green "\<(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\>" color green "\<(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\>" -## Extended TclX [info commands] + +## Extended TclX color green "\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>" -## Syntax. + +## Syntax color brightblue "proc[[:space:]]" "(\{|\})" color green "(\(\)|\;|`|\\|\$|<|>|!|=|&)" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" @@ -1,5 +1,3 @@ -## TeX. -## syntax "tex" "\.tex$" icolor green "\\.|\\[A-Z]*" color magenta "[{}]" diff --git a/todo.nanorc b/todo.nanorc index d0966b0..4eb8e77 100644 --- a/todo.nanorc +++ b/todo.nanorc @@ -1,14 +1,14 @@ -## highlighting for simple todo files where the following ascii art is used: -## [ ] open -## [√] done -## [~] in progress -## [x] failed or canceled -## [B] blocked -## by Nikolas Mayr - there is no link yet - do a web search - -syntax "ascii art todo" "todo\.txt$" -color green "\[√\]" +syntax "ascii-art-todo" "todo\.txt$" + +## [√] Done +color green "\[√\]" + +## [~] In-progress color yellow "\[~.*" -color red "\[x\]" -color cyan "\[B.*" + +## [x] Failed or canceled +color red "\[x\]" + +## [B] Blocked +color cyan "\[B.*" diff --git a/txt2tags.nanorc b/txt2tags.nanorc index 6b02833..74eb1f0 100644 --- a/txt2tags.nanorc +++ b/txt2tags.nanorc @@ -1,16 +1,3 @@ -# -# Nano Editor syntax highlight rules for txt2tags tool -# http://nano-editor.org http://txt2tags.org -# -# Initial release by Aurelio Jargas on Nov/2003 -# -# Install: Just append this contents to your ~/.nanorc file -# -# (((-----------------))) If you are a Nano user and want to -# (( MAINTAINER WANTED )) be the official maintainer of this -# (((-----------------))) file, contact verde(a)aurelio.net. -# - syntax "txt2tags" ".*.t2t" color brightwhite "\*\*.*\*\*" color black,white "//.*//" diff --git a/urls.nanorc b/urls.nanorc index e764f31..c87911c 100644 --- a/urls.nanorc +++ b/urls.nanorc @@ -1,14 +1,3 @@ -############################################################################## -# -# Syntax highlighting for HTTP codes -# -# Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org -# License: GPL 2 or later -# -# Version: 2004-02-25 -# -############################################################################## - syntax "urls" color brightmagenta "^.*$" color cyan "^(1[0-9][0-9]|20[256]|30[45]).*$" diff --git a/vhost.nanorc b/vhost.nanorc deleted file mode 100644 index 7970f86..0000000 --- a/vhost.nanorc +++ /dev/null @@ -1,42 +0,0 @@ -## Apache httpd.conf highlighting -## -#how to add sites-enabled files? "default" is too generic to keep in here I think -syntax "vhost" "(\.|/)vhost\.conf" -color brightwhite "(ServerRoot|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)" -color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)" -color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)" -color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)" -color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)" -color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)" -color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)" -color brightwhite "((Force)?LanguagePriority|NameVirtualHost)" -color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)" -color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)" -color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)" -color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)" -color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)" -color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)" -color yellow "((Min|Max)Spare(Threads|Servers)|Start(Threads|Servers))" -color yellow "(MaxClients|(Max)?ThreadsPerChild|MaxRequestsPerChild)" -color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks)" -color brightred "(On|Off)[[:space:]]*$" -color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$" -color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$" -color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*" -color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*" -color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*" -color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*" -color brightred "[[:space:]]+type-map[[:space:]]*" -color magenta "[[:space:]]+[0-9]+[[:space:]]*" -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]))?" -color brightcyan start="<" end=">" -color white ""(\\.|[^\"])*"" -# Unix-based paths -# can't use \] in the regex for some reason?!? Maybe a bug? -# this is preventing a 100% "to the end of the line" match for a few -# lines (the trailing characters from ] to the EOL are not highlighted. -# if anyone knows how to make it work, let me know.. ;) -color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+" -color green "^[[:space:]]*#.*" -color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>" - diff --git a/xdefaults.nanorc b/xdefaults.nanorc index 8581831..ab7d89e 100644 --- a/xdefaults.nanorc +++ b/xdefaults.nanorc @@ -1,4 +1,3 @@ -## Xdefaults syntax "Xdefaults" "(\.|/)default.$" "(\.|/)resource.$" "fonts.alias" color magenta "XTerm" color cyan "Rxvt" @@ -1,14 +1,3 @@ -############################################################################## -# -# Syntax highlighting for XML files -# -# Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org -# License: GPL 2 or later -# -# Version: 2004-02-25 -# -############################################################################## - syntax "ml" ".*\.([jrs]?html?|xml|sgml?|lhtml|opml|kdevelop|vcproj|glade|xsd|plist|gcs|dtd|dcl)$" "catalog$" "docbook$" color white "^.+$" color green start="<" end=">" diff --git a/xorg.nanorc b/xorg.nanorc index 51c7464..f75aff7 100644 --- a/xorg.nanorc +++ b/xorg.nanorc @@ -1,5 +1,3 @@ -## syntax highlighting in xorg.conf -## syntax "xorg" "xorg\.conf$" color brightwhite "[^A-Za-z0-9](End)?Sub[sS]ection([^A-Za-z0-9]|[[:space:]]*)" color brightwhite "^[[:space:]]*(End)?Section([^A-Za-z0-9]|[[:space:]]*)" diff --git a/yacc.nanorc b/yacc.nanorc index 4f09c6d..06ddce1 100644 --- a/yacc.nanorc +++ b/yacc.nanorc @@ -1,14 +1,15 @@ -## Syntax highlighting for yacc/bison input files syntax "yacc" "\.y$" color red "%[a-zA-Z0-9]*" -## String highlighting. You will in general want your comments and -## strings to come last, because syntax highlighting rules will be -## applied in the order they are read in. + +## Strings +# NOTE: You will in general want your comments and strings to come last, because syntax highlighting rules will be applied in the order they are read in. color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" -## This string is VERY resource intensive! +# NOTE: Very resource intensive. color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + ## Comments color brightblue start="/\*" end="\*/" -## Visible space at line ends -color green,green "[[:space:]]+$" + +## Trailing whitespace +color ,green "[[:space:]]+$" |