aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
9 daysadded high-contrast color schemeRobin Haberkorn1-0/+1
* strings are bold (if supported) and bright white * comments are in italics (if supported by the terminal) * otherwise this uses the same colors as terminal.tes * should be well suited for monochrome terminals as well
2025-08-08don't install the standalone scripts from lib/ as actual scripts: should fix ↵Robin Haberkorn1-14/+5
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.
2025-08-07added tecat.tes to standard library: can be installed as the Git textconv filterRobin Haberkorn1-1/+12
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
2025-07-31repl.tes: added script that reproduces the classic TECO REPL command-lineRobin Haberkorn1-0/+3
* Unfortunately, this will currently just terminate when some command fails. We require an error catching mechanism to fix this up.
2025-06-03added LaTeX lexer configRobin Haberkorn1-1/+2
2025-04-18added CSS lexer configurationRobin Haberkorn1-1/+2
Especially useful since Gtk users are supposed to edit ~/.teco_css.
2025-04-09added SQL lexer configurationRobin Haberkorn1-1/+2
* 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.
2025-03-31the git, sciteco and email lexer configurations are now installed even ↵Robin Haberkorn1-5/+5
--without-lexilla They don't require Lexilla, so it makes no sense not to exclude them.
2025-03-08added "email" lexer for writing mailsRobin Haberkorn1-1/+2
* 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.
2024-12-30support +line[,column] and filename:line:column syntaxes when opening filesRobin Haberkorn1-2/+2
* 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.
2024-12-13implemented Scintilla lexer for SciTECO code, i.e. TECO syntax highlightingRobin Haberkorn1-1/+2
* 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.
2024-09-09added an improvised lexer for styling Git commit messagesRobin Haberkorn1-1/+2
It's not a real Lexilla lexer, but simply styles the document once in lexer.set.git in order to highlight comment lines.
2024-08-18added troff/nroff lexerRobin Haberkorn1-1/+2
* This is optimized for Groff, but works for Heirloom Troff and Neatroff as well. Currently, the Heirloom and Neatroff requests are just added ontop of the Groff ones. Theoretically, we could also try to separate the keyword lists into a base K&R set with Groff, Heirloom and Neatroff ontop. * The lexer necessarily has many restrictions, as Troff is fundamentally unparseable (like classic TECO) and needs a lot of per-request knowledge. * The "*.mm" extension has been removed from the lexers/cpp.tes. I don't know what language this was for, and I prefer `*.mm` files to be considered Troff. * Temporarily changed the lexilla submodule URL. The corresponding Lexila lexer is in the process of being upstreamed. Once it is, I will probably revert the submodule to the official repository, as the "troff" branch is not stable (can be rebased).
2023-04-16added Asciidoc lexer configRobin Haberkorn1-1/+2
2023-04-14allow disabling Lexilla (Lexer) support by specifying --without-lexillaRobin Haberkorn1-79/+83
* This does not make sense for most SciTECO builds, but only when you want to optimize for size as the lexers take up 50% of the compressed binary size. Without Lexilla, it should be possible get it compiled in about 500kb. * It can be useful for instance when building for embedded distributions. * When Lexilla is disabled, symbols-scilexer.c is also not generated (we assume that the Lexilla sources are not available and it also doesn't serve any purpose). * Consequently, most of the lexer configuration scripts are also not installed under --without-lexilla.
2022-11-27added Markdown and YAML lexer configsRobin Haberkorn1-1/+3
* For markdown.tes we should better introduce new predefined colors in the color scheme files since it doesn't map well to existing colors. For italic and bold, I am not using the predefined colors at all but only set the bold and italic style attributes -- this should still be portable across color schemes.
2022-11-21added lexers for Python and Linux Device TreesRobin Haberkorn1-1/+3
* The device tree lexer reuses CPP and has certain limitations. For once it does not recognize /keywords/ and secondly it confuses properties beginning with # as preprocessor statements.
2016-11-18standard lib: added getopt.tes for parsing command line options in scriptsRobin Haberkorn1-1/+1
* this uses an optstring compatible with getopt(3). * It does not use repeated getopt calls to iterate options, though but places the results in registers beginning with "getopt.". E.g. option "C" will result in "getopt.C" being set after the call to setopt. String arguments are supported and are placed in the string part of the getopt registers. * The grosciteco.tes and symbols-extract.tes scripts make use of getopt now, to simplify and clean up their command line handling.
2016-11-18implemented self-documenting (online) help systemRobin Haberkorn1-1/+9
* the new "?" (help) command can be used to look up help topics. * help topics are index from $SCITECOPATH/women/*.woman.tec files. * looking up a help topic opens the corresponding "womanpage" and jumps to the position of the topic (it acts like an anchor into the document). * styling is performed by *.woman.tec files. * Setting up the Scintilla view and munging the *.tec file is performed by the new "woman.tes" lexer. On supporting UIs (Gtk), womanpages are shown in a variable-width font. * Woman pages are usually not hand-written, but generated from manpages. A special Groff post-processor grosciteco has been introduced for this purpose. It is much like grotty, but can output SciTECO macros for styling the document (ie. the *.woman.tec files). It is documented in its own man-page. * grosciteco also introduces sciteco.tmac - special Troff macros for controlling the formatting of the document in SciTECO. It also defines .SCITECO_TOPIC which can be used to mark up help topics/terms in Troff markup. * Woman pages are generated/formatted by grosciteco at compile-time, so they will work on platforms without Groff (ie. as on windows). * Groff has been added as a hard compile-time requirement. * The sciteco(1) and sciteco(7) man pages have been augmented with help topic anchors.
2016-02-17added lexing support for Gob2 (GObject Builder)Robin Haberkorn1-0/+1
* this assumes that Gob2 produces plain-C output (no C++ keywords are added) and all Gob keywords are real keywords - even though they might be used in function bodies or %{ %} enclosed blocks.
2016-02-17The "cpp" lexer configuration has been split into "c.tes" and "cpp.tes"Robin Haberkorn1-0/+1
* The keyword list is too different in C when compared to C++. The many additional keywords are annoying when editing plain C files. * Underscored C99 and C11 keywords (like _Bool) have been added to the "c.tes" lexer configuration. The C++ language does not contain these keywords. However, C has stdbool.h to define bool which is part of standard C++. * Therefore a macro "lexer.c.basekeywords" has been defined for all languages __directly__ derived (more or less supersets) of C. It contains most of the C99/C11 standard header shortcuts. * Objective C lexing is set up by c.tes since Objective C is a relatively strict superset of C. All Objective C keywords are handled by c.tes. Since they begin with "@", this should not cause problems when editing plain C files.
2015-07-14added port of the Solarized color schemeRobin Haberkorn1-1/+2
* see http://ethanschoonover.com/solarized * I don't know if I want this port to be linked into the main solarized repository as it is certainly not perfect. * However both light and dark modes are supported and usable since to SciTECO's new theming support. * Set -U[solarized.light] before munging to enable light mode. * Registers function key F5 to toggle between light and dark modes. * Works on ncurses (with some restrictions) and almost all other PDCurses ports. GTK+ also works somewhat, but not all parts of the GTK+ UI are currently themable.
2015-03-24added new lexer configs auto-generated by scite2co.luaRobin Haberkorn1-5/+67
* these are still not all languages supported by Scintilla. scite2co.lua does not do a good job of generating styles when SciTE's property files use hardcoded colors/fonts. This commit only includes reasonably good conversion results. The remaining languages need some additional manual labor. * Even these lexers are not perfect and should be revised by comparing them with SciTE's properties. * So many lexers make the "lexer.auto" macro too slow. We need some optimization. E.g. the search-command optimization described in TODO, or an extended EN command for globbing manually specified file names.
2015-03-24reformatted existing lexer definitionsRobin Haberkorn1-2/+2
* they are updated with the results of scite2co.lua This makes it easier in the future to update lexer settings based on the property files of new SciTE releases.
2015-03-24added scite2co.lua: a script for generating SciTECO lexer definitions from ↵Robin Haberkorn1-0/+3
SciTE properties files
2015-03-02used file lists instead of wildcards in lib/Makefile.amRobin Haberkorn1-4/+13
* this is recommended by Automake since wildcards are not portable. However we rely on GNU Make extensions in other places. * This fixes out-of-source builds. * The lists can be updated relatively easily with SciTECO (EN command...)
2014-11-24fixed standard library installationRobin Haberkorn1-1/+4
2014-11-22added a buffer session module (session.tes)Robin Haberkorn1-1/+1
This is a simple and straight-forward implementation of buffer sessions in SciTECO. A session is merely a SciTECO script that opens files when executed (and restores properties). The current session is identified by this script's filename in Q-Register "session.path": ~/.teco_session by default. Users may set "session.path" to manage different profiles. An abstraction of session "names" is not provided. Users are expected to hack these on their own. For the common task of having one session per profile, the "session.git" macro is provided. It set's up the current session relative to the current Git repository. This will create ".teco_session" files in the root of Git repositories, that may be added to a global ignore pattern (or they may even be versioned!)
2014-11-19added first draft of new modular lexer systemRobin Haberkorn1-1/+5
2013-02-24moved QuickSort macros from symbols-extract script into own string.tes macro ↵Robin Haberkorn1-0/+1
library * therefore for bootstrapping to work, the SCITECOPATH is always set explicitly
2013-02-22added --with-default-scitecopath config option: default value of $SCITECOPATHRobin Haberkorn1-1/+1
useful for Windows where the desired default path does not correspond with the installation dir of the std lib macros
2013-02-22added some default function key macrosRobin Haberkorn1-1/+1
2013-02-15install standard macros into special standard library path (pkgdatadir/lib)Robin Haberkorn1-0/+2
* SCITECOPATH environment variable defaults to this directory * manpage updated * default teco.ini updated: no need to generate it anymore