<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/doc/sciteco.7.template, branch master</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>added left shift (^&lt;) and right shift (^&gt;) operators</title>
<updated>2026-11-15T07:57:03+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-11-15T07:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=902940401d1c1e657cdaf3e7bae8cbb89d14ffa9'/>
<id>902940401d1c1e657cdaf3e7bae8cbb89d14ffa9</id>
<content type='text'>
Previously you'd have to write `a * 2^*b` for left shift, which
is inefficient and cumbersome.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously you'd have to write `a * 2^*b` for left shift, which
is inefficient and cumbersome.
</pre>
</div>
</content>
</entry>
<entry>
<title>support floating point numbers</title>
<updated>2026-10-31T20:13:19+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-31T12:46:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4aa2b717f9e050783b567540d9bb0193d692e3e9'/>
<id>4aa2b717f9e050783b567540d9bb0193d692e3e9</id>
<content type='text'>
* Extends the SciTECO type system. A number on the expression stack
  or in a Q-register can be either an integer or a float.
* Floating point constants begin with a digit (like all other
  numbers), are followed by a `.` and an optional fractional part.
  Exponents cannot currently be written.
  E.g. `1.` == `1.0`. But `.0` would still be `.,0`.
  (!) To push an integer followed by dot, you must now write e.g. `1,.` or `1 .`.
* All of the basic arithmetic operators operate like this:
  If both operands are integers, the result is also an integer (integer arithmetics).
  If at least one of the operands is a float, the result is also a float (float arithmetics).
* All of the binary operators (AND, OR, XOR) always cast all
  operands to integer and the result is always an integer as well.
* You can "cast" integers to float by `*1.` or `/1.`.
  You can "cast" floats to integers using `#0`.
* Most commands still accept only integers. Floats are implicitly casted to integers.
  Float-aware commands are: =, \, ^W, Qq, Uq, %q and the conditionals.
* `%q` will not change the current type of register q.
* Numeric part of "lexer.font" is now a float (in points).
* You cannot currently print octal and hexadecimal floats.
  `==` and `===` are identical to `=` on floats.
* `===` is now printing hex integers in lower case.
  This is because SciTECO's coding style for hex constants is also lower case.
* `--with-teco-integer` renamed to `--with-teco-number`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Extends the SciTECO type system. A number on the expression stack
  or in a Q-register can be either an integer or a float.
* Floating point constants begin with a digit (like all other
  numbers), are followed by a `.` and an optional fractional part.
  Exponents cannot currently be written.
  E.g. `1.` == `1.0`. But `.0` would still be `.,0`.
  (!) To push an integer followed by dot, you must now write e.g. `1,.` or `1 .`.
* All of the basic arithmetic operators operate like this:
  If both operands are integers, the result is also an integer (integer arithmetics).
  If at least one of the operands is a float, the result is also a float (float arithmetics).
* All of the binary operators (AND, OR, XOR) always cast all
  operands to integer and the result is always an integer as well.
* You can "cast" integers to float by `*1.` or `/1.`.
  You can "cast" floats to integers using `#0`.
* Most commands still accept only integers. Floats are implicitly casted to integers.
  Float-aware commands are: =, \, ^W, Qq, Uq, %q and the conditionals.
* `%q` will not change the current type of register q.
* Numeric part of "lexer.font" is now a float (in points).
* You cannot currently print octal and hexadecimal floats.
  `==` and `===` are identical to `=` on floats.
* `===` is now printing hex integers in lower case.
  This is because SciTECO's coding style for hex constants is also lower case.
* `--with-teco-integer` renamed to `--with-teco-number`.
</pre>
</div>
</content>
</entry>
<entry>
<title>numbers are separate parser states and there are syntactic octal and hexadecimal constants now</title>
<updated>2026-10-25T10:38:05+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-25T01:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e0bf13622b0922252439e3fa8b43df9877678d75'/>
<id>e0bf13622b0922252439e3fa8b43df9877678d75</id>
<content type='text'>
* Instead of every digit being a stack-modifying standalone
  command, there is a single continuous parser state (teco_state_number)
  now - even though it has certain unique characteristics.
  They are consequently documented in the ARITHMETICS AND
  EXPRESSIONS chapter of sciteco(7).
* A number will therefore be rubbed out entirely by CTRL+W,
  including a possible @-modifier.
* (!) Spaces within constants are no longer ignored, but will push
  separate numbers to the stack instead (`1 2 3` pushes 3 numbers).
  The significance of the `,` operator is thus further reduced.
* (!) You can no longer "append" to numbers on the stack as in
  `Qa001` - this was never actually used and caused more confusion.
* (!) Digits outside the current radix are no longer accepted.
  E.g. digit 2 after `2^R`. This feature was also never used.
* (!) Octal constants are supported with leading zeros as in C.
  This works regardless of the current radix set via `8^R` or `^O`.
  It remains to see whether this is actually useful or is rather
  annoying (since every constant beginning with 0 is automatically
  octal, you cannot left-pad arbitrary numbers with 0).
