diff --git a/c-file.nanorc b/c-file.nanorc new file mode 100644 index 0000000..2b56a6d --- /dev/null +++ b/c-file.nanorc @@ -0,0 +1,10 @@ +syntax "c-file" "\.(c|h)$" +color red "\<[A-Z_]{2,}\>" +color green "\<(float|double|char|int|short|long|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>" +color brightyellow "\<(for|if|while|do|else|case|switch|goto|continue|break|return)\>" +color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)" +color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'" +color brightyellow "<[^= ]*>" ""(\\.|[^\"])*"" +color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*"" +color brightblue "//.*" +color brightblue start="/\*" end="\*/" diff --git a/clike.nanorc b/clike.nanorc new file mode 100644 index 0000000..c8eb5ad --- /dev/null +++ b/clike.nanorc @@ -0,0 +1,27 @@ +## Here is an example for C/C++. +## +syntax "clike" "\.(m|pch)$" +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)\>" +color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>" +color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" +color brightyellow "\<(for|if|while|do|else|case|default|switch)\>" +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. +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +## +## This string is VERY resource intensive! +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +## Comment highlighting +color brightblue "//.*" +color brightblue start="/\*" end="\*/" diff --git a/ebuild.nanorc b/ebuild.nanorc new file mode 100644 index 0000000..c562c48 --- /dev/null +++ b/ebuild.nanorc @@ -0,0 +1,28 @@ +## Here is an example for ebuilds/eclasses +## +syntax "ebuild" "\.e(build|class)$" +## All the standard portage functions +color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" +## Highlight 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 +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)\>" +color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\" +## Highlight portage commands +color magenta "\ [a-z0-9X ]*" "inherit.*" +color brightblue "e(begin|end|conf|install|make|warn|infon?|error|patch)" +color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" "\" +color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe)\>" +color brightblue "\" "\" +color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.so|man|strip)" +color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" +## Highlight common commands used in ebuilds +color blue "\" "\<(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) +color yellow "#.*$" +## Highlight strings (doesnt work that well) +color brightyellow "'(\\.|[^\"])*'" "'(\\.|[^'])*'" \ No newline at end of file diff --git a/etcportage.nanorc b/etcportage.nanorc new file mode 100644 index 0000000..22ae9bd --- /dev/null +++ b/etcportage.nanorc @@ -0,0 +1,19 @@ +## Here is an example for Portage control files +## +syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$" +## Base text: +color green "^.+$" +## Use flags: +color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+" +color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+" +## Likely version numbers: +color magenta "-[[:digit:]].*([[:space:]]|$)" +## Accepted arches: +color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86$)" +color white "[[:space:]][\*~-]?\*" +## Categories: +color cyan "^[[:space:]]*.*/" +## Masking regulators: +color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" +## Comments: +color yellow "#.*$" diff --git a/httpstatuscodes.nanorc b/httpstatuscodes.nanorc new file mode 100644 index 0000000..e764f31 --- /dev/null +++ b/httpstatuscodes.nanorc @@ -0,0 +1,17 @@ +############################################################################## +# +# 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]).*$" +color green "^20[03].*$" +color brightyellow "^(201|30[0-37]).*$" +color brightred "^(204|[45][0-9][0-9]|666).*$" \ No newline at end of file diff --git a/mutt.nanorc b/mutt.nanorc new file mode 100644 index 0000000..2e68399 --- /dev/null +++ b/mutt.nanorc @@ -0,0 +1,4 @@ +## Here is an example for quoted emails (under e.g. mutt). +## +syntax "mutt" +color green "^>.*" diff --git a/php2.nanorc b/php2.nanorc new file mode 100644 index 0000000..3aafe25 --- /dev/null +++ b/php2.nanorc @@ -0,0 +1,12 @@ + +# PHP Syntax Highlighting +syntax "php2" "\.php[2345s~]?$" +color brightblue "(.*)\(" +color blue "\$[a-zA-Z_0-9$]*|[=!<>]" +color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s" +color green "[.,{}();]" +color red "('.*')|(\".*\")" +color brightyellow "(#.*|//.*)$" +color brightyellow start="/\*" end="\*/" +color brightblue "(<\?(php)?|\?>)" +color white start="\?>" end="<\?(php)?" diff --git a/plaudis.nanorc b/plaudis.nanorc new file mode 100644 index 0000000..1eded25 --- /dev/null +++ b/plaudis.nanorc @@ -0,0 +1,130 @@ +## Here is an example for Paludis control files +## + +syntax "bashrc" "bashrc$" +## Base text: +color brightblack "^.+$" +## 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 "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|==|&|\|)" +color brightwhite "-[Ldefgruwx]\>" +color brightwhite "-(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 ,green "[[:space:]]+$" +color green "\".*\"" +color brightwhite "case[[:space:]]\".+\"" +color brightgreen "\$\{.+\}" +## Package name: +color brightmagenta "\$\{PN\}" +## Keywords: +color brightwhite "(CHOST|CFLAGS|CXXFLAGS|MAKEOPTS)=" +color white "(SKIP_FUNCTIONS|PATH|CCACHE_SIZE|CCACHE_DIR|PALUDIS_USE_SAFE_RESUME)=" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" + +syntax "license-use" "(licenses|use)\.conf$" +## Base text: +color brightblack "^.+$" +## Package name: +color brightblue "/.*[[:space:]]" +## Categories: +color cyan "^.*/" +## Version number: +color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*([[:space:]]|::)" +## Repository name: +color magenta "::.*[[:space:]]" +## licenses and use: +color green "[[:space:]][^[:space:]]*" +color red "[[:space:]]-[^[:space:]]*" +## Masking regulators: +color brightred "^(<|<=|=|>=|>)*" +color brightwhite "^(<|<=|=|>=|>)" +## Additional variables: +color brightgreen "(ALSA_CARDS|INPUT_DEVICES|LANGUAGE|LINGUAS|VIDEO_CARDS|PALUDIS_HOOKS):?" +## Mark lines with spaces at end of it: +color brightred ".*[[:space:]]$" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" + +syntax "keywords" "keywords\.conf$" +## Base text: +color brightblack "^.+$" +## Package name: +color brightblue "/.*[[:space:]]" +## Categories: +color cyan "^.*/" +## Version number: +color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*([[:space:]]|::)" +## Repository name: +color magenta "::.*[[:space:]]" +## Accepted arches: +color green "[[:space:]][~]?(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd|\*)" +color red "-\*" +## Masking regulators: +color brightred "^(<|<=|=|>=|>)*" +color brightwhite "^(<|<=|=|>=|>)" +## Mark lines with spaces at end of it: +color brightred ".*[[:space:]]$" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" + +syntax "mask-unmask" "package_(mask|unmask)\.conf$" +## Base text: +color brightblack "^.+$" +## Package name: +color brightblue "/.*" +## Categories: +color cyan "^.*/" +## Version number: +color white "-[[:digit:]]+(\.|[[:digit:]]|-.)*($|::)" +## Repository name: +color magenta "::.*$" +## Masking regulators: +color brightred "^(<|<=|=|>=|>)*" +color brightwhite "^(<|<=|=|>=|>)" +## Mark lines with spaces at end of it: +color brightred ".*[[:space:]]$" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" + +syntax "mirrors" "mirrors\.conf$" +## Base text: +color red "^.+$" +## Serwer name: +color brightwhite "^.*[[:space:]]" +## Adress +color brightblue "[[:space:]](ftp://|http://).*$" +## Mark lines with spaces at end of it: +color brightred ".*[[:space:]]$" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" + +syntax "repositories" "repo" +## Base text: +color brightblack "^.+$" +## Parameters: +color magenta "=[[:space:]].+$" +color brightwhite "^.*[[:space:]]=[[:space:]]" +## Path: +color green "/.+" +color brightgreen "\$\{.*\}" +## Adress: +color brightblue "(svn\+https|svn\+http|http|rsync)://.*$" +## Mark lines with spaces at end of it: +color brightred ".*[[:space:]]$" +## Comments: +color brightred "#.*$" +color yellow "^#.*$" +color brightyellow "^##[[:space:]].*$" \ No newline at end of file diff --git a/shlike.nanorc b/shlike.nanorc new file mode 100644 index 0000000..2370cbe --- /dev/null +++ b/shlike.nanorc @@ -0,0 +1,12 @@ +## Here is an example for Bourne shell scripts. +## +syntax "shlike" "\.(m4|sub|guess)$" "missing$" "configure\.ac$" "config\.(charset|rpath|status)$" "configure$" +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 ""(\\.|[^"])*"" "'(\\.|[^'])*'"