aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-09-12function key macros have been reworked into a more generic key macro featureRobin Haberkorn1-31/+28
* ALL keypresses (the UTF-8 sequences resulting from key presses) can now be remapped. * This is especially useful with Unicode support, as you might want to alias international characters to their corresponding latin form in the start state, so you don't have to change keyboard layouts so often. This is done automatically in Gtk, where we have hardware key press information, but has to be done with key macros in Curses. There is a new key mask 4 (bit 3) for that purpose now. * Also, you might want to define non-ANSI letters to perform special functions in the start state where it won't be accepted by the parser anyway. Suppose you have a macro M→, you could define @^U[^K→]{m→} 1^_U[^K→] This effectively "extends" the parser and allow you to call macro "→" by a single key press. See also #5. * The register prefix has been changed from ^F (for function) to ^K (for key). This is the only thing you have to change in order to migrate existing function key macros. * Key macros are enabled by default. There is no longer any way to disable function key handling in curses, as I never found any reason or need to disable it. Theoretically, the default ESCDELAY could turn out to be too small and function keys don't get through. I doubt that's possible unless on extremely slow serial lines. Even then, you'd have to increase ESCDELAY and instead of disabling function keys simply define an escape surrogate. * The ED flag has been removed and its place is reserved for a future mouse support flag (which does make sense to disable in curses sometimes). fnkeys.tes is consequently also enabled by default in sample.teco_ini. * Key macros are handled as an unit. If one character results in an error, the entire string is rubbed out. This fixes the "CLOSE" key on Gtk. It also makes sure that the original error message is preserved and not overwritten by some subsequent syntax error. It was never useful that we kept inserting characters after the first error.
2024-09-09added an improvised lexer for styling Git commit messagesRobin Haberkorn2-1/+18
It's not a real Lexilla lexer, but simply styles the document once in lexer.set.git in order to highlight comment lines.
2024-09-09Xq and ]q inherit the document encoding from the source document (refs #5)Robin Haberkorn1-0/+0
* ^Uq however always sets an UTF8 register as the source is supposed to be a SciTECO macro which is always UTF-8. * :^Uq preserves the register's encoding * teco_doc_set_string() now also sets the encoding * instead of trying to restore the encoding in teco_doc_undo_set_string(), we now swap out the document in a teco_doc_t and pass it to an undo token. * The get_codepage() Q-Reg method has been removed as the same can now be done with teco_doc_get_string() and the get_string() method.
2024-09-09lexer.checkheader is Unicode-aware now (refs #5)Robin Haberkorn1-1/+1
2024-09-09implemented <EE> and <^E> commands for configuring encodings and translating ↵Robin Haberkorn1-16/+16
between glyph and byte offsets (refs #5) * ^E is heavily overloaded and can also be used to check whether a given index is valid (as it is the same that most movement commands to internally). Besides that, it is mainly useful for interfacing with Scintilla messages. * EE takes a code page or 0 for ANSI/ASCII. Currently all documents and new registers are UTF-8. There will have to be some kind of codepage inheritance and a single-byte-only mode.
2024-08-18added troff/nroff lexerRobin Haberkorn3-2/+88
* 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).
2024-01-28cursor movement via fnkeys.tes now preserves the column as in most text editorsRobin Haberkorn1-27/+48
* Horizontal movements (left/right cursor keys) establish the current column and vertical movements (up/down) will try to keep on that column. * This has long been problematic in SciTECO as it requires state that gets reversed when the command line replacement takes place. * I experimented with encoding the current horizontal position into the braced movement operations as in (123C5U$), but I decided that this was clumsy and I generally did not want these expressions to become even larger. * Instead I decided to add some minimal support to the C core in the form of 4EJ which is like a number register only that it does NOT get reversed on rubout. This is exploited by the fnkeys.tes macros by storing the current position beyond replacements. * In theory, this should be a property of the document, but we cannot easily store custom parameters per document. So instead, there is just one global variable. When editing another buffer, it gets reset to .ESGETCOLUMN$$. sample.teco_ini has been updated. * The current X position only makes sense in the context of fnkeys.tes, as TECO commands like <C> are not necessarily "horizonal" movements. For the same reason, the core does not try to initialize 4EJ automatically when editing new buffers. It's entirely left to the TECO macros. * The commandline replacement is more robust now as it checks braced expressions at the end of the command line more thorougly. It will no longer swallow all preceding braced expressions. Only if they are at least 4 characters in length and end in `C)` or `R)`.
2024-01-20fnkeys.tes: support zooming via F9/F10Robin Haberkorn1-0/+9
* Works only in Gtk of course and only in the parser start state. * Since its side effects can neither be reversed, nor does it have any side effects on the editor state, we can completely rub it out. * Currently, it will only affect the current buffer and only the text area. It would be trivial to apply the zoom to the commandline widget as well (FIXME?). There is currently no way that the zoom value or any font size could be passed to the CSS, though. So the auto-completion overlay could only be zoomed if Gtk supports a zoom factor as well.
2023-04-16added Asciidoc lexer configRobin Haberkorn2-1/+30
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 Haberkorn3-1/+53
* 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-22scite2co.lua: avoid unnecessary string concatenations with io.write()Robin Haberkorn1-9/+9
Not that speed would make any difference here whatsoever...
2022-11-22scite2co.lua: support generating substylesRobin Haberkorn1-19/+48
2022-11-21improved the C/C++ and Gob lexersRobin Haberkorn4-4/+13
* single quoted constants are highlighted like single quoted strings in all other auto-generated lexers using "CPP". * recognize /// and //! and comments after preprocessor statements
2022-11-21added lexers for Python and Linux Device TreesRobin Haberkorn3-1/+96
* 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.
2021-10-13improved default selection colors and made them configurable via color.tesRobin Haberkorn3-2/+10
* NOTE: Selections are currently only used to highlight search results. * The default selection colors were not always visible well with default settings (--no-profile) and they were not uniform across platforms. On Curses, the selection would be reversed, while on Gtk it had a lighter foreground color. They are now always reversed (black on white background). The default styles do not assume any color support - they use only black and white. * Since these defaults cannot possibly work on every color scheme, color.selfore and color.selback has been added to color.tes. All existing color schemes have been updated to configure selections as reversed to the default colors. This especially fixes selection colors on Gtk. * On solarized.tes, the caret style was already distinct from inversed default colors. On terminal.tes, the color of the caret is now bright white, so it stands out from the selection colors. * In Curses, the caret color is currently __not__ applied to the command line where it is continued to be drawn reversed. The command line drawing code is considered deprecated and will eventually be replaced with a Scintilla minibuffer. * In Gtk, we now apply the caret style to the commandline view as well. * Fixed the comment color in solarized.light.
2021-10-11upgraded to Scintilla 5.1.3 and Scinterm 3.1Robin Haberkorn72-73/+73
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches). All of the patches are now either irrelevant or have been merged upstream. * Since Scintilla 5 requires C++17, this increases the minimum GCC version at least to 5.0. We may actually require even newer versions. * I could not upgrade the scintilla-mirror (which was imported from Mercurial), so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0, master was deleted and I reimported the entire Scintilla repo using git-remote-hg. This means that scintilla-mirror now contains two entirely separate trees. But it is still possible to clone old SciTECO repos. * The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed. Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced), we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3). This branch is never rebased or deleted. Therefore, we are guaranteed to be able to clone arbitrary SciTECO repo commits - not only releases. Releases no longer have to be tagged in scintilla-mirror. On the downside, fixup commits may accumulate in these new branches. They can only be squashed once a new branch for a new Scintilla release is created (e.g. by cherry-picking followed by rebase). * Scinterm does no longer have to reside in the Scintilla subdirectory, so we added it as a regular submodule. There are no more recursive submodules. The Scinterm build system has not been improved at all, but we use a trick based on VPATH to build Scinterm in scintilla/bin/. * Scinterm is now in Git and we reference the upstream repo for the time being. We might mirror it and apply the same branching workflow as with Scintilla if necessary. The scinterm-mirror repository still exists but has not been touched. We will also have to rewrite its master branch as it was a non-reproducible Mercurial import. * Scinterm now also comes with patches for Scintilla which we simply applied on our sciteco-rel-5-1-3 branch. * Scintilla 5 outsourced its lexers into the Lexilla project. We added it as yet another submodule. * All submodules have been moved into contrib/. * The Scintilla API for setting lexers has consequently changed. We now have to call SCI_SETILEXER(0, CreateLexer(name)). As I did not want to introduce a separate command for setting lexers, <ES> has been extended to allow setting lexers by name with the SCI_SETILEXER message which effectively replaces SCI_SETLEXERLANGUAGE. * The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used in the SciTECO standard library anyway - and have consequently been removed from symbols-scilexer.c. The style macros from SciLexer.h (SCE_...) are theoretically still useful - even though they are not used by our current color schemes - and have therefore been retained. They can be specified as wParam in <ES>. * <ES> no longer allows symbolic constants for lParam. This never made any sense since all supported symbols were always wParam. * Scinterm supports new native cursor modes. They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER caret style is configured by default. It makes no sense to enable native cursor modes now since the command line should have a native cursor but is not yet a Scintilla view. * The Scintilla upgrade performed much worse than before, so some optimizations will be necessary.
2017-11-16CPP lexer: support *.ino files (Arduino IDE sketches)Robin Haberkorn1-1/+2
* a proper Arduino lexer supporting the special Arduino keywords/classes could in principle be written, but for the time being they're treated just like regular C++ sources
2016-11-22womanpage lexer: fixed popup stylingRobin Haberkorn1-1/+1
* the ESSTYLECLEARALL$$ was resetting the STYLE_CALLTIP (and others) resulting in wrongly-styled popups. * We now only change STYLE_DEFAULT for Gtk UIs and use `color.init` to reinitialize the other styles (not very elegant).
2016-11-18standard lib: added getopt.tes for parsing command line options in scriptsRobin Haberkorn2-1/+53
* 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 Haberkorn2-1/+29
* 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-11-01globbing supports character classes now and ^EN string building construct to ↵Robin Haberkorn1-1/+1
escape glob patterns * globbing is fnmatch(3) compatible, now on every supported platform. * which means that escaping of glob patterns is possible now. ^ENq has been introduced to ease this task. * This finally allows you to pass unmodified filenames to EB. Previously it was impossible to open file names containing glob wildcards. * this was achieved by moving from GPattern to GRegex as the underlying implementation. * The glob pattern is converted to a regular expression before being compiled to a GRegex. This turned out to be trickier than anticipated (~140 lines of code) and has a runtime penalty of course (complexity is O(2*n) over the pattern length). It is IMHO still better than the alternatives, like importing external code from libiberty, which is potentially non-cross-platform. * Using GRegex also opens the potential of supporting brace "expansions" later in the form of glob pattern constructs (they won't actually expand but match alternatives). * is_glob_pattern() has been simplified and moved to Globber::is_pattern(). It makes sense to reuse the Globber class namespace instead of using plain functions for functions working on glob patterns. * The documentation has a new subsection on glob patterns now. * Testsuite extended with glob pattern test cases
2016-04-05session.tes: save and restore the working directory as part of the sessionRobin Haberkorn1-3/+11
* turned out to be a very handy feature * can be turned off by setting register `session.savedir` to false * also fixed the line endings in .teco_session files to line-feed (ie. native)
2016-02-19fixed Objective C++ lexing: it is now handled by cpp.tesRobin Haberkorn2-11/+14
* the *.mm extension is for Objective C++. Therefore cpp.tes should be responsible. * Objective C keywords have been added to lexer.c.basekeywords. It does not hurt adding them to all C descendants.
2016-02-17added lexing support for Gob2 (GObject Builder)Robin Haberkorn2-0/+37
* 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 Haberkorn3-23/+64
* 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.
2016-02-17simplified "lexer.test..." macros using the $$ return commandRobin Haberkorn43-194/+194
* this is slightly more efficient than using repeated conditionals * the last :EN does not require a conditional, as its return value can simply be forwarded. * even without $$, this could have been done easier using a once-only loop and breaking out of the loop if :EN fails using :;. The last :EN result is still stored in QReg "_". * :EN could also be used to match header lines if lexer.tes would leave the first line (header line) in some Q-Reg, like the local .[header]. However, repeated :ENs would be necessary as globbing currently does not support {...,...} expansions. Since sooner or later, the header line must be evaluated for some lexer.set macro, this is probably more efficient than the current solution using SciTECO patterns and [lexer.checkheader] could be removed as well.
2016-02-15implemented <$$> command for returning from a macroRobin Haberkorn2-6/+5
* <$$> is faster than jumping to the end of the macro and enables shorter code for returning values from macros. * this also replaces $$ as an immediate editing command. In other words, command line termination is an ordinary command now. The old behaviour was similar to what classic TECO did. Classic TECO however had no choice than to track key presses directly for command line termination as it did not keep track about the parser state as input was typed. This led to some glitches in the language. For instance "FS$$" would terminate the command line, unless the second escape was typed after backspace, etc. This behaviour is not worth copying and SciTECO did a better job than that by making sure that at least the second escape is only effective if it is not part of language syntax. This still lead to some undesirable cases like "ES...$$$" that would terminate the command line unexpectedly. To terminate the command line after something like "FS$$", you will now have to type "FS$$$$". * As it is a regular command now - just executed immediately - and its properties stay close to the macro return behaviour, command line termination may now not always be performed when $$ is typed even as a standalone command. E.g. "Ofoo$ !bar!$$ !foo!Obar$" will curiously terminate the command line now. * This also means that macros can finally terminate command lines by using the command line editing commands ({ and }) to insert $$ into the command line macro. This is also of interest for function key macros. * This implementation showed some serious shortcoming in SciTECO's current parser that yet have to be fixed. E.g. the macro "@^Ua{<$$>}" is currently unsafe since loops abuse the expression stack for storing their state and $$ does not touch the expression stack. Calling "Ma>" would actually continue the loop jumping to the beginning of the command line since program counters referring to the macro A will be reused! This cannot be easily solved by checking for loop termination since being able to return that way from loops is a useful feature. This is a problem even without loops and $$, e.g. as in "@^Ua{1,2,3(4,5} Ma)". Instead, a kind of expression stack frame pointer must be added to macro invocation stack frames, pointing to the beginning of the expression stack for the current frame. At the end of macros or on return, the stack contents of corresponding to the frame can be discarded while preserving the immediate arguments at the time of the return or end-of-macro. This would stabilize SciTECO's macro semantics. * When a top-level macro returns in batch mode, it would be a good idea to use the last argument to calculate the process return code, so it can be set by SciTECO scripts (TODO).
2016-02-15lexer library: avoid unnecessary argument discards after SETLEXERLANGUAGERobin Haberkorn69-69/+69
* causes problems with the $$ command implemented * was already fixed in scite2co.lua but the existing code was manually updated and generated with an earlier version of scite2co.lua
2016-02-03Gtk UI: automatically configure font of the command lineRobin Haberkorn1-0/+4
* This uses the font and size of STYLE_DEFAULT. * We cannot just pass the font down to the user CSS. There are no font variables in Gtk CSS. Therefore we configure the command line widget directly. This can still be overwritten by an user CSS. * Instead of using the deprecated gtk_widget_modify_font(), we generate CSS. Ugly, but still better than writing our own style provider. * Font setting is exposed to the user using a new optional Q-Reg "lexer.font". The numeric part is the point size multiplied with 100 (fractional point size). * Font setting in lexer.auto is skipped in Curses where it is irrelevant anyway to speed up startup. * Perhaps the "Monospace" font name is also a good default value instead of Courier? fixup
2015-07-21fixed scite2co.lua: use SCI_SETLEXERLANGUAGE instead of SCI_SETLEXERRobin Haberkorn70-70/+74
* the lexer names used in SciTE property files are not SCLEX constants but the internal LexerModule names, so auto-generated SciTECO lexer configurations can only be set by name, i.e. via SETLEXERLANGUAGE, since we cannot easily map those names to SCLEX constants. * should be about as fast as using SCI_SETLEXER (since SciTECO has to look up symbolic names as well at runtime). * this especially fixes opening *.mak files -- often Makefiles but identified as "Mako" files. The macro "lexer.set.mako" used the wrong SCLEX_ symbol. * will also fix the HTML and all other lexers that use the SCLEX_HTML/hypertext lexer. * all lexer files have been updated, to be more compatible with scite2co.lua's output. This eases lexer updates in the future.
2015-07-15changed default popup background color and color schemesRobin Haberkorn2-3/+3
* use black on light white as the default popup colors (e.g. in --no-profile mode). this looks less annoying than black on light blue and is more often more readable (since light blue will be rendered quite dark often). It's no longer necessary to highlight the popup with (distinct) colors. Keeping the foreground black ensures that there's a brighter foreground color for bold entries in case the terminal does not support bold fonts. * the `terminal.tes` scheme keeps the default popup style. However since it uses white on black as the default colors, this will often still stand out from the message line (on 16 color terminals). * `solarized.tes` now uses a similar high-contrast popup style with either a bright or dark background. The foreground colors have been chosen so that bright variants exist for non-bold terminals - although these bright variants do not stand out very much.
2015-07-14added port of the Solarized color schemeRobin Haberkorn2-1/+140
* 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-07-14fixed default colors in color.tes and style Q-Register viewRobin Haberkorn3-32/+68
* the RGB values of the 8 standard colors defined by color.tes were wrong (i.e. did not correspond to the normal 8 color codes defined by Scinterm but only the bright versions). Except for `color.black` which referred to terminal color 0. * now we define the 16 colors defined by Scinterm, allowing color schemes to explicitly use bright color versions without using the bold attribute. On 8 color terminals, the bold attribute might still be the only way to get a bright color. * terminal.tes: Use bright default color instead of relying on bold to get bright color versions. This is especially important for comments which where relied on bold black to be rendered grey. This did not work by default on terminals supporting bold fonts (e.g. OS X Terminal) or GTK+. The scheme now works on more terminals out of the box and on GTK+ and is thus a good default color scheme. * Color schemes will now also define the default style, the line number style and caret foreground/background. `color.calltip` is now also defined for STYLE_CALLTIP and can later be used to style SciTECO's custom popup widget.
2015-06-29<:Q> returns -1 for non-existent registers nowRobin Haberkorn1-2/+2
* added a new OPTIONAL behaviour for QRegSpecMachines * allows you to implement commands that have an optional Q-Register argument that should not be initialized if undefined. * Using QRegSpecMachine::fail() you may still check for existence of the register conditionally to emulate the QREG_REQUIRED behaviour. * Using :Q for checking for register existence makes sense, because usually you will want to check for both existence and non-emptyness as in :Qq">. So in this common case, you no longer have to keep in mind that the register may also be undefined. * This finally allows us to create arrays in the Q-Register tables without keeping a separate entry for the number of elements. E.g. an array.0 to array.N can be iterated like this: 0Ui <:Q[array.^E\i]:; ! work with element i ! %i>
2015-06-27enable function key macros automatically when sourcing fnkeys.tesRobin Haberkorn1-0/+3
* this simplifies profile setup * should anybody wish to load the default function key macros but not enable function key support, he/she can still explicitly call "64,0ED" to disable them again.
2015-06-24added "^FCLOSE" function key macro and defined SIGTERM behaviourRobin Haberkorn1-0/+3
* ^FCLOSE is inserted when the "Close" key is pressed. It is used by the GTK+ UI to deliver window close requests and SIGTERM occurrences. (this replaces the "Break" key used before in the GTK+ UI). * The default action of ^FCLOSE is to quit SciTECO, therefore window closing is possible even in --no-profile mode for instance. * fixed a minor memleak in Cmdline::fnmacro() * added ^FCLOSE implementation to fnkeys.tes to insert EX. This currently has the disadvantage of overwriting the error message with syntax errors if there are modified buffers but it will at least not close the window if there are modified buffers. * SIGTERM will now be similar to SIGINT by default instead of terminating SciTECO right away. * the GTK+ UI handles SIGTERM by emulating the "close" key while still interrupting like SIGINT. * GTK+: SIGTERM and ^C will interrupt by sending SIGINT to the entire process group instead of simply setting `sigint_occurred`. This fixes interrupting EC and EG commands with long-running or hanging programs and is relevant to the solution of #4.
2015-06-11fixed lexer configuration for the unnamed bufferRobin Haberkorn1-0/+1
* The unnamed buffer must be handled separately since the "lexer.test..." macros assume that register "*" is non-empty. Else it will be configured for some arbitrary lexer. * this was a regression compared to v0.6.4
2015-05-25extended <EN> command and used it to optimize "lexer.test..." macrosRobin Haberkorn72-246/+333
* EN may now be used for matching file names (similar to fnmatch(3)). This is used to check the current buffers file extension in the lexer configuration macros instead of using expensive Q-Register manipulations. This halves the overall startup time - it is now acceptable even with the current amount of lexer configurations. * EN may now be used for checking file types. session.tes has been simplified. * BREAKS macro portability (EN now has 2 string arguments). * The Globber class has been extended to allow filtering of glob results by file type.
2015-03-24added new lexer configs auto-generated by scite2co.luaRobin Haberkorn63-5/+3190
* 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 Haberkorn8-147/+113
* 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 Haberkorn2-0/+173
SciTE properties files
2015-03-16implemented function key masking (context-sensitive function key macros)Robin Haberkorn1-2/+18
* fnkeys.tes has been updated to enable the command line editing macros (cursor keys, etc.) only in the "start" state. This avoids the annoying effect of inserting the macros into string arguments where they have no effect and must be rubbed out again.
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...)
2015-03-02added function key macro for Shift+DEL: Acts as a "reverse" ruboutRobin Haberkorn1-0/+4
It reinserts when the immediate editing modifier is disabled and rubs out when it is enabled - without modifying the state of the ^G modifier.
2015-02-18added session.hg and session.vcs macrosRobin Haberkorn1-0/+19
* session.hg sets up the buffer session in the current Mercurial repository * session.vcs is a convenience macro that may be used in profiles to enable buffer sessions per repo for all supported VCS (Git, Hg and SVN)
2015-02-17added session.svn macro to set up a session profile in the current ↵Robin Haberkorn1-2/+16
Subversion working copy * it uses "svn info --xml" since otherwise the output of "svn info" might be localized.
2014-11-24allow disabling of buffer sessions. in sample.teco_ini, disable sessions ↵Robin Haberkorn1-3/+6
automatically when files are given. this allows you to use sciteco in a Git repository to edit a specific file, without changing the buffer session. Also useful if SciTECO is used as the GIT_EDITOR without thrashing the repository's session every time a commit message is edited.
2014-11-24fixed standard library installationRobin Haberkorn1-1/+4
2014-11-24introduced $SCITECOCONFIG env variable, and set different default for ↵Robin Haberkorn1-1/+1
$SCITECOPATH on Windows * $SCITECOCONFIG has been introduced, so have a macro-accessible location for the profile, buffer session etc. This is set to the program dir on Windows. That way, the config files will be found, regardless of the current working dir, but it may also be set up for Unix-like environments on Windows. * $SCITECOPATH defaults to the program dir + "/lib" now on Windows. * The default profile is now always called ".teco_ini". Also on Windows. Platform differences like this would need to be documented. * The sample teco.ini has been renamed to "sample.teco_ini" for clarity