[patch] small syntax file patches
tux at centrum.cz
tux at centrum.cz
Tue Jul 1 09:18:01 UTC 2003
I am sending a patch for html.syntax file. It has one advantage over the old one, if you forget somewhere lonely & (which should be & instead), you are alarmed by having this symbol bright red colored. Also in things like   is the ampersand also colored bright red to warn you that you are missing a ';' character (cause it should be and not just   )
--- html.syntax Sun Sep 29 20:22:25 2002
+++ html.syntax Mon Jun 30 02:27:34 2003
@@ -2,6 +2,7 @@
keyword &\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]; brightgreen
keyword &#\{xX\}\[0123456789abcdefABCDEF\]; brightgreen
keyword &#\[0123456789\]; brightgreen
+ keyword & brightred
spellcheck
context <!-- --> brown
In C and Java there is missing the ! operator (maybe in other languages too, I have not checked)
(in C also & operator is missing and in both java and C maybe also . operator - not sure if you
want to color it too)
--- c.syntax Thu Jun 26 22:20:53 2003
+++ c.syntax Mon Jun 30 02:58:22 2003
@@ -84,6 +84,8 @@
keyword % yellow
keyword = yellow
keyword != yellow
+ keyword ! yellow
+ keyword & yellow
keyword == yellow
keyword { brightcyan
keyword } brightcyan
--- java.syntax Thu Jun 26 22:20:54 2003
+++ java.syntax Mon Jun 30 02:51:58 2003
@@ -120,6 +120,7 @@
keyword % yellow
keyword = yellow
keyword != yellow
+ keyword ! yellow
keyword == yellow
keyword { brightcyan
keyword } brightcyan
Also note, when ading something like:
keyword whole 0+ brightcyan
keyword whole 1+ brightcyan
keyword whole 2+ brightcyan
keyword whole 3+ brightcyan
keyword whole 4+ brightcyan
keyword whole 5+ brightcyan
keyword whole 6+ brightcyan
keyword whole 7+ brightcyan
keyword whole 8+ brightcyan
keyword whole 9+ brightcyan
to c.syntax, pas.syntax, java.syntax and possibly others, you can have
numbers colored in bright blue (which I think is more eye friendly, you
see all numbers in source code bettter)
in pas.syntax you can also add
keyword whole $+ brightcyan
to have hexadecimal digits colored too, maybe you can use different colors for different languages (I just checked c, java and pascal)
maybe it can be written better, does mc syntax support something like
'keyword whole [0-9]+ brightcyan'? (\[0-9\]+ doesn't seem to work) so
i can write these ten lines with one line?
Martin Petricek
--------------------
Jeden z největších letních open air festivalů v České republice. 3. - 6. 7. 2003, Český Brod. Těšit se můžete na téměř 130 umělců, kapel a DJs.
http://user.centrum.cz/redir.php?url=http://www.rockforpeople.cz
More information about the mc-devel
mailing list