* Hexadecimal constants are supported by at-modifying them as in
  `@0ff`. They must still begin with a digit 0-9 and since A-F are
  valid SciTECO commands, you may need additional spaces to separate
  hexadecimal constants from regular commands as in `@0ff D`.
  During syntax highlighting the number style is extended back to the
  at-sign.
  Note: Hexadecimal constants couldn't have been realized via
  `16^R` (or some shortcut) since that depends on runtime state, but
  we must know during parsing whether symbols A-F are part of the
  number of regular SciTECO commands.
* The new hexadecimal constants are used in the color schemes now.
  Thanks to them, we no longer need workarounds like the "color.rgb"
  macro.
* Since numbers don't have a dedicated terminator character, but any
  letter may terminate it, the number state must behave similar to a
  start state. Consequently, hexadecimal constants will currently be
  auto-case-folded if you enabled this feature.
  I recommend not to write hex constants in upper-case, though.
  Perhaps this should be worked around with a custom process_edit_cmd()
  callback.
* Test suite updated
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Instead of every digit being a stack-modifying standalone
  command, there is a single continuous parser state (teco_state_number)
  now - even though it has certain unique characteristics.
  They are consequently documented in the ARITHMETICS AND
  EXPRESSIONS chapter of sciteco(7).
* A number will therefore be rubbed out entirely by CTRL+W,
  including a possible @-modifier.
* (!) Spaces within constants are no longer ignored, but will push
  separate numbers to the stack instead (`1 2 3` pushes 3 numbers).
  The significance of the `,` operator is thus further reduced.
* (!) You can no longer "append" to numbers on the stack as in
  `Qa001` - this was never actually used and caused more confusion.
* (!) Digits outside the current radix are no longer accepted.
  E.g. digit 2 after `2^R`. This feature was also never used.
* (!) Octal constants are supported with leading zeros as in C.
  This works regardless of the current radix set via `8^R` or `^O`.
  It remains to see whether this is actually useful or is rather
  annoying (since every constant beginning with 0 is automatically
  octal, you cannot left-pad arbitrary numbers with 0).
* Hexadecimal constants are supported by at-modifying them as in
  `@0ff`. They must still begin with a digit 0-9 and since A-F are
  valid SciTECO commands, you may need additional spaces to separate
  hexadecimal constants from regular commands as in `@0ff D`.
  During syntax highlighting the number style is extended back to the
  at-sign.
  Note: Hexadecimal constants couldn't have been realized via
  `16^R` (or some shortcut) since that depends on runtime state, but
  we must know during parsing whether symbols A-F are part of the
  number of regular SciTECO commands.
* The new hexadecimal constants are used in the color schemes now.
  Thanks to them, we no longer need workarounds like the "color.rgb"
  macro.
* Since numbers don't have a dedicated terminator character, but any
  letter may terminate it, the number state must behave similar to a
  start state. Consequently, hexadecimal constants will currently be
  auto-case-folded if you enabled this feature.
  I recommend not to write hex constants in upper-case, though.
  Perhaps this should be worked around with a custom process_edit_cmd()
  callback.
* Test suite updated
</pre>
</div>
</content>
</entry>
<entry>
<title>help topics no longer need to be unique and can be toggled through with the `?$` command.</title>
<updated>2026-10-13T23:54:14+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-13T23:54:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8b54d2c31410fcac43c8903007fe0738312834b0'/>
<id>8b54d2c31410fcac43c8903007fe0738312834b0</id>
<content type='text'>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</pre>
</div>
</content>
</entry>
<entry>
<title>LSP: auto-complete symbols via the textDocument/completion request</title>
<updated>2026-10-04T21:07:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-18T23:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e7e539f20c50bd276d63a1c279e2bc8706df8a5c'/>
<id>e7e539f20c50bd276d63a1c279e2bc8706df8a5c</id>
<content type='text'>
This currently only works in insert commands after enabling the immediate
editing modifier via CTRL+G and if the LSP was already launched
(e.g. by an explicit `FT$`).
File name completions are still performed with an activated ^G modifier
only if the LSP is shut down.

Just like for file names, the modifier is automatically cancelled after
a successful completion - there is little sense in completing several
symbols in a row.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This currently only works in insert commands after enabling the immediate
editing modifier via CTRL+G and if the LSP was already launched
(e.g. by an explicit `FT$`).
File name completions are still performed with an activated ^G modifier
only if the LSP is shut down.

Just like for file names, the modifier is automatically cancelled after
a successful completion - there is little sense in completing several
symbols in a row.
</pre>
</div>
</content>
</entry>
<entry>
<title>automatically disable ^G modifier after successful auto-completions</title>
<updated>2026-10-04T20:18:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-04T19:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b'/>
<id>bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b</id>
<content type='text'>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</pre>
</div>
</content>
</entry>
<entry>
<title>^E at the end of a line in a string argument "swallows" the EOL character</title>
<updated>2026-09-26T22:12:30+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-26T22:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5'/>
<id>e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5</id>
<content type='text'>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>support lookups via language servers (LSP)</title>
<updated>2026-08-10T22:38:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-02T13:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=44f5bf677282308b959411c416da2b5b08db2062'/>
<id>44f5bf677282308b959411c416da2b5b08db2062</id>
<content type='text'>
* The main interface is the `FT` command.
  `FT` was an undocumented Video TECO command for etags/ctags lookups.
  I don't want to exactly copy its interface, though.
