aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/color.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-12-24 13:29:32 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-12-24 13:29:32 +0300
commitef897b418a4487196e1dbc18a97046f8f0aea2e8 (patch)
tree264b026de6ce805f1bf371d1b01371c4ba1aed0c /lib/color.tes
parente5d1253d363a209ecd1288278808e38ac87b34d9 (diff)
downloadsciteco-ef897b418a4487196e1dbc18a97046f8f0aea2e8.tar.gz
introduced true block and EOL comments
* The previous convention of !* ... *! are now true block comments, i.e. they are parsed faster, don't spam the goto table and allow embedding of exclamation marks - only "*!" terminates the comment. * It is therefore now forbidden to have goto labels beginning with "*". * Also support "!!" to introduce EOL comments (like C++'s //). This disallows empty labels, but they weren't useful anyway. This is the shortest way to begin a comment. * All comment labels have been converted to true comments, to ensure that syntax highlighting works correctly. EOL comments are used for single line commented-out code, since it's easiest to uncomment - you don't have to jump to the line end. This is a pure convention / coding style. Other people might do it differently. * It's of course still possible to abuse goto labels as comments as TECO did for ages. * In lexing / syntax highlighting, labels and comments are highlighted differently. * When syntax highlighting, a single "!" will first be highlighted as a label since it's not yet unambiguous. Once you type the second character (* or !), the first character is retroactively styled as a comment as well.
Diffstat (limited to 'lib/color.tes')
-rw-r--r--lib/color.tes16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/color.tes b/lib/color.tes
index 23c14f3..eaa0baa 100644
--- a/lib/color.tes
+++ b/lib/color.tes
@@ -1,10 +1,10 @@
-! <r,g,b>M[color.rgb] -> Scintilla color !
+!* <r,g,b>M[color.rgb] -> Scintilla color *!
@[color.rgb]{
U.bU.gU.r
(Q.r # Q.g*256 # Q.b*256*256)
}
-! These 8 colors should be available on every system !
+!* These 8 colors should be available on every system *!
000,000,000:M[color.rgb]U[color.black]
128,000,000:M[color.rgb]U[color.red]
000,128,000:M[color.rgb]U[color.green]
@@ -14,7 +14,7 @@
000,128,128:M[color.rgb]U[color.cyan]
192,192,192:M[color.rgb]U[color.white]
-! Light color variants, might not be available on every terminal !
+!* Light color variants, might not be available on every terminal *!
064,064,064:M[color.rgb]U[color.lblack]
255,000,000:M[color.rgb]U[color.lred]
000,255,000:M[color.rgb]U[color.lgreen]
@@ -24,7 +24,7 @@
000,255,255:M[color.rgb]U[color.lcyan]
255,255,255:M[color.rgb]U[color.lwhite]
-! <[[flags,]bg,]fg,style>M[color.set] !
+!* <[[flags,]bg,]fg,style>M[color.set] *!
@[color.set]{
U.s U.f "~0'U.b "~0'U.h
Q.f,Q.sESSTYLESETFORE
@@ -33,9 +33,9 @@
Q.h&2,Q.sESSTYLESETITALIC
}
-! Reset all styles and setup the standard ones !
+!* Reset all styles and setup the standard ones *!
@[color.init]{
- ! Default text colors !
+ !* Default text colors *!
:M[color.default],32M[color.set]
ESSTYLECLEARALL
:M[color.linenumber],33M[color.set]
@@ -44,9 +44,9 @@
1ESSETCARETLINEVISIBLE
Q[color.selfore],1ESSETSELFORE
Q[color.selback],1ESSETSELBACK
- ! Calltips and popup windows !
+ !* Calltips and popup windows *!
:M[color.calltip],38M[color.set]
- ! Set up brace lightning !
+ !* Set up brace lightning *!
:M[color.bracelight],34M[color.set]
:M[color.error],35M[color.set]
}