aboutsummaryrefslogtreecommitdiffhomepage
path: root/sample.teco_ini
AgeCommit message (Collapse)AuthorFilesLines
2023-06-18.teco_ini: don't set up any margins or indention settings on the unnamed bufferRobin Haberkorn1-0/+1
* The lexer.test.* macros don't work on the unnamed buffer, so any per-language indention settings etc. could be accidentally applied to the unnamed buffer.
2017-03-250,8ED: Automatic case-folding of commandsRobin Haberkorn1-0/+3
* when enabled, it will automatically upper-case all one or two letter commands (which are case insensitive). * also affects the up-carret control commands, so they when inserted they look more like real control commands. * specifically does not affect case-insensitive Q-Register specifications * the result are command lines that are better readable and conform to the coding style used in SciTECO's standard library. This eases reusing command lines as well. * Consequently, string-building and pattern match characters should be case-folded as well, but they aren't currently since State::process_edit_cmd() does not have sufficient insight into the MicroStateMachines. Also, it could not be delegated to the MicroStateMachines. Perhaps they should be abandoned in favour of embeddedable regular state machines; or regular state machines with a stack of return states?
2016-11-20updated sample.teco_ini: 2EJ now sets a more or less global memory limitRobin Haberkorn1-2/+2
2016-11-18implemented self-documenting (online) help systemRobin Haberkorn1-3/+5
* 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-08-19Integrated clipboard supportRobin Haberkorn1-0/+3
* mapped to different registers beginning with "~" * on supported platforms accessing the clipboard is as easy as X~ or G~. Naturally this also allows clipboards to be pasted in string arguments/insertions (^EQ~). * Currently, Gtk+, PDCurses and ncurses/XTerm are supported. For XTerm clipboard support, users must set 0,256ED to enable it since we cannot check for XTerm window ops programmatically (at least without libX11). * When clipboard regs exist, the clipboard can also be deemed functional. This allows macros to fall back to xclip(1) if necessary. * EOL handling has been moved into a new file eol.c and eol.h. EOL translation no longer depends on GIOChannels but can be memory-backed as well.
2016-02-15implemented <$$> command for returning from a macroRobin Haberkorn1-3/+3
* <$$> 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-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-06-27enable function key macros automatically when sourcing fnkeys.tesRobin Haberkorn1-4/+2
* 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-24disable all Scintilla margins by defaultRobin Haberkorn1-1/+0
* it makes little sense to keep Scintilla's default for new views which gives margin 1 (non-folding symbols) a fixed width of 16 pixels. The interpretation of this width is UI-dependant. * it is more consistent to disable all margins initially. this is also the minimalist setup shown when you run e.g. with --no-profile. * the default look of SciTECO will be more like classic TECOs. This is also what has been requested in #4. * sample.teco_ini does no longer have to disable margin 1 explicitly
2015-06-22sample.teco_ini: avoid unnecessary ED-hook recursionsRobin Haberkorn1-0/+5
* disable ED hook while exuting the "add" hook. This avoids the "edit" hook being invoked recursively. * the speed improvement was not measurable, but it also won't hurt
2015-02-23implemented to undo stack memory limitingRobin Haberkorn1-0/+3
* acts as a safe-guard against uninterrupted infinite loops or other operations that are costly to undo in interactive mode. If we're out of memory, it is usually too late to react properly. This implementation tries to avoid OOMs due to SciTECO behaviour. We cannot fully exclude the chance of an OOM error. * The undo stack size is only approximated using the UndoToken::get_size() method. Other ways to measure the exact amount of allocated heap (including size fields in every heap object or using sbrk(0) and similar) are either costly in terms of memory or platform-specific. This implementation does not need any additional memory per heap object or undo token but exploits the fact that undo tokens are virtual already. The size of an undo token is determined at compile time. * Default memory limit of 500mb should be OK for most people. * The current limit can be queried with "2EJ" and set with <x>,2EJ. This also works interactively (a bit tricky!) * Limiting can be disabled. In this case, undo token processing is a bit faster. * closes #3
2015-02-18added session.hg and session.vcs macrosRobin Haberkorn1-2/+1
* 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-1/+3
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-5/+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-24introduced $SCITECOCONFIG env variable, and set different default for ↵Robin Haberkorn1-0/+55
$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