From 405a71cc65e37667661255a19f861a3b06fe5722 Mon Sep 17 00:00:00 2001 From: Tiago Almeida Date: Sat, 21 Sep 2019 00:19:09 +0100 Subject: [PATCH] Begin the union of the nano's file with ours. Note: these files will be deleted. --- original/asm.nanorc | 25 +++++++++++++ original/autoconf.nanorc | 32 +++++++++++++++++ original/awk.nanorc | 37 +++++++++++++++++++ original/c.nanorc | 42 ++++++++++++++++++++++ original/changelog.nanorc | 28 +++++++++++++++ original/cmake.nanorc | 19 ++++++++++ original/css.nanorc | 11 ++++++ original/debian.nanorc | 21 +++++++++++ original/default.nanorc | 20 +++++++++++ original/elisp.nanorc | 33 +++++++++++++++++ original/fortran.nanorc | 40 +++++++++++++++++++++ original/gentoo.nanorc | 74 ++++++++++++++++++++++++++++++++++++++ original/go.nanorc | 41 +++++++++++++++++++++ original/groff.nanorc | 26 ++++++++++++++ original/guile.nanorc | 24 +++++++++++++ original/html.nanorc | 28 +++++++++++++++ original/java.nanorc | 16 +++++++++ original/javascript.nanorc | 24 +++++++++++++ original/json.nanorc | 34 ++++++++++++++++++ original/lua.nanorc | 60 +++++++++++++++++++++++++++++++ original/makefile.nanorc | 24 +++++++++++++ original/man.nanorc | 23 ++++++++++++ original/mgp.nanorc | 9 +++++ original/mutt.nanorc | 9 +++++ original/nanohelp.nanorc | 11 ++++++ original/nanorc.nanorc | 32 +++++++++++++++++ original/nftables.nanorc | 30 ++++++++++++++++ original/objc.nanorc | 42 ++++++++++++++++++++++ original/ocaml.nanorc | 30 ++++++++++++++++ original/patch.nanorc | 26 ++++++++++++++ original/perl.nanorc | 24 +++++++++++++ original/php.nanorc | 35 ++++++++++++++++++ original/po.nanorc | 29 +++++++++++++++ original/postgresql.nanorc | 74 ++++++++++++++++++++++++++++++++++++++ original/pov.nanorc | 16 +++++++++ original/python.nanorc | 39 ++++++++++++++++++++ original/ruby.nanorc | 36 +++++++++++++++++++ original/rust.nanorc | 39 ++++++++++++++++++++ original/sh.nanorc | 37 +++++++++++++++++++ original/spec.nanorc | 40 +++++++++++++++++++++ original/tcl.nanorc | 22 ++++++++++++ original/tex.nanorc | 10 ++++++ original/texinfo.nanorc | 21 +++++++++++ original/xml.nanorc | 22 ++++++++++++ themes/custom | 4 +-- todo.md | 4 +++ 46 files changed, 1321 insertions(+), 2 deletions(-) create mode 100644 original/asm.nanorc create mode 100644 original/autoconf.nanorc create mode 100644 original/awk.nanorc create mode 100644 original/c.nanorc create mode 100644 original/changelog.nanorc create mode 100644 original/cmake.nanorc create mode 100644 original/css.nanorc create mode 100644 original/debian.nanorc create mode 100644 original/default.nanorc create mode 100644 original/elisp.nanorc create mode 100644 original/fortran.nanorc create mode 100644 original/gentoo.nanorc create mode 100644 original/go.nanorc create mode 100644 original/groff.nanorc create mode 100644 original/guile.nanorc create mode 100644 original/html.nanorc create mode 100644 original/java.nanorc create mode 100644 original/javascript.nanorc create mode 100644 original/json.nanorc create mode 100644 original/lua.nanorc create mode 100644 original/makefile.nanorc create mode 100644 original/man.nanorc create mode 100644 original/mgp.nanorc create mode 100644 original/mutt.nanorc create mode 100644 original/nanohelp.nanorc create mode 100644 original/nanorc.nanorc create mode 100644 original/nftables.nanorc create mode 100644 original/objc.nanorc create mode 100644 original/ocaml.nanorc create mode 100644 original/patch.nanorc create mode 100644 original/perl.nanorc create mode 100644 original/php.nanorc create mode 100644 original/po.nanorc create mode 100644 original/postgresql.nanorc create mode 100644 original/pov.nanorc create mode 100644 original/python.nanorc create mode 100644 original/ruby.nanorc create mode 100644 original/rust.nanorc create mode 100644 original/sh.nanorc create mode 100644 original/spec.nanorc create mode 100644 original/tcl.nanorc create mode 100644 original/tex.nanorc create mode 100644 original/texinfo.nanorc create mode 100644 original/xml.nanorc create mode 100644 todo.md diff --git a/original/asm.nanorc b/original/asm.nanorc new file mode 100644 index 0000000..d85226c --- /dev/null +++ b/original/asm.nanorc @@ -0,0 +1,25 @@ +## Here is an example for assembler. + +syntax asm "\.(S|s|asm)$" +magic "assembler source" +comment "//" + +color red "\<[A-Z_]{2,}\>" +color brightgreen "\.(data|subsection|text)" +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)" +color brightred "^[[:space:]]*[.0-9A-Za-z_]*:" +color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" + +# Strings. +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +# Multiline strings. This regex is VERY resource intensive, +# and sometimes colours things that shouldn't be coloured. +###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/autoconf.nanorc b/original/autoconf.nanorc new file mode 100644 index 0000000..a5e839f --- /dev/null +++ b/original/autoconf.nanorc @@ -0,0 +1,32 @@ +## Here is an example for Autoconf. + +syntax autoconf "\.(ac|m4)$" +comment "#" + +# Keywords: +color yellow "\<(if|test|then|elif|else|fi|for|in|do|done)\>" +color yellow "(=|!=|&&|\|\|)" + +# Macros: +color cyan "\<[[:upper:]_[:digit:]]+\>" + +# Version numbers: +color red "\<[-_.0-9]+\>" + +# Strings: +color red "\"[^"]*\"" "\'[^']*\'" + +# Backticks: +color green "`[^`]*`" + +# Error lines: +color brightred "^[[:space:]]*\*\*\*.*" + +# Brackets: +color magenta "\[|\]|\(|\)" + +# Comments: +color blue "^[[:blank:]]*#.*" "\" +color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>" +color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>" +# Function declarations and special patterns. +color brightgreen "\<(function|extension|BEGIN|END)\>" +# Operators. +color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)" +# Flow control. +color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>" +color brightyellow "\<(break|continue|return)\>" +# I/O statements. +color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>" +# Standard functions. +color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>" +color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>" +color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>" +color magenta "\<(mktime|strftime|systime)\>" +color magenta "\<(and|compl|lshift|or|rshift|xor)\>" +color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>" + +# Strings. +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +# Comments. +color brightblue "(^|[[:space:]])#.*$" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/c.nanorc b/original/c.nanorc new file mode 100644 index 0000000..3537480 --- /dev/null +++ b/original/c.nanorc @@ -0,0 +1,42 @@ +## Here is an example for C/C++. + +syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$" +magic "^(C|C\+\+) (source|program)" +comment "//" + +# Constants. +color brightred "\<[A-Z_][0-9A-Z_]+\>" +# Labels. +color brightmagenta "^[[:space:]]*[A-Z_a-z]+:[[:space:]]*$" + +color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" +color green "\<([[:lower:]][[:lower:]_]*|(u_?)?int(8|16|32|64))_t\>" +color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|override|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 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)__" + +# Strings. In general you will want your strings and comments to come last, +# because highlighting rules are applied in the order they are read in. +color brightyellow ""([^"]|\\")*"" "#[[:space:]]*include[[:space:]]+<[^[:blank:]=]*>" +# Multiline strings. This regex is VERY resource intensive, +# and sometimes colours things that shouldn't be coloured. +###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +# Preprocessor directives. +color brightcyan start="^[[:space:]]*#[[:space:]]*(if(n?def)?|elif|warning|error|pragma)\>" end="(\`|[^\\])$" +color brightcyan "^[[:space:]]*#[[:space:]]*(define|else|endif|include(_next)?|undef)\>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Reminders. +color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/changelog.nanorc b/original/changelog.nanorc new file mode 100644 index 0000000..bf44242 --- /dev/null +++ b/original/changelog.nanorc @@ -0,0 +1,28 @@ +## Colouring for Changelogs. + +syntax changelog "Change[Ll]og[^/]*$" + +# Author lines. +color green "^(19|20).*" +# Dates. +color red "^(19|20)[0-9-]{8}" +# Email addresses. +color yellow "<[^>]*@[^>]*>" + +# Command-line options. +color cyan "[[:space:]]-[a-zA-Z\$]" "--[8a-z-]+" +# Bug and patch numbers. +color cyan "(BZ|bug|patch) #[0-9]+" "PR [[:alnum:]]+/[0-9]+" +# Probable constants, for variety. +color brightred "\<[A-Z_][0-9A-Z_]+\>" +# Key sequences. +color brightblue "\^[A-Z^\]" "\" + +icolor brightgreen "^[[:space:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>" +color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:space:]]" +color brightgreen "[[:space:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:space:]]" + +icolor brightred "^[[:space:]]*((end)?(function|macro)|return)" + +icolor cyan start="\$(ENV)?\{" end="\}" +color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" + +color brightblue "(^|[[:space:]])#.*" +color ,green "[[:space:]]+$" diff --git a/original/css.nanorc b/original/css.nanorc new file mode 100644 index 0000000..2780164 --- /dev/null +++ b/original/css.nanorc @@ -0,0 +1,11 @@ +## Here is an example for CSS files. + +syntax css "\.css$" +comment "/*|*/" + +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/original/debian.nanorc b/original/debian.nanorc new file mode 100644 index 0000000..3ec1393 --- /dev/null +++ b/original/debian.nanorc @@ -0,0 +1,21 @@ +## Here is an example for apt's sources.list. + +syntax sources.list "sources\.list(\.d/.*\.list)?(~|\.old|\.save)?$" +comment "#" + +# Coloring the deb lines, working from tail to head. First the +# components -- well, everything, and thus also the components. +color brightmagenta "^deb.*" +# Distribution -- well, everything, except the components. +color brightred "^deb(-src)?\s+.*((ftp|https?|rsh|ssh|copy|file|spacewalk|tor):/\S+|cdrom:\[.+\]/)\s+\S+" +# URIs. +color brightgreen "^deb(-src)?\s+.*(ftp|https?|rsh|ssh|copy|file|spacewalk|tor):/\S+" +# CDroms. +color brightgreen "^deb(-src)?\s+.*cdrom:\[.+\]/" +# Options. +color brightcyan "^deb(-src)?\s+\[.+\]\s+" +# And finally the initial deb tag. +color yellow "^deb(-src)?" + +# Comments. +color brightblue "#.*" diff --git a/original/default.nanorc b/original/default.nanorc new file mode 100644 index 0000000..b23d029 --- /dev/null +++ b/original/default.nanorc @@ -0,0 +1,20 @@ +## An example of a default syntax. The default syntax is used for +## files that do not match any other syntax. + +syntax default +comment "#" + +# Comments. +color cyan "^[[:space:]]*#.*" + +# Spaces in front of tabs. +color ,red " + +" + +# Nano's name, including version. +color brightred "(GNU )?[Nn]ano [1-4]\.[0-9][-.[:alnum:]]*\>" + +# Email addresses. +color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>" + +# Bracketed captions in certain config files. +color brightgreen "^\[.*\]$" diff --git a/original/elisp.nanorc b/original/elisp.nanorc new file mode 100644 index 0000000..0622bd6 --- /dev/null +++ b/original/elisp.nanorc @@ -0,0 +1,33 @@ +## Here is an example for Emacs Lisp. + +syntax elisp "\.el$" +magic "Lisp/Scheme program" +comment ";" + +# Basic functions/macros +color brightcyan "\<(if|when|unless|cond|and|or|lambda|let|progn|while|dolist|dotimes)\>" +color brightcyan "\" +color brightcyan "\" +# Defining functions +color brightcyan "\" +color brightcyan "\" +color brightcyan "\" +# Defining variables +color brightcyan "\" +# Customization functions +color brightcyan "\" +# Setting values +color brightcyan "\<(setq(-default|-local)?|setf|push|pop|declare(-function)?)\>" +# Feature functions +color brightcyan "\<(require|provide)\>" +# Quoted symbols +color brightyellow "#?'\<(\w|-)+\>" +# Booleans +color brightred "\<(t|nil)\>" +# Keywords +color blue ":(\w|[?-])+" +# Strings +color yellow start="^[[:blank:]]+\"" end="[^\]\"" +color yellow ""(\\.|[^"])*"" +# Comments +color cyan "(^|[[:space:]]);.*" diff --git a/original/fortran.nanorc b/original/fortran.nanorc new file mode 100644 index 0000000..fb2ff0b --- /dev/null +++ b/original/fortran.nanorc @@ -0,0 +1,40 @@ +## Here is an example for Fortran 90/95. + +syntax fortran "\.(f|f90|f95)$" +comment "!" + +color red "\<[0-9]+\>" + +icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>" +icolor green "\<(append|asis|assign|assignment|associated|character|common)\>" +icolor green "\<(complex|data|default|delim|dimension|double precision)\>" +icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>" +icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>" +icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)>" +icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>" +icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>" +icolor green "\<(selected_real_kind|subroutine|status)\>" + +icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>" +icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>" +icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>" +icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>" +icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>" +icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>" +icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>" +icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>" +icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>" +icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>" +icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>" + +icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>" +icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>" +icolor yellow "\<(.or.|repeat|select case|then|where|while)\>" + +icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>" + +# Strings. +color yellow "<[^= ]*>" ""(\\.|[^"])*"" + +# Comments. +color blue "!.*" diff --git a/original/gentoo.nanorc b/original/gentoo.nanorc new file mode 100644 index 0000000..e9d178d --- /dev/null +++ b/original/gentoo.nanorc @@ -0,0 +1,74 @@ +## Here is an example for Gentoo ebuilds/eclasses, +## and (further down) one for Portage control files. + +syntax ebuild "\.e(build|class|blit)$" +comment "#" + +## All the standard portage functions: +color brightgreen "(^|\" +color brightgreen "^pkg_(config|nofetch|info|pretend|setup|(pre|post)(inst|rm))\>" +color brightgreen "\" +## Bash-related syntax: +color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" +color green "\<(declare|eval|exec|export|let|local)\>" +color green "[{}():;|`$<>!=&\\]" "(\]|\[)" +color green "-[defhnrsuwxzL]\>" +color green "-(eq|ne|gt|lt|ge|le)\>" +## Variables... official portage ones in red, all others in bright red: +color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*" +color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:digit:]]|@)+\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" +color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|[HPR]?DEPEND|PROVIDE|PROPERTIES|REQUIRED_USE|RESTRICT|USERLAND)\>" +color red "\<(S|E?D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|EPREFIX|E?ROOT|WORKDIR)\>" +color red "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\" "\<(MERGE_TYPE|REPLACING_VERSIONS|REPLACED_BY_VERSION)\>" +color red "\" +color red "\" +color red "\<(PATCHES|(HTML_)?DOCS)\>" "\" "\" +## Portage commands: +color magenta "\<(use(_(with|enable|if_iuse)|x)?|in_iuse) [!a-zA-Z0-9_+ -]*" "inherit.*" +color brightblue "\" +color brightblue "\" "\" +color brightblue "\" "\" +color brightblue "\" "\" +color brightblue "\<(die|hasv?|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\>" "\<(has|best)_version\>" +color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +color brightblue "\" "\" +color brightblue "\" "\" +color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" "\<(exe|ins|dir)opts\>" +color brightblue "\" +color brightblue "\" +## Common commands used in ebuilds: +color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>" +## Comments (doesn't work that well): +color yellow "(^|[[:space:]])#.*" +## Strings (doesn't work that well): +color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" +## Trailing space is bad! +color ,green "[[:space:]]+$" +## Mixed whitespace is also bad. +color ,green " " + + +syntax /etc/portage "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$" +comment "#" + +## Base text: +color green ".+" +## Likely version and slot numbers: +color magenta "-[[:digit:].]+(_(alpha|beta|pre|rc|p)[[:digit:]]*)*(-r[[:digit:]]+)?([:[:space:]]|$)" +color magenta ":[^[:space:]]+([[:space:]]|$)" +## Use flags (must come after version/slot): +color brightred "[[:space:]]+\+?[A-Za-z0-9+_@-]+" +color brightblue "[[:space:]]+-[A-Za-z0-9+_@-]+" +## Accepted arches: +color white "[~-]?\<(alpha|amd64|arm(64)?|hppa|ia64|m68k|mips|nios2|ppc(64)?|riscv|s390|sh|sparc|x86)(-(aix|(f|free|net|open)bsd|cygwin|hpux|interix|linux|macos|mint|solaris|winnt))?\>" +color white "[[:space:]][*~-]?\*" +## Categories: +color cyan "^[[:space:]]*[^/]*/" +## Masking regulators: +color brightmagenta "^[[:space:]]*(=|~|<|<=|>|>=)" +## Comments: +color yellow "#.*" +## Trailing space is bad! +color ,green "[[:space:]]+$" +## Mixed whitespace is also bad. +color ,green " " diff --git a/original/go.nanorc b/original/go.nanorc new file mode 100644 index 0000000..f8b61e0 --- /dev/null +++ b/original/go.nanorc @@ -0,0 +1,41 @@ +## Here is an example for Go. + +syntax go "\.go$" +comment "//" + +# Types. +color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" +color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>" + +# Predefined functions. +color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>" + +# Control structures. +color brightyellow "\<(case|default|defer|else|for|go|if|range|select|switch)\>" + +# Control flow. +color magenta "\<(break|continue|fallthrough|goto|return)\>" + +# Declarations. +color brightcyan "\<(package|import)\>" +color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+" + +# Literals. +color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>" +color red "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+[eE][+-]?[0-9]+i?\>" +color red "\B\.[0-9]+([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+i\>" + +# Strings and characters; slightly fuzzy. +color red "\<(true|false|nil|iota|_)\>" +color red "'(\\.|[^'])+'" +color red ""(\\.|[^"])*"" +color red start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/groff.nanorc b/original/groff.nanorc new file mode 100644 index 0000000..a24c40b --- /dev/null +++ b/original/groff.nanorc @@ -0,0 +1,26 @@ +## Here is an example for groff. + +syntax groff "(/tmac\.[^/]+$|\.(m[ems]|rof|tmac)$)" +comment ".\"" + +# The argument of .ds or .nr +color cyan "^\.(ds|nr) [^[:space:]]*" +# Single-character escapes +color brightmagenta "\\." +# The argument of \f or \s in the same color +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/original/guile.nanorc b/original/guile.nanorc new file mode 100644 index 0000000..c7db3de --- /dev/null +++ b/original/guile.nanorc @@ -0,0 +1,24 @@ +## Here is an example for Guile Scheme. + +syntax guile "\.scm$" +header "^#!.*guile" +comment ";" + +# Basic scheme functions +color green "\<(do|if|lambda|let(rec)?|map|unless|when)\>" +# Defining things +color brightcyan "\" +# Quoted symbols +color brightyellow "'\<(\w|-)+\>" +# Chars +color brightmagenta "#\\." +color brightmagenta "#\\\w+\>" +# Booleans +color brightred "(#t|#f)\>" +# Keywords +color blue "#?:(\w|[?-])+" +# Strings +color yellow start="^[[:blank:]]+\"" end="[^\]\"" +color yellow ""(\\.|[^"])*"" +# Comments +color cyan "(^|[[:space:]]);.*" diff --git a/original/html.nanorc b/original/html.nanorc new file mode 100644 index 0000000..0507512 --- /dev/null +++ b/original/html.nanorc @@ -0,0 +1,28 @@ +## Here is an example for HTML. + +syntax html "\.html?$" +magic "HTML document" +comment "" + +# Tags: +color cyan "<[[:alpha:]/!?][^>]*>" +# Bold, italic, and underlined: +color brightmagenta "" + +# Named character references: +color red "&[^;[:space:]]*;" +# Strings: +color green ""(\\.|[^"])*"" + +# Attributes: +color red "(abbr|accept(-charset)?|accesskey|action|alink|align|alt|archive|axis|background|bgcolor|border)=" +color red "(cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)=" +color red "(content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|disabled|enctype)=" +color red "(for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)=" +color red "(label|lang|link|longdesc|margin(height|width)|maxlength|media|method|multiple)=" +color red "(name|nohref|noresize|noshade|object|onclick|onfocus|onload|onmouseover|profile|readonly|rel|rev)=" +color red "(rows(pan)?|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary)=" +color red "(tabindex|target|text|title|type|usemap|valign|value(type)?|vlink|vspace|width|xmlns|xml:space)=" + +# Comments: +color yellow start="" diff --git a/original/java.nanorc b/original/java.nanorc new file mode 100644 index 0000000..5bb294f --- /dev/null +++ b/original/java.nanorc @@ -0,0 +1,16 @@ +## Here is an example for Java. + +syntax java "\.java$" +magic "Java " +comment "//" + +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)\>" +color cyan "\<(package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" +color red ""[^"]*"" +color yellow "\<(true|false|null)\>" +color blue "//.*" +color blue start="/\*" end="\*/" +color brightblue start="/\*\*" end="\*/" +color ,green "[[:space:]]+$" diff --git a/original/javascript.nanorc b/original/javascript.nanorc new file mode 100644 index 0000000..1fe7551 --- /dev/null +++ b/original/javascript.nanorc @@ -0,0 +1,24 @@ +## Syntax highlighting for Javascript. + +syntax javascript "\.js$" +comment "//" + +# Declarational stuff. +color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>" +# Flow control and special keywords. +color brightyellow "\<(do|while|if|else|switch|case|default|for|each|in|of|with)\>" +color brightyellow "\<(await|export|import|throw|try|catch|finally|new|delete)\>" +# "Exit" points. +color magenta "\<(break|continue|return|yield)\>" + +# Octal/decimal and hexadecimal numbers. +color cyan "\<[0-9]+\>" "\<0x[0-9A-Fa-f]+\>" + +# Strings. +color brightmagenta ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`" +# Comments. +color brightblue "(^|[[:space:]])//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/json.nanorc b/original/json.nanorc new file mode 100644 index 0000000..185c08f --- /dev/null +++ b/original/json.nanorc @@ -0,0 +1,34 @@ +## Syntax highlighting for JSON files. + +# See: http://www.json.org/ +# Original author: Aapo Rantalainen +# License: GPLv3 or newer + +syntax json "\.json$" +# No comments are permitted in JSON. +comment "" + +# Numbers (used as value). +color green ":[[:space:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?" +# Values (well, any string). +color brightmagenta "\".+\"" +# Hex numbers (used as value). +color green ":[[:space:]]*\"#[0-9abcdefABCDEF]+\"" +# Escapes. +color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})" +# Special words. +color green "(true|false|null)" + +# Names (very unlikely to contain a quote). +color brightblue "\"[^"]+\"[[:space:]]*:" + +# Brackets, braces, and separators. +color brightblue "\[" "\]" +color brightred "\{" "\}" +color brightred "," ":" + +# Comments. +color cyan "(^|[[:space:]]+)(//|#).*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/lua.nanorc b/original/lua.nanorc new file mode 100644 index 0000000..7c66a52 --- /dev/null +++ b/original/lua.nanorc @@ -0,0 +1,60 @@ +## Syntax highlighting for Lua. +# +## Original author: Matthew Wild +## License: GPL 3 or later + +syntax lua "\.lua$" +magic "Lua script" +linter "luacheck --no-color" +comment "--" + +color brightwhite "\[\[.*\]\]" + +# Operators +color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|#|\<(not|and|or)\>" +# Don't partially color ... as an operator +color normal "\.\.\." + +# Statements +color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>" + +# Keywords +color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\(" + +# Standard library +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" +color brightyellow "\" + +# File handle methods +color brightyellow ":(close|flush|lines|read|seek|setvbuf|write)\>" + +# External files +color brightgreen "\<(dofile|require)\>" + +# Special words +color brightmagenta "\<(false|nil|true)\>" + +# Decimal and hexadecimal numbers +color red "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?\>" +color red "\<0x[0-9A-Fa-f]+(\.[0-9A-Fa-f]*)?([Pp][+-]?[0-9]+)?\>" + +# Brackets +color brightmagenta "\(|\)|\[|\]|\{|\}" + +# Shebang +color brightcyan "^#!.*" + +# Strings +color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'" + +# Simple comments and multiline comments +color green "--.*" +color green start="--\[\[" end="\]\]" diff --git a/original/makefile.nanorc b/original/makefile.nanorc new file mode 100644 index 0000000..a1c116c --- /dev/null +++ b/original/makefile.nanorc @@ -0,0 +1,24 @@ +## Here is an example for Makefiles. + +syntax makefile "(/((GNU)?m|M)akefile[^/]*$|\.(make|mk)$)" +magic "makefile script" +comment "#" + +# Assignments. +color red " (:?:|\+|\?)?= " + +# Keywords. +color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>" +color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>" + +# Variable expansions. +color blue "\$+[{(][a-zA-Z0-9_-]+[})]" + +# Targets. +color brightblue "^[^ ]+:" + +# Comments. +color green "(^|[[:space:]]+)#.*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/man.nanorc b/original/man.nanorc new file mode 100644 index 0000000..0639612 --- /dev/null +++ b/original/man.nanorc @@ -0,0 +1,23 @@ +## Syntax highlighting for man pages. + +syntax man "\.[1-9]x?$" +magic "troff or preprocessor input" +comment ".\"" + +# Section headers, title line, and indented paragraphs. +color green "^\.(SH|SS|TH) .*" +color brightgreen "^\.(SH|SS|TH) " "^\.([HIT]P)" +# Type faces, and normal paragraphs. +color brightred "^\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*" +color brightblue "^\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "^\.([LP]?P)$" +# Inline type faces. +color magenta "\\f[BIPR]" +# Relative margins, hyperlinks, and various other stuff. +color yellow "^\.(RS|RE|UR|UE|PD|DT)" +color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|hy|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)" + +# Comments. +color cyan "(^\.)?\\\".*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/mgp.nanorc b/original/mgp.nanorc new file mode 100644 index 0000000..20503d2 --- /dev/null +++ b/original/mgp.nanorc @@ -0,0 +1,9 @@ +## Here is an example for Magicpoint presentations. + +syntax mgp "\.mgp$" +header "^%include.*" +comment "#" + +color green "^%[A-Za-z].*" +color cyan "(^|[[:space:]])(#|%%).*" +color ,green "[[:space:]]+$" diff --git a/original/mutt.nanorc b/original/mutt.nanorc new file mode 100644 index 0000000..97cfcd1 --- /dev/null +++ b/original/mutt.nanorc @@ -0,0 +1,9 @@ +## Here is an example for quoted emails (under e.g. mutt). + +syntax mutt + +# Quoted lines. +color green "^>.*" + +# Signatures, even quoted ones. +color yellow start="^>* ?-- $" end="^>* ?$" diff --git a/original/nanohelp.nanorc b/original/nanohelp.nanorc new file mode 100644 index 0000000..426b23c --- /dev/null +++ b/original/nanohelp.nanorc @@ -0,0 +1,11 @@ +## This is meant for highlighting key combos in a nano help text. + +# It should not apply to any normal file, so no fileregex. +syntax nanohelp + +# Key combos: +color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]" "\" + +# Quoted indicators: +color brightred "'(\^|M-)'" diff --git a/original/nanorc.nanorc b/original/nanorc.nanorc new file mode 100644 index 0000000..bf31e92 --- /dev/null +++ b/original/nanorc.nanorc @@ -0,0 +1,32 @@ +## Here is an example for nanorc files. + +syntax nanorc "\.?nanorc$" +comment "#" + +# Possible errors and parameters +icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*" + +# Keywords +icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|breaklonglines|casesensitive|constantshow|cutfromcursor|emptyline|finalnewline|historylog|jumpyscrolling|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabstospaces|tempfile|trimblanks|unix|view|wordbounds|zap)\>" +icolor yellow "^[[:space:]]*set[[:space:]]+((error|function|key|number|selected|status|stripe|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>" +icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|stripecolor|titlecolor|whitespace|wordchars)[[:space:]]+" +icolor brightgreen "^[[:space:]]*set[[:space:]]+(fill[[:space:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:space:]]+[1-9][0-9]*)\>" +icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+([[:alpha:]]+|".*")[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)" +icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]@\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|yesno|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)" +icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*" +icolor brightgreen "^[[:space:]]*(syntax|linter)[[:space:]]+[^[:blank:]]+" +icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|extendsyntax)\>" + +# Strings +color brightmagenta "([[:space:]]|(start|end)=)".+"([[:space:]]|$)" + +# Colors +icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>" +icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" + +# Comments +color brightblue "(^|[[:space:]]+)#.*" +color cyan "^[[:space:]]*##.*" + +# Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/original/nftables.nanorc b/original/nftables.nanorc new file mode 100644 index 0000000..328f31e --- /dev/null +++ b/original/nftables.nanorc @@ -0,0 +1,30 @@ +## Here is an example for nftables. + +syntax nftables "\.(nft|nftables)$" +header "^#!.*(nft|nftables)" +comment "#" + +# Objects and operations +color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>" +color green "\<(define|include)\>" +color red "\<(add|delete|flush|insert|remove|replace)\>" + +# Families +color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>" + +# Terminal statements +color red "\<(drop|reject)\>" +color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>" + +# Comments +color cyan "(^|[[:space:]])#.*" + +# Trailing whitespace +color ,green "[[:space:]]+$" + +# Strings and others +color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color green "[{}():;|`$<>!=&\\]" "(\]|\[)" + +# Basic variable names +color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*" diff --git a/original/objc.nanorc b/original/objc.nanorc new file mode 100644 index 0000000..7fb0bd7 --- /dev/null +++ b/original/objc.nanorc @@ -0,0 +1,42 @@ +## Here is an example for C/C++/Obj-C. + +syntax m "\.m$" +magic "Objective-C source" +comment "//" + +# Stuffs, +color brightwhite "\<[A-Z_][0-9A-Z_]+\>" +color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" +color green "\<[[:alpha:]_][[:alnum:]_]*_t\>" +color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" +color brightgreen "\<(for|if|while|do|else|case|default|switch)\>" +color brightgreen "\<(try|throw|catch|operator|new|delete)\>" +color brightgreen "\<(goto|continue|break|return)\>" +color brightgreen "@(encode|end|implementation|interface)|selector)\>" + +# GCC builtins. +color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" + +# Selector/method. +color brightmagenta "(^|[[:space:]])\[.*[[:space:]].*\]" +color white ":[[:alnum:]]*" +color magenta "[[:alnum:]]*:" +color white "\[[^][:space:]]*\]" + +# Strings. +color brightblack "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" +color brightblack "<[^= ]*>" ""(\\.|[^"])*"" +color brightblue "@"(\\.|[^"])*"" +# Multiline strings. This regex is VERY resource intensive, +# and sometimes colours things that shouldn't be coloured. +###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +# Preprocessor commands. +color brightblue "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)" + +# Comments. +color yellow "//.*" +color yellow start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/ocaml.nanorc b/original/ocaml.nanorc new file mode 100644 index 0000000..26b20b9 --- /dev/null +++ b/original/ocaml.nanorc @@ -0,0 +1,30 @@ +## Syntax highlighting for OCaml. + +syntax ocaml "\.mli?$" +magic "OCaml" +comment "(*|*)" + +# Uid: +color red "\<[A-Z][0-9a-z_]{2,}\>" +# Declarations: +color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>" +# Structure items: +color red "\<(type|open|class|module|exception|external)\>" +# Patterns: +color blue "\<(fun|function|functor|match|try|with)\>" +# Pattern modifiers: +color yellow "\<(as|when|of)\>" +# Conditions: +color cyan "\<(if|then|else)\>" +# Blocks: +color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>" +# Constants: +color green "\<(true|false)\>" +# Modules/classes: +color green "\<(include|inherit|initializer)\>" +# Expression modifiers: +color yellow "\<(new|ref|mutable|lazy|assert|raise)\>" +# Comments: +color white start="\(\*" end="\*\)" +# Strings: (no multiline handling yet) +color brightblack ""[^\"]*"" diff --git a/original/patch.nanorc b/original/patch.nanorc new file mode 100644 index 0000000..8d9e0aa --- /dev/null +++ b/original/patch.nanorc @@ -0,0 +1,26 @@ +## Here is an example for patch files. + +syntax patch "\.(patch|diff|debdiff)$" +magic "diff output" +# There is no official support for comments in patch files. +comment "" + +# Added lines. +color brightgreen "^\+.*" +# Show trailing whitespace only on added lines. +color ,green "[[:space:]]+$" +# Context lines. +color brightblue "^ .*" +# Deleted lines. +color brightred "^-.*" + +# Header lines. +color magenta "^(Index:|diff)[[:blank:]].*" +# File names and dates. +color red "^---.*" +color green "^\+\+\+.*" +# Line numbers. +color brightyellow "^@@.*" + +# Statistics. +color cyan start="^---$" end="^$" diff --git a/original/perl.nanorc b/original/perl.nanorc new file mode 100644 index 0000000..f5657ae --- /dev/null +++ b/original/perl.nanorc @@ -0,0 +1,24 @@ +## Here is an example for Perl. + +syntax perl "\.p[lm]$" +header "^#!.*perl" +magic "Perl script" +comment "#" + +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)\>" + +# Variable names. +color cyan "[$%&@]([A-Za-z_][0-9A-Za-z_]*|\^[][A-Z?\^_]|[0-9]+)\>" +color cyan "[$%&@]\{(\^?[A-Za-z_][0-9A-Za-z_]*|\^[][?\^][0-9]+)\}" +color cyan "[$%&@]([][!"#'()*+,.:;<=>?`|~-]|\{[][!-/:-@\`|~]\})|\$[$%&@]" +color cyan "(^|[[:space:]])[$%@][/\]" + +color yellow "".*"|qq\|.*\|" +color white "[sm]/.*/" +color white start="(^use| = new)" end=";" + +# Comments. +color green "(^|[[:space:]])#.*" + +color yellow start="<< 'STOP'" end="STOP" diff --git a/original/php.nanorc b/original/php.nanorc new file mode 100644 index 0000000..1a61f06 --- /dev/null +++ b/original/php.nanorc @@ -0,0 +1,35 @@ +## Here is an example for PHP. + +syntax php "\.(php[23457s~]?|phtml|ctp)$" +magic "PHP script" +comment "//" + +# PHP markings. +color brightgreen "(<\?(php)?|\?>)" + +# Function names. +color white "\<[A-Za-z_][A-Za-z_0-9]*\(" +# Variable names. +color cyan "\$[A-Za-z_][A-Za-z_0-9]*" + +# Types. +color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>" + +# Directives and structure. +color brightcyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>" +color brightcyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>" +# Operators. +color brightcyan "\<(and|or|xor)\>" + +# Control flow. +color magenta "\<(break|continue|goto|return)\>" + +# Strings. +color brightyellow ""(\.|[^"])*"" "'(\.|[^'])*'" + +# Comments. +color brightblue "(^|[[:space:]]+)//.*" +color brightblue start="/\*" end="\*/" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/po.nanorc b/original/po.nanorc new file mode 100644 index 0000000..ecbfb7d --- /dev/null +++ b/original/po.nanorc @@ -0,0 +1,29 @@ +## Colouring for PO files. + +syntax po "\.pot?$" +comment "#" + +# Comments. +color green "^#.*$" +color yellow "Copyright|\(C\)" +# Header fields. +color brightred "^\"X-Bugs:.*\"$" +color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language(\-Team)?|X-Bugs|X-Generator|Plural\-Forms)\>" +color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>" +# Encodings and numbers. +color yellow "\<(UTF|ISO|Windows|Mac|IBM)-[0-9]+" +color yellow "\<((pre|rc)?[0-9]+|[0-9]bit)\>" +# Msgids. +color brightblue "^(msgid|msgid_plural|msgstr)\>" +# Tags. +color red " fuzzy(,|$)" +color yellow " (no-)?[-[:alpha:]]+-format(,|$)" +# Format specifiers. +color brightmagenta "%([1-9]\$)?[a-z]*" +# Quotes and escaped characters. +color yellow "\"" +color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})" +# Reminders. +color brightwhite,yellow "(FIXME|TODO|XXX)" +# Obsolete strings. +color red "#~.*" diff --git a/original/postgresql.nanorc b/original/postgresql.nanorc new file mode 100644 index 0000000..d90344a --- /dev/null +++ b/original/postgresql.nanorc @@ -0,0 +1,74 @@ +## Here is an example for PostgreSQL. + +syntax sql "\.sql[2345s~]?$" +comment "-- " + +# Functions. +color white "\<[a-z_]*\(" + +# Types. +color green "\<(int2|smallint|int4|int|integer|int8|bigint|decimal|numeric|real|double precision|(small|big)?serial)\>" +color green "\<(bit( varying)?|boolean|bytea|enum|money|tsvector|uuid)\>" +color green "\<(char|varchar|character( varying)?|text)\>" +color green "\<(date|interval|time(stamp)?( with time zone| without time zone)?)\>" +color green "\<(point|line|lseg|path|box|polygon|circle)\>" +color green "\<(cidr|inet|macaddr)\>" +color green "\<(daterange|int4range|int8range|numrange|tsrange|tstzrange)\>" + +# Structure. +color brightyellow "\<(CASE|CLASS|DEFAULT|DO|ELSE|ELSEIF|FOR|FOREACH|FUNCTION|IF|IS NULL)\>" +color brightyellow "\<(NEW|PRIVATE|PUBLIC|RETURN|RETURNS|SETOF|SWITCH|THEN|WHEN|WHILE)>" + +# Control flow. +color magenta "\<(EXCEPTION|NOTICE|RAISE|RETURN)\>" + +# SQL keywords. +color blue "\<(ABORT|AGGREGATE|ALTER|ANALYZE|AND|AS|AUTHORIZATION|BEGIN|CAST|CHECKPOINT|CLASS|CLOSE)\>" +color blue "\<(CLUSTER|COLLATION|COMMENT|COMMIT|CONFIGURATION|CONSTRAINTS|CONVERSION|COPY|CREATE)\>" +color blue "\<(DATA|DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DICTIONARY|DISCARD|DO|DOMAIN|DROP)\>" +color blue "\<(END|EVENT|EXECUTE|EXPLAIN|EXTENSION|FAMILY|FETCH|FOREIGN|FROM|FUNCTION)\>" +color blue "\<(GRANT|GROUP|IF NOT EXISTS|IMMUTABLE|INDEX|INSERT|INTO|LABEL|LANGUAGE|LARGE|LOAD|LOCK)\>" +color blue "\<(MAPPING FOR|MATERIALIZED|MOVE|NOTIFY|OBJECT|OPERATOR|OPTIONS|OWNED|OWNER)\>" +color blue "\<(PARSER|PREPARED?|PRIVILEGES|REASSIGN|REFRESH|RELEASE|RESET|REVOKE|ROLE|ROLLBACK|RULE)\>" +color blue "\<(SAVEPOINT|SCHEMA|SEARCH|SECURITY|SELECT|SEQUENCE|SERVER|SESSION|SET|SHOW|SPACE|START|SYSTEM)\>" +color blue "\<(TABLE|TEXT|TO|TRANSACTION|TYPE|UPDATE|USER|VACUUM|VALUES|VIEW|WHERE|WITH|WRAPPER)\>" + +# Strings. +color brightyellow "<[^= ]*>" ""(\.|[^"])*"" + +# Trailing whitespace. +color ,green "[[:space:]]+$" + +# 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]?<[^>]*>" +color green "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" + +# Expression substitution. These go inside double-quoted strings, +# "like #{this}". +color brightgreen "#\{[^}]*\}" + +# Strings, single-quoted. +color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" +color green "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" + +# Comments. +color red "##?[^{].*" "##?$" +color red "--[^{].*" "--$" +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +# PostgreSQL markings. +color red "(--)" + +# PostgreSQL default schemas. +color brightred "(pg_catalog|public)" + +# PostgreSQL PLs. +color brightblue "(pljava|plperlu?|plpgsql|plpy|plpythonu?|plr|plruby|plsh|pltcl|plscheme)" diff --git a/original/pov.nanorc b/original/pov.nanorc new file mode 100644 index 0000000..ad1e4e7 --- /dev/null +++ b/original/pov.nanorc @@ -0,0 +1,16 @@ +## Here is an example for POV-Ray. + +syntax pov "\.(pov|POV|povray|POVRAY)$" +comment "//" + +color brightcyan "^[[:space:]]*#[[:space:]]*(declare)" +color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>" +color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>" +color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>" +color brightred "\<(background|camera|fog|light_source|object|texture)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color brightmagenta "\<(union|group|subgroup)\>" + +# Comments. +color brightblue "//.*" +color brightblue start="/\*" end="\*/" diff --git a/original/python.nanorc b/original/python.nanorc new file mode 100644 index 0000000..bc6b84f --- /dev/null +++ b/original/python.nanorc @@ -0,0 +1,39 @@ +## Here is an example for Python. + +syntax python "\.py$" +header "^#!.*python" +magic "Python script" +linter pyflakes +comment "#" + +# Function definitions. +color brightblue "def [0-9A-Za-z_]+" +# Keywords. +color brightcyan "\<(and|as|assert|async|await|break|class|continue)\>" +color brightcyan "\<(def|del|elif|else|except|finally|for|from)\>" +color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>" +color brightcyan "\<(pass|raise|return|try|while|with|yield)\>" + +# These two are keywords in Python 2, but functions in Python 3, +# so only color them when they are followed by whitespace, assuming +# that print(x) is a function invocation and print (x) is a statement. +color brightcyan "\<(exec|print)([[:blank:]]|$)" + +# Special values. +color brightmagenta "\<(False|None|True)\>" + +# Mono-quoted strings. +color brightgreen "'([^'\]|\\.)*'|'''" +color brightgreen ""([^"\]|\\.)*"|"""" +color normal "'''|"""" +# Comments. +color brightred "(^|[[:blank:]])#.*" +# Triple-quoted strings. +color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" +color brightgreen start=""""([^"),]|$)" end="(^|[^(\])"""" + +# Reminders. +color brightwhite,yellow "(FIXME|TODO|XXX)" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/ruby.nanorc b/original/ruby.nanorc new file mode 100644 index 0000000..c331723 --- /dev/null +++ b/original/ruby.nanorc @@ -0,0 +1,36 @@ +## Here is an example for Ruby. + +syntax ruby "\.rb$" +header "^#!.*ruby" +magic "Ruby script" +linter ruby -w -c +comment "#" + +# Reserved words. +color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>" +color yellow "\<(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". +color magenta "([ ]|^):[0-9A-Za-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}". +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/original/rust.nanorc b/original/rust.nanorc new file mode 100644 index 0000000..aca2b9c --- /dev/null +++ b/original/rust.nanorc @@ -0,0 +1,39 @@ +## Syntax highlighting for Rust. +## Copyright 2015 Luke Francl. +## Licensed under GPL version 3. + +## NOTE: Rules are applied in order: later rules re-colorize matching text. + +syntax rust "\.(rlib|rs)$" +comment "//" + +# Function definitions +color magenta "fn [a-z_0-9]+" + +# Reserved words +color yellow "\<(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\>" + +# Macros +color red "[a-z_]+!" + +# Constants +color magenta "[A-Z][A-Z_0-9]+" + +# Traits/Enums/Structs/Types/... +color magenta "[A-Z][A-Za-z0-9]+" + +# Strings +color green "\".*\"" +color green start="\".*\\$" end=".*\"" +## NOTE: This isn't accurate, but matching "#{0,} for the end of the string is too liberal. +color green start="r#+\"" end="\"#+" + +# Comments +color blue "//.*" +color blue start="/\*" end="\*/" + +# Attributes +color magenta start="#!\[" end="\]" + +# Some common markers +color brightcyan "(XXX|TODO|FIXME|\?\?\?)" diff --git a/original/sh.nanorc b/original/sh.nanorc new file mode 100644 index 0000000..10de221 --- /dev/null +++ b/original/sh.nanorc @@ -0,0 +1,37 @@ +## Here is an example for Bourne shell scripts. + +syntax sh "(\.sh|\.(a|ba|c|da|k|mk|pdk|tc|z)(sh|shrc|sh_profile)|/(etc/|\.)profile)$" +header "^#!.*/(((a|ba|c|da|k|mk|pdk|tc|z)?sh)|(busybox|env) +sh|openrc-run|runscript)" +magic "(POSIX|Bourne-Again) shell script.*text" +linter dash -n +comment "#" + +# Function declarations. +color brightgreen "^[A-Za-z0-9_-]+\(\)" + +# Keywords, symbols, and comparisons. +color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" +color green "\<(declare|eval|exec|export|let|local)\>" +color green "[{}():;|`$<>!=&\\]" "(\]|\[)" +color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>" + +# Short and long options. +color brightmagenta "[[:blank:]]-[A-Za-z]\>" "[[:blank:]]--[A-Za-z-]+\>" + +# Common commands. +color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|cut|echo|env|grep|head|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|sort|tail|tar|touch|umask|unset)\>" +color normal "[.-]tar\>" + +# Basic variable names (no braces). +color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*" +# More complicated variable names; handles braces and replacements and arrays. +color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" + +# Comments. +color cyan "(^|[[:space:]])#.*" + +# Strings. +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/spec.nanorc b/original/spec.nanorc new file mode 100644 index 0000000..fb9170c --- /dev/null +++ b/original/spec.nanorc @@ -0,0 +1,40 @@ +## Syntax highlighting for RPM spec files. + +syntax spec "\.spec(\.[^/]+)?$" +comment "#" + +# Main tags. +color brightblue "((Icon|ExclusiveOs|ExcludeOs)[[:space:]]*:)" +color brightblue "((BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch)[[:space:]]*:)" +color brightblue "((Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements)[[:space:]]*:)" +color brightblue "((Epoch|Serial|Nosource|Nopatch)[[:space:]]*:)" +color brightblue "((AutoReq|AutoProv|AutoReqProv)[[:space:]]*:)" +color brightblue "((Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source\d*|Patch\d*|BuildRoot|Prefix)[[:space:]]*:)" +color brightblue "((Name|Version|Release|Url|URL)[[:space:]]*:)" +color brightblue start="^Source" end=":" start="^Patch" end=":" +# Architectures. +color brightred "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" +# Architecture conditionals. +color brightred "(ifarch|ifnarch)" +# OS conditionals. +color brightred "(ifos|ifnos)" +# %* strings. +color green "%([A-Z_a-z_0-9_]*)" +color magenta "%_([A-Z_a-z_0-9_]*)" +color yellow start="%__" end="\ " +color magenta start="%\{" end="\}" +color yellow start="%\{__" end="\}" +# Sections. +color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|pretrans|preun)" +color red "^%(post|posttrans|postun|trigger|triggerin|triggerpostun|triggerun|verifyscript)" +# Conditionals and defines. +color brightred "%(if|else|endif|define|global|undefine)" + +# Comments. +color cyan "#.*" +# Special case: "# norootforbuild" is handled as main tag. +color brightblue "^# norootforbuild" +# %changelog date entries. +color brightyellow "^\* .*\)$" +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/tcl.nanorc b/original/tcl.nanorc new file mode 100644 index 0000000..958b597 --- /dev/null +++ b/original/tcl.nanorc @@ -0,0 +1,22 @@ +## Syntax highlighting for Tcl files. + +syntax tcl "\.tcl$" +magic "Tcl(/Tk)? script" +comment "#" + +# Standard Tcl [info commands]: +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 subcommands: +color green "\" +color green "\" +# Extended TclX [info commands]: +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: +color brightblue "proc[[:space:]]" "(\{|\})" +color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)" +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color brightred "\$\{?[0-9A-Za-z_!@#$*?-]+\}?" +# Trailing whitespace: +color ,green "[[:space:]]+$" +# Comments: +color cyan "^[[:space:]]*#.*" diff --git a/original/tex.nanorc b/original/tex.nanorc new file mode 100644 index 0000000..4ddec06 --- /dev/null +++ b/original/tex.nanorc @@ -0,0 +1,10 @@ +## Here is a short example for TeX files. + +syntax tex "\.tex$" +magic "(La)?TeX document" +linter chktex -v0 -q -I +comment "%" + +color green "\\.|\\[A-Za-z]*" +color magenta "[{}]" +color blue "(^|[^\])%.*" diff --git a/original/texinfo.nanorc b/original/texinfo.nanorc new file mode 100644 index 0000000..2b8251b --- /dev/null +++ b/original/texinfo.nanorc @@ -0,0 +1,21 @@ +## Here is an example for Texinfo files. + +syntax texinfo "\.texi$" +header "^\\input texinfo" +magic "Texinfo source" +comment "@c " + +# Command arguments, trailing and enclosed. +color cyan "^@[a-z]+[[:space:]]+.*$" +color brightmagenta "@[a-zA-Z]+\{[^}]*\}" +# Commands themselves. +color yellow "@[a-zA-Z]+\{?" "\}" + +# Menu items. +color brightred "^\*[[:space:]]+.*::.*" + +# Comments. +color green "@c[[:space:]]+.*" + +# Trailing whitespace. +color ,green "[[:space:]]+$" diff --git a/original/xml.nanorc b/original/xml.nanorc new file mode 100644 index 0000000..c13c5eb --- /dev/null +++ b/original/xml.nanorc @@ -0,0 +1,22 @@ +## Here is an example for XML files. + +syntax xml "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$" +header "<\?xml.*version=.*\?>" +magic "(XML|SGML) (sub)?document" +comment "" + +# The entire content of the tag: +color green start="<" end=">" + +# The start and the end of the tag: +color cyan "<[^> ]+" ">" + +# The strings inside the tag: +color magenta "\"[^"]*\"" + +# Comments: +color yellow start="" +color yellow start="" + +# Escapes: +color red "&[^;]*;" diff --git a/themes/custom b/themes/custom index 2dda5ee..176e61f 100755 --- a/themes/custom +++ b/themes/custom @@ -1,7 +1,7 @@ #!/usr/bin/sed -f -# PROJECT -## Our approach to nano's highlight. +# CUSTOM +## Highlight, GUI and shortcuts.. # GUI Colors ## No GUI colors available, yet... diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..4f3a5be --- /dev/null +++ b/todo.md @@ -0,0 +1,4 @@ +# TODO + +1. Combine original files with project files. +2.