]> git.wh0rd.org Git - nano.git/commitdiff
Making the component colouring simpler, and the URI colouring completer,
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 16 May 2014 20:13:02 +0000 (20:13 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 16 May 2014 20:13:02 +0000 (20:13 +0000)
and improving the comments -- all for apt's sources list.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/debian.nanorc

index 757ce5757e807ff10f3e4f84dcc7e2d50dbfe000..3304a28aaba44bc78f222c24892046a48f12933c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2014-05-16  Benno Schulenberg  <bensberg@justemail.net>
        * src/text.c, src/winio.c: Remove some more double spaces.
        * doc/syntax/patch.nanorc: Show trailing whitespace on added lines.
+       * doc/syntax/debian.nanorc: Make the component colouring simpler,
+       and the URI colouring completer, and improve the comments.
 
 2014-05-16  David Lawrence Ramsey  <pooka109@gmail.com>
        * src/color.c, src/cut.c, src/text.c: Tweak some whitespace.
index 0803fd0d65adf970efd6658a3e1dc7e3bdd8037b..1083abe7110691b4fd6985c46b65930d3e76c059 100644 (file)
@@ -1,19 +1,19 @@
-## Here is an exmaple for apt's sources.list.
-## (adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano)
-##
+## Here is an example for apt's sources.list.
+
 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...
+
+# 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)? ((http|ftp|rsh|ssh|file|copy):/[^ ]+|cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/) [^ ]+"
+# URIs.
+color brightgreen "(http|ftp|rsh|ssh|file|copy):/[^ ]+"
+# CDroms.
 color brightgreen "cdrom:\[[-a-zA-Z0-9\._\(\) ]+\]/"
-# deb / deb-src
-color yellow "^deb"
-color yellow "^deb-src"
-# comments
+# And finally the initial deb tag.
+color yellow "^deb(-src)?"
+
+# Comments.
 color brightblue "#.*"