* `FT` allows looking up symbol names,
  definitions and references.
* ctags will be supported via ctags-lsp.
  LSP support is more powerful though and works without
  regenerating TAGS files all the time.
  The LSP will also allow you to customize auto-completions
  using SciTECO itself (i.e. by writing a language server
  in SciTECO).
* For multiple results, `FT$` can be used to cycle through
  results - this should mimic repeated `S$` or `N$`.
* `:FT...$` does a fuzzy search. IMHO it's not important
  to return a status integer instead. `FT` will only
  really be used in interactive mode.
* Document synchronization is supported via hooks from
  ring.c and via Scintilla notifications.
* Currently, the LSP communication is based on blocking
  GIOChannels. This means that a misbehaving hanging
  server could "lock up" the entire editor (FIXME).
  Only on ncurses you can always kill the subprocess by
  pressing CTRL+C.
  We need helper functions in spawn.c to read and write
  with interruptions.
* The textDocument/didChange notification transmits
  not only all edits, but all files' contents as well
  during initial synchronization.
  Therefore it is optimized to write and JSON-escape
  data without copying them around in memory and without
  destroying the buffer gap.
* Use $SCITECO_LSP to configure the language server.
  You can also use `tee` to capture stdin and stdout.
  Perhaps $SCITECO_LSP should be saved in .teco_session,
  so you can change it between projects?
* $SCITECO_LSP_ROOT is used to point to the project's
  root directory. session.tes will set it up automatically.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The main interface is the `FT` command.
  `FT` was an undocumented Video TECO command for etags/ctags lookups.
  I don't want to exactly copy its interface, though.
* `FT` allows looking up symbol names,
  definitions and references.
* ctags will be supported via ctags-lsp.
  LSP support is more powerful though and works without
  regenerating TAGS files all the time.
  The LSP will also allow you to customize auto-completions
  using SciTECO itself (i.e. by writing a language server
  in SciTECO).
* For multiple results, `FT$` can be used to cycle through
  results - this should mimic repeated `S$` or `N$`.
* `:FT...$` does a fuzzy search. IMHO it's not important
  to return a status integer instead. `FT` will only
  really be used in interactive mode.
* Document synchronization is supported via hooks from
  ring.c and via Scintilla notifications.
* Currently, the LSP communication is based on blocking
  GIOChannels. This means that a misbehaving hanging
  server could "lock up" the entire editor (FIXME).
  Only on ncurses you can always kill the subprocess by
  pressing CTRL+C.
  We need helper functions in spawn.c to read and write
  with interruptions.
* The textDocument/didChange notification transmits
  not only all edits, but all files' contents as well
  during initial synchronization.
  Therefore it is optimized to write and JSON-escape
  data without copying them around in memory and without
  destroying the buffer gap.
* Use $SCITECO_LSP to configure the language server.
  You can also use `tee` to capture stdin and stdout.
  Perhaps $SCITECO_LSP should be saved in .teco_session,
  so you can change it between projects?
* $SCITECO_LSP_ROOT is used to point to the project's
  root directory. session.tes will set it up automatically.
</pre>
</div>
</content>
</entry>
<entry>
<title>imported sj.h - a minimalist JSON parser</title>
<updated>2026-08-10T21:55:40+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-02T13:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9b78fc83dbd29b5594431b1c49b7d13865141aaa'/>
<id>9b78fc83dbd29b5594431b1c49b7d13865141aaa</id>
<content type='text'>
It will be useful for implementing LSP support.
It does not have JSON escape/unescape functions, so those
will still have to be written.

Source: https://github.com/rxi/sj.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It will be useful for implementing LSP support.
It does not have JSON escape/unescape functions, so those
will still have to be written.

Source: https://github.com/rxi/sj.h
</pre>
</div>
</content>
</entry>
<entry>
<title>conditionals can be terminated with F" now in addition to a single-quote (')</title>
<updated>2026-07-26T10:28:34+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-07-26T00:36:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=68364bd3637b6944fa1f63a00dae5caf375afab9'/>
<id>68364bd3637b6944fa1f63a00dae5caf375afab9</id>
<content type='text'>
This is useful when writing small macros directly on the
command-line as in `sciteco --eval`. If you use double quoted shell
strings, too many characters have to be escaped.
If you use single-quotes, though, embedding the conditional end (')
is annoying -- it would have to be written as '\''.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful when writing small macros directly on the
command-line as in `sciteco --eval`. If you use double quoted shell
strings, too many characters have to be escaped.
If you use single-quotes, though, embedding the conditional end (')
is annoying -- it would have to be written as '\''.
</pre>
</div>
</content>
</entry>
</feed>
