aboutsummaryrefslogtreecommitdiffhomepage
path: root/sample.teco_ini
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 /sample.teco_ini
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 'sample.teco_ini')
-rw-r--r--sample.teco_ini64
1 files changed, 35 insertions, 29 deletions
diff --git a/sample.teco_ini b/sample.teco_ini
index 2935d95..02c8bcb 100644
--- a/sample.teco_ini
+++ b/sample.teco_ini
@@ -1,18 +1,18 @@
-! TECO.INI !
+!* TECO.INI *!
-! Set default terminal color scheme !
+!* Set default terminal color scheme *!
EMQ[$SCITECOPATH]/color.tes
:EMQ[$SCITECOPATH]/colors/terminal.tes
-! Load lexer and buffer session libraries !
+!* Load lexer and buffer session libraries *!
EMQ[$SCITECOPATH]/lexer.tes
EMQ[$SCITECOPATH]/session.tes
-! Automatic lexing and session management using ED hooks !
+!* Automatic lexing and session management using ED hooks *!
@#ED{
Oadd,edit,close,quit
!add!
- ! Add code here to execute when a document is added !
+ !* Add code here to execute when a document is added *!
:Q*+1Oedit
32,0ED
@@ -21,7 +21,7 @@ EMQ[$SCITECOPATH]/session.tes
M[lexer.auto]
- ! Set up margins !
+ !* Set up margins *!
[_:M[lexer.test.woman]]_"F
33ESTEXTWIDTH9U.w
5*Q.w,0ESSETMARGINWIDTHN
@@ -29,52 +29,58 @@ EMQ[$SCITECOPATH]/session.tes
'
0,32ED
- ! fall through !
+ !* fall through *!
!edit!
- ! Add code here to execute when a document is edited !
+ !* Add code here to execute when a document is edited *!
ESGETCOLUMN,4EJ

!close!
- ! Add code here to execute when a document is closed !
+ !* Add code here to execute when a document is closed *!

!quit!
- ! Add code here to execute when SciTECO quits !
+ !* Add code here to execute when SciTECO quits *!
M[session.save]
}
0,32ED
-! Uncomment to enable automatic case folding !
-! 0,8ED !
+!* Uncomment to enable automatic case folding *!
+!!0,8ED
-! Tweak the default font name and size.
- The size unit is 1pt/100 !
-! [lexer.font]Monospace 1300U[lexer.font] !
+!*
+ * Tweak the default font name and size.
+ * The size unit is 1pt/100
+ *!
+!![lexer.font]Monospace 1300U[lexer.font]
-! Enable default function key macros !
+!* Enable default function key macros *!
EMQ[$SCITECOPATH]/fnkeys.tes
-! Uncomment if terminal supports OSC-52 clipboards !
-! 0,256ED !
+!* Uncomment if terminal supports OSC-52 clipboards *!
+!!0,256ED
-! Uncomment to enable Unicode icons in the Curses UI !
-! 0,512ED !
+!* Uncomment to enable Unicode icons in the Curses UI *!
+!!0,512ED
-! Uncomment to tweak the memory limit !
-! 500*1000*1000,2EJ !
+!* Uncomment to tweak the memory limit *!
+!!500*1000*1000,2EJ
-! If files are given on the command-line, open them
- and disable session saving.
- Otherwise open a buffer session. !
+!*
+ * If files are given on the command-line, open them
+ * and disable session saving.
+ * Otherwise open a buffer session.
+ *!
Z"=
- ! Uncomment to use a separate session per VCS repository or
- working copy (see session.tes): !
- ! M[session.vcs] !
+ !*
+ * Uncomment to use a separate session per VCS repository or
+ * working copy (see session.tes):
+ *!
+ !!M[session.vcs]
M[session.load]
|
- [session.path] ! disables session saving !
+ [session.path] !* disables session saving *!
[.f
<:L;R 0X.f [* EBN.f ]* L>
].f