Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/serialhex/nano-highlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Muir Hamilton <aaron@correspondwith.me>2013-11-15 00:58:30 +0400
committerAaron Muir Hamilton <aaron@correspondwith.me>2013-11-15 00:58:30 +0400
commitbf8f11a0c4c0382cf8f3ad238ebbc19b97e71569 (patch)
tree08b6e8ca0b243d1cea2b811fc2d1020bcbfb8c25
parent8c52aa7091e3ab9cbf9b27f87738fac842f72aa9 (diff)
Improve functionality:
emailquote.nanorc De-goof and partially normalize: dummy.nanorc emailquote.nanorc etc-stuff.nanorc # NOTE: A lot of these are hideous. etcxml.nanorc # NOTE: Gentoorc handling was moved to gentoo.nanorc fortran.nanorc gentoo.nanorc # NOTE: gentoorc goodies(I hope) from etcxml.nanorc Remove commented legacy blocks from: Remove altogether:
-rw-r--r--delphi.nanorc2
-rw-r--r--desc.nanorc1
-rw-r--r--dotemacs.nanorc2
-rw-r--r--dummy.nanorc3
-rw-r--r--emailquote.nanorc4
-rw-r--r--etc-stuff.nanorc5
-rw-r--r--etcxml.nanorc29
-rw-r--r--fortran.nanorc11
-rw-r--r--gentoo.nanorc67
9 files changed, 60 insertions, 64 deletions
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..3fb3138 100644
--- a/gentoo.nanorc
+++ b/gentoo.nanorc
@@ -1,18 +1,21 @@
-## 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 ... 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|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 +23,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: # 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 "&[^;]*;"