Age | Commit message (Collapse) | Author | Files | Lines |
|
This was broken by e82dc6639e829490cb11267fa4a49ef97c6459ae, i.e. wasn't broken in v2.4.0.
|
|
Hard tabs would even cause YAML syntax errors.
|
|
CI and nightlies
* They would get the --program-prefix.
* If they aren't installed as real scripts, there is no point in fixing up their
hash-bang lines.
* The hash-bang line fix won't work on Windows anyway, so they are now disabled for
grosciteco and tedoc as well.
|
|
A 32-bit word is enough to carry the information of which control code to echo or not.
|
|
tecat.tes and repl.tes are now executable scripts, even though they are
installed into the $SCITECOPATH.
This is still much slower than the Lua version here:
https://gist.github.com/rhaberkorn/6534ecf1b05de6216d0a9c33f31ab5f8
|
|
special Q-registers ^Ax
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine
--stdin with passing command-line arguments to macros.
* The old approach of passing command-line arguments via lines in the
unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF.
This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO.
* You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`.
You can practically use SciTECO as a pager.
* htbl.tes is now a command-line filter (uses -qio).
* grosciteco.tes reads Troff intermediate code from stdin, so we no longer need
"*.intermediate" temporary files.
* added a getopt.tes test case to the testsuite.
* This change unfortunately breaks most macros accepting command-line arguments,
even if they used getopt.tes.
It also requires updating ~/.teco_ini - see fallback.teco_ini.
|
|
* Unfortunately, this will currently just terminate when some command fails.
We require an error catching mechanism to fix this up.
|
|
|
|
command now
* Improves DEC TECO-11 compatibility.
* <EM> is still supported as a synonym, but considered deprecated and is no longer documented.
A warning is printed when invoked.
It can be repurposed at any time in the future.
* `EI$` is not yet supported.
I am unsure whether this makes any sense.
|
|
Also, unterminated strings are highlighted with the "error" color now.
|
|
|
|
|
|
* After detecting +line[,column] constructs, the next argument is not parsed as a potential
filename:line[:column] construct.
* This code turned out to be tricky to get right, so I added a test case.
Standard library modules can well be checked in the test suite since
we have $SCITECOPATH pointing to the source tree's lib/ directory.
* Make sure that relevant variables from atlocal.in are really exported into the
process environment.
This was also broken for the Glib debug options.
|
|
* Set up the folding margin in the currently empty margin column
after the line number.
On Gtk, this meant resetting all the marker symbols and their
foreground/background colors as well as the margin's colors themselves.
This looks like a bug. It's not necessary on Scinterm, which apparently
uses the default/linenumber styles by default.
Perhaps we should try upgrading Scintilla?
* The folding state is considered not to be directly controlled by the
language (just like the scroll position and zoom level). That's why
we can directly control it by clicking on the margin column.
* F1 can be used to toggle all folds globally.
* The only support within the C core necessary for folding is to make
sure that the current line is unfolded after every keypress.
* We might add custom folding commands to the language later on
(e.g. F+, F-). In this case, the key macros will have to be changed
of course.
|
|
customized (refs #34)
* In the grosciteco-generated .woman.tec files, the fonts were only
set on the monospaced styles if lexer.font was set since it was
undefined by default.
We'd need a lare IF-ELSE statement to handle that in womanpages
since woman.tes changes the default font to a variable-width font.
Just leaving the default font, therefore won't work.
* We now always initialize lexer.font in lexer.tes.
You no longer have to check for its existance.
* Consequently, you can no longer set lexer.font *before* munging
lexer.tes because it will be overwritten.
At least not without additional checks.
Such a design is not suggested by fallback.teco_ini, though.
* Fixes monospaced sections in the tutorial and other womanpages on Gtk.
|
|
variable-width font is configurable via lexer.woman.font (refs #34)
* grosciteco was just hardcoding "Monospace", regardless of what was configured via lexer.font in ~/.teco_ini
* The variable-width font used for ordinary "womanpage" body texts was hardcoded to "Serif".
It is now configurable via the lexer.woman.font register.
* There is a difference, though:
lexer.font has no default value and must therefore be checked everywhere.
This is so you can set it even before munging lexer.tes.
lexer.woman.font however has a default (Serif), so it can only be overridden after
munging lexer.tes.
Perhaps it would be easier and more consistent to have a default for lexer.font as well.
|
|
file.patterns
The former is more basic and usually references file.patterns.
This helped for instance with processing SciTE's css.properties.
|
|
Especially useful since Gtk users are supposed to edit ~/.teco_css.
|
|
* The default womanpage font is the abstract "Serif" now, so that should be
more portable. "Times" wasn't found on Windows.
* Win32 distributions include a custom .teco_css now, which
removes the small-caps font attribute from the type label.
The default Gtk theme on Windows references the "Segoe UI" font
and it doesn't have a small-caps variant.
In fact no default Windows font appears to have one.
* We could add a custom .teco_ini to win32 distributions as well,
but there is currently no need for it.
* Do not distribute the /win32 files. They are used only for building
Win32/64 packages. There is no point in distributing them in the tarball if
the /debian and /freebsd directories aren't distributed as well.
|
|
update the horizontal position (4EJ)
|
|
* Unfortunately, the Lexilla lexer does not recognize PostgreSQL multiline
strings between $$...$$.
* All of the other SQL variants, that Scite supports, are skipped for the time
being. They'd probably have to be separate SciTECO lexer configs anyway.
|
|
* The old heuristics - scroll if dot changes after key press -
turned out to be too simplistic.
They broke the clang-format macro (M#cf), which left the view at the
top of the document since the entire document is temporarily erased.
Other simplified examples of this bug would be:
@^Um{[: HECcat$ ]:} Mm
Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
significant amount of text from the buffer.
The following test case replaces the previous character with a linefeed
in a single key press:
@^Um{-DI^J$} Mm
If executed on the last visible line, dot wouldn't be scrolled into the view
since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
fnkeys.tes, which is allowed to scroll dot outside of the visible area.
Therefore, dot is scrolled into view always, except after mouse events.
You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
in unexpected positions. This could either be fixed by eradicating all
remaining automatic scrolling from Scintilla or by explicitly restoring
the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
so it wasn't in v2.3.0.
|
|
There are still some glitches with non-mainstream assemblers like A86, though.
|
|
--without-lexilla
They don't require Lexilla, so it makes no sense not to exclude them.
|
|
* This is rendered with ms, so we now need the entire groff on Debian.
This is not a big deal as it just adds a few kilobytes of build-time dependencies.
Most platforms do not allow installation of some "groff-base" package anyway
and always draw in the entire package.
* sciteco.tmac has been extended to disable page breaks on ms.
* The tutorial is installed like any other woman page and can be invoked
interactively with ?tutorial$.
* It is optimized to be still usable on a plain 80x24 terminal.
|
|
The trailing digits where cut off the filename.
E.g. when trying `sciteco test.f77:100`, we would open test.f on line 100 instead.
|
|
lParam as null-terminated strings
* Being able to embed null bytes into the lParam string is
practically useless - there aren't any messages where this is useful
and where there are no native SciTECO counterparts - so this case is now catched
and the null-byte separates wParam from lParam.
* wParam can be the empty string, but it is not supported to pass wParam as a
string and lParam as the empty string.
If the second string argument ends in ^@, lParam is popped from the stack instead.
* This is a temporary workaround until we can properly parse the Scintilla.iface and
generate more elegant per-message wrappers.
* It in particular unlocks the SCI_SETREPRESENTATION and SCI_SETPROPERTY messages.
The former allows us to write a special hex-editor macro which sets hexadecimal
character representations, while the latter allows you to set lexer properties.
* The C-based lexers ("cpp" in Lexilla) can now take preprocessor definitions into account.
This is disabled by default, unless you set lexer.c.defines before opening a file.
You can also set it interactively and re-set the lexer. For instance:
^U[lexer.c.defines]NDEBUG$ M[lexer.set.c]
|
|
the beginning of words now
* All commands and their documentations were inconsistent.
* ^W rubbed out to the beginning of words.
* Shift+Right (fnkeys.tes) moved to the beginning of the next word if
invoked at the beginning of a word and to the end of the next word otherwise.
* <W> (and <V> and <Y> by extension) moved to the end of the next word.
* The cheat sheet would claim that <W> moves to the beginning of the next word.
* Video TECO's <W> command would differ again from everything else.
With positive arguments, it moved to the beginning of words, while
with negative it moved to end of words.
I decided not to copy this behavior.
* It has been decided to adopt a consistent beginning-of-words policy.
-W therefore differs from Video TECO in moving to the beginning of the
current or previous word.
* teco_find_words() is now based on parsing the document pointer, instead
of relying on SCI_WORDENDPOSITION, since the latter cannot actually be
used to skip strictly non-word characters.
This requires a constant amount of Scintilla messages but will require fewer
messages only when moving for more than 3 words.
* The semantics of <W> are therefore now consistent with Vim and Emacs as well.
* Shift+Right/Left is still based on SCI_WORDENDPOSITION, so it's behavior
differs slightly from <W> for instance at the end of lines, as it will
stop at linebreaks.
* Unfortunately, these changes will break lots of macros, among others
the M#rf, M#sp and git.blame macros ("Useful macros" from the wiki).
|
|
* You practically never want to indent in SciTECO code with hard tabs, as the hard tab is
an insertion command.
* 2-char soft tabs are the convention in SciTECO's included macros.
* Fixes the M#it macro among other things.
* If you do want to insert an insertion-with-tab command (ASCII 9), you almost always will
want to type it ^I instead.
Real ASCII 9s should consequently be highlighted, ie. there should be a character representation.
Unfortunately, character representations are currently set in C code and cannot be changed via <ES>.
|
|
These are all more or less plain text formats.
|
|
* Highlights both 1st level and 2nd level quotes and signatures.
* This also sets the edge to 78 columns, as is recommended for email and
enables word wrapping.
The edge mode is not set, since it kind of looks ugly in Scinterm.
* Helps when using SciTECO as the email editor for instance in the
Aerc mail client.
* Unfortunately, we cannot set up Scintilla to automatically break words
after 78 columns (or perhaps that's a good thing).
You can use the M#rf reformat-paragraph macro to reflow paragraphs
before sending the mail.
This will take the edge column into account even if no edge mode is set.
|
|
* Using the same values as on Curses/scinterm resulted in too dark colors with
terminal.tes. (solarized.tes actually defines all colors with its own RGB values,
so the look has always been consistent between Curses and GTK.)
This is because the values like 0xFF0000 for red are actually just placeholders in Scinterm,
in turn translated internally to Curses colors, which are interpreted by terminal emulators
with possibly various different color palettes.
* We therefore now use the exact RGB values as will be used by common terminal emulators
like xterm and st.
It does not guarantee that the colors will always match between Curses and GTK,
but at least the GTK colors are now a bit brighter.
|
|
* You need to set 0,64ED to enable mouse processing in Curses.
It is always enabled in Gtk as it should never make the experience worse.
sample.teco_ini enables mouse support, since this should be the new default.
`sciteco --no-profile` won't have it enabled, though.
* On curses, it requires the ncurses mouse protocol version 2, which will
also be supported by PDCurses.
* Similar to the Curses API, a special key macro ^KMOUSE is inserted if any of the supported
mouse events has been detected.
* You can then use -EJ to get the type of mouse event, which can be used
with a computed goto in the command-line editing macro.
Alternatively, this could have been solved with separate ^KMOUSE:PRESSED,
^KMOUSE:RELEASED etc. pseudo-key macros.
* The default ^KMOUSE implementation in fnkeys.tes supports the following:
* Left click: Edit command line to jump to position.
* Ctrl+left click: Jump to beginning of line.
* Right click: Insert position or position range (when dragging).
* Double right click: insert range for word under cursor
* Ctrl+right click: Insert beginning of line
* Scroll wheel: scrolls (faster with shift)
* Ctrl+scroll wheel: zoom (GTK-only)
* Currently, there is no visual feedback when "selecting" ranges
via right-click+drag.
This would be tricky to do and most terminal emulators do not appear
to support continuous mouse updates.
|
|
* This is done via the new opener.tes in the standard library.
* Some programs that use $EDITOR expect the +line syntax to work.
* You can copy filename:line:column directly from GCC error messages
and filename:line from grep output.
* Since there may be safe file names beginning with "+" or containing colons,
there needs to be a way to turn this off, especially for scripts that don't
know anything about the filenames to open.
This is done with "--".
Unfortunately, the first "--", that stops parameter processing,
is always removed from the command line and not passed down into TECO land.
This is not a problem for stand-alone scripts,
since the script filename is already stopping option processing, so "--"
would get passed down.
But when calling the profile via `sciteco -- ...`, you could prevent leading
minus signs to cause problems but since the `--` is removed, opener.tes cannot
use it as a hint.
Therefore, we introduced `-S` as a new alternative to `--`, that's always passed
down as `--` (i.e. it is equivalent to "-- --").
In other words, `sciteco -S *` will always open exactly the specified files
without any danger of misinterpreting certain file names.
Should we ever switch to a custom option parsing algorithm, we might preserve
"--" (unless after --mung) and thus get rid of "-S".
* This advanced behavior can be tweaked by the user relatively easily.
In the easiest case, we could replace M[opener] with
<:L;R 0X.f [* @EB/^EN.f/ ]* L>
in ~/.teco_ini to completely disable the special syntax.
|
|
* This goes into session.vcs as well.
* `fossil info` does not allow printing only the local-root property, so we have to do
some parsing afterwards.
|
|
* In fact, since SVN has --no-newline, this is even simpler than on Git and Mercurial.
* This requires at least Subversion v1.9 (2015, so should be safe).
|
|
* 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.
|
|
It's a bit easier on the eyes.
|
|
|
|
"identifier" to enable lexing in the container
* SCI_SETILEXER(NULL) is not a reliable way to do that since
that's the default for all views.
* This was breaking the git.tes lexer for instance and was unnecessarily
driving teco_lexer_style() on plain-text documents.
* Since we currently do not implement the ILexer5 C++ interface
and teco_view_t is just a pointer alias, we are abusing the view's "identifier" instead.
This is probably sufficient, as long as there is only one lexer "in the container".
Otherwise, there should perhaps be a single C++ class that does nothing but
wrapping a callback into an ILexer5 object with a C ABI.
|
|
* this works by embedding the SciTECO parser and driving it always (exclusively)
in parse-only mode.
* A new teco_state_t::style determines the Scintilla style for any character
accepted in the given state.
* Therefore, the SciTECO lexer is always 100% exact and corresponds to the current
SciTECO grammer - it does not have to be maintained separately.
There are a few exceptions and tweaks, though.
* The contents of curly-brace escapes (`@^Uq{...}`) are rendered as ordinary
code using a separate parser instance.
This can be disabled with the lexer.sciteco.macrodef property.
Unfortunately, SciTECO does not currently allow setting lexer properties (FIXME).
* Labels and comments are currently styled the same.
This could change in the future once we introduce real comments.
* Lexers are usually implemented in C++, but I did not want to draw in C++.
Especially not since we'd have to include parser.h and other SciTECO headers,
that really do not want to keep C++-compatible.
Instead, the lexer is implemented "in the container".
@ES/SCI_SETILEXER/sciteco/ is internally translated to SCI_SETILEXER(NULL)
and we get Scintilla notifications when styling the view becomes necessary.
This is then centrally forwarded to the teco_lexer_style() which
uses the ordinary teco_view_ssm() API for styling.
* Once the command line becomes a Scintilla view even on Curses,
we can enabled syntax highlighting of the command line macro.
|
|
* As known from DEC TECO, but extended to convert absolute positions to line numbers as well.
:^Q returns the current line.
* Especially useful in macros that accept line arguments,
as it is much shorter than something like
^E@ES/LINEFROMPOSITION//+Q.l@ES/POSITIONFROMLINE//:^E-.
* On the other hand, the fact that ^Q checks the line range means we cannot
easily replace lexer.checkheader with something like
[:J 0,^Q::S...$ ]:
Using SCI_POSITIONFROMLINE still has the advantage that it returns `Z` for out-of-bounds ranges
which would be cumbersome to write with the current ^Q.
* Perhaps there should be a separate command for converting between absolute lines and positions
and :^Q should be repurposed to return a failure boolean for out-of-range values?
* fnkeys.tes could be simplified.
|
|
::FS as well)
* The colon modifier can now occur 2 times.
Specifying `@` more than once or `:` more than twice is an error now.
* Commands do not check for excess colon modifiers - almost every command would have
to check it. Instead, a double colon will simply behave like a single colon on most
commands.
* All search commands inherit the anchored semantics, but it's not very useful in some combinations
like -::S, ::N or ::FK.
That's why the `::` variants are not documented everywhere.
* The lexer.checkheader macro could be simplified and should also be faster now,
speeding up startup.
Eventually this macro can be made superfluous, e.g. by using 1:FB or 0,1^Q::S.
|
|
|
|
* lexer.checkheader is therefore case-sensitive now as well
|
|
* We cannot call it "." since that introduces a local register
and we don't want to add an unnecessary syntactic exception.
* Allows the idiom [: ... ]: to temporarily move around.
Also, you can now write ^E\: without having to store dot in a register first.
* In the future we might add an ^E register as well for byte offsets.
However, there are much fewer useful applications.
* Of course, you can now also write nU: instead of nJ, Q: instead of "." and
n%: instead of "nC.". However it's all not really useful.
|
|
filenames containing ASCII 27
* You can now set a per-file tab style, that differs from the defaults established
in the ED hook.
This is important especially since we do not yet support per-project .teco_ini
scripts where you could establish differing policies depending on the VCS repository.
(The latter would be easy to implement, but we cannot currently easily extend the
existing ED hooks.)
* It's unlikely that files contain an ASCII 27, but not impossible.
Therefore we now use ASCII 0 (^@) as a terminator.
This indeed be safe under UNIX.
Even better would be a string building construct for escaping ASCII 27 ($), though,
as that would work with arbitrary bytes.
|
|
The macro prefix was changed from ^F to ^K.
|
|
* Curses: "icons" have also been added
|
|
This previously highlighted little more than embedded Javascripts.
|