aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2016-02-02Gtk UI: full color scheme supportRobin Haberkorn2-0/+61
* implemented by exporting the most important Scintilla STYLEs as CSS variables and defining named widgets for the main UI components. * ~/.teco_css will then apply the Scintilla styles to the Gtk UI. This file is also for additional tweaks, e.g. enabling translucency. * A fallback.css is provided which does just that and is able to apply the terminal.tes and solarized.tes color schemes. * Other important aspects of theming like font sizes and names have not yet been dealt with. (We may want to apply the corresponding Scintilla settings to some widgets...)
2015-12-30ncurses: use a default escape delay of 25msRobin Haberkorn2-2/+4
* this practically fixes the delay issues when using the escape key since 25ms is too short for humans to notice. Still it should be large enough for all practical terminal emulators and transmission speeds to get escape sequences transmitted. * If the escape delay turns out to be too short, it can still be overwritten using the (standard ncurses) $ESCDELAY environment variable. * fnkeys.tes will still provide the escape surrogate since the insert key will often be in a better possition on computer keyboards.
2015-09-23different operators can have the same precedence nowRobin Haberkorn1-28/+34
* SciTECO now has the same operator precedence table as C. * It is numerically important whether different operators have the same precedence. E.g. "5*2/4" used to be evaluated by SciTECO as "5*(2/4)" since division had a higher precedence than multiplication. Within in real (!) numbers this would be the expected evaluation order. Users of other programming languages however would expect the expression to be evaluated as "(5*2)/4" which makes a numerical difference when working with integers. * Operator precedence has been implemented by encoding it into the enumeration values used to represent different operators. Calculating the precedence of a given operator can then be done very efficiently and elegantly (in our case using a plain right shift operation). * documentation updated. We use a precedence table now.
2015-07-22fixed operator precedence listRobin Haberkorn1-10/+24
* necessary since in SciTECO every operator has a different precedence. E.g. successive additions/subtractions cannot be evaluated from left to right (by their associativity). Perhaps this should be changed. * subtraction must have a higher precedence than addition, since (a+b)-c == a+(b-c) * division must have a higher precedence than multiplication since (a*b)/c == a*(b/c). This is not quite true for integer arithmetics. * this fixes expressions like 5-1+1 which were counterintuitively evaluated like 5-(1+1)
2015-07-15Curses UI: revised popup area, with borders and a scroll bar; reduce flickeringRobin Haberkorn1-3/+2
* InterfaceCurses::Popup has been turned into a proper class. This made sense since it is more complicated now and allows us to isolate popup-related code. This will also ease moving the popup code as a widget into its own file later (it seems we will need subdirs per interface anyway). * the popup is now implemented using curses pads of which pages are copied into the popup window (to implement cycling through the list of entries). This simplifies things conceptually. * instead of a trailing ellipsis, scrollbars are shown if the popup area is too small to show all entries. This looks much better and consistent with regard to Scinterm's scrollbars. Also, the planned GTK+ popup widget rewrite will have scroll bars, too for cycling through the list of entries. Therefore, the popup window will now always be the same size when cycling. This also looks better. * Borders are drawn around the popup area. This makes sense since the popup area had to be colored distinctly just to be able to discern it from the rest of the UI (esp. the Scintilla view). Now, less annoying colors may be used by default or set up in color profiles while still maintaining good visibility. Also, with the borders added, the popup area looks more consistent when it covers the entire screen. * Entries that are too long to fit on the screen (e.g. long file names) are now truncated with a bold/underline ellipsis. * Use scintilla_noutrefresh() to refresh the Scintilla view. Since popups have to be refreshed __after__ the Scintilla view, this improves performance significantly and reduces flickering when displaying large popups.
2015-07-14mention ED register in the manual's Q-REGISTERS sectionRobin Haberkorn1-0/+7
* it's used opaquely by SciTECO so it should be listed in the overview of "special" Q-Registers.
2015-07-14programmable terminal color redefinition and theming SciTECO curses UI based ↵Robin Haberkorn1-0/+85
on Scintilla styles * The first 16 colors of the terminal palette can be redefined using the 3EJ property - with all restrictions that ncurses and UNIX terminals impose on us. It is still important to be able to redefine the palette for some color schemes like Solarized since it may be difficult for users to set up the terminal emulator's palette manually. Also when using PDCurses, setting the palette is port-specific or only possible using init_color(). In order to allow color redefinitions across all curses ports it makes sense if SciTECO gives access to the color initialization of curses even if it can guarantee very little about its semantics in general. * 3EJ is completely ignored for GTK+ * use the STYLE_DEFAULT of the current document to style the message line. Fg and bg colors are reversed to guarantee a good contrast to the Scintilla view. Errors are still hardcoded to a red background, warnings to yellow and info messages to green. This allows color-scheming more of SciTECO given that the red, yellow and green terminal colors are not changed fundamentally in the terminal's palette. * info line is now also styled using STYLE_DEFAULT (reverse colors). The Q-Register and buffer names are now written out using format_str() which means that control characters are written out in REVERSE just like in the command line. String::canonicalize_ctl() is still used to canonicalize window titles. * Command line is now modelled as a curses Pad and "blitted" to the command line window. This allowed simplification of the command line drawing code and introduction of format_str(). The command line is now styled according to STYLE_DEFAULT (original fg and bg colors). The rubbed-out part of the command line can now longer be shown in bold black - or even bold light black - since that is not visible in all color themes. Instead it is now only shown in bold. Command line theming problems will be gone once we use a Scintilla view for the command line. * The popup widget is now styled according to STYLE_CALLTIP. * This means that all relevant parts of SciTECO's user interface can now be themed. This allows the creation of themes that redefine the terminal palette radically (e.g. Solarized) and the creation of "bright" themes (e.g. Solarized/bright). * theming of the non-scintilla-view parts of SciTECO is currently unsupported on GTK+. The reason is that both the popup widget and command line widgets have to be rewritten completely in GTK+ and are work in progress, so adapting the current code would be a waste of time. * Added a manual section about the UI and theming.
2015-06-24added "^FCLOSE" function key macro and defined SIGTERM behaviourRobin Haberkorn2-2/+28
* ^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-22major Curses UI revision: initialize curses as late as possibleRobin Haberkorn2-36/+105
* relies on a patched version of Scinterm that allows you to construct Scintilla objects, send messages etc. before Curses is initialized. The Scintilla and Scinterm submodules have been updated. * This once and for all fixes batch mode and stdio redirections in batch mode on all Curses platforms and operating systems. * Fixes the ^C-does-not-interrupt bug on ncurses/UNIX. See #4. * On ncurses/UNIX we will still do a newterm()-initialization. This allows us to keep stdout/stderr alone in case they are redirected. This effectively allows redirecting SciTECO's output into a file even in interactive mode. ncurses/UNIX now behaves like, e.g. PDCurses/win32a and GTK+ in this regard. * Curses environment variable handling fixed. The environment registers are exported into the process environment so that Curses environment variables can be set/modified by the SciTECO profile. * Use term.h for accessing terminfo now. Explained set_window_title() limitations. * fixed interruption via SIGINT. If the UI is waiting for user input, SIGINT is effectively ignored instead of letting the next character fail always. * Updated sciteco(1) and sciteco(7): More options, environment variables and signals documented. Also rewritten DESCRIPTION section (different modes of operation).
2015-06-14handle environment variables more consistentlyRobin Haberkorn2-16/+59
* the registers beginning with "$" are exported into sub-process environments. Therefore macros can now modify the environment (variables) of commands executed via EC/EG. A variable can be modified temporarily, e.g.: [[$FOO] ^U[$FOO]bar$ EC...$ ][$FOO] * SciTECO accesses the global environment registers instead of using g_getenv(). Therefore now, tilde-expansion will always use the current value of the "$HOME" register. Previously, both register and environment variable could diverge. * This effectively fully maps the process environment to a subset of Q-Registers beginning with "$". * This hasn't been implemented by mapping those registers to special implementations that updates the process environment directly, since g_setenv() is non-thread-safe on UNIX and we're expected to have threads soon - at least in the GTK+ UI.
2015-06-12support UNIX-shell-like tilde-expansions in file names and directoriesRobin Haberkorn1-9/+73
* expands to the value of $HOME (the env variable instead of the register which currently makes a slight difference). * supported for tab-completions * supported for all file-name accepting commands. The expansion is done centrally in StateExpectFile::done(). A new virtual method StateExpectFile::got_file() has been introduced to pass the expanded/processed file name to command implementations. * sciteco(7) has been updated: There is now a separate section on file name arguments and file name handling in SciTECO. This information is important but has been scattered across the document previously. * optimized is_glob_pattern() in glob.h
2015-06-02throw error when trying to set or append the string part of "*" and ↵Robin Haberkorn1-0/+2
appending to "$" * these operations are unsupported and there is no benefit in ignoring them silently. It only confused the user.
2015-06-02added <FG> command and special Q-Register "$" to set and get the current ↵Robin Haberkorn2-8/+44
working directory * FG stands for "Folder Go" * FG behaves similar to a Unix shell `cd`. Without arguments, it changes to the $HOME directory. * The $HOME directory was previously only used by $SCITECOCONFIG on Unix. Now it is documented on its own, since the HOME directory should also be configurable on Windows - e.g. to adapt SciTECO to a MinGW or Cygwin installation. HOME is initialized just like the other environment variables. This also means that now, the $HOME Q-Register is always defined and can be used by platform-agnostic macros. * FG uses a new kind of tab-completion: for directories only. It would be annoying to complete the FG command after every directory, so this tab-completion does not close the command automatically. Theoretically, it would be possible to close the command after completing a directory with no subdirectories, but this is not supported currently. * Filename arguments are no longer completed with " " if {} escaping is in place as this brings no benefit. Instead no completion character is inserted for this escape mode. * "$" was mapped to the current directory to support an elegant way to insert/get the current directory. Also this allows the idiom "[$ FG...new_dir...$ ]$" for changing the current directory temporarily. * The Q-Register stack was extended to support restoring the string part of special Q-Registers (that overwrite the default functionality) when using the "[$" and "]$" commands. * fixed minor typos (american spelling)
2015-05-29Modified ^W in string (and file name) arguments: ensure that we always rub ↵Robin Haberkorn1-2/+2
out beyond empty arguments * it was annoying not to be able to rub out anything with ^W if the current string argument was empty. * Now, the special file name and string argument handling for ^W is effective only if the current argument is non-empty, else we fall back to the rub-out-command behaviour. * So now, if you press ^W in a string argument, it is rubbed out until empty and on the next ^W press, the entire command will be rubbed out.
2015-05-29support specialized ^W immediate editing command in file name argumentsRobin Haberkorn1-0/+17
* the rubout/reinsert-word behaviour of misc. string arguments is suboptimal for file name arguments as it depends on Scintilla's word characters. By default, the directory separators are not considered word characters, but this could be changed by the user. * The behaviour of ^W in file name arguments is now fixed and independant from the Scintilla configuration: It always rubs out or re-inserts one hierarchy level of the file name.
2015-05-25extended <EN> command and used it to optimize "lexer.test..." macrosRobin Haberkorn1-1/+3
* 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-16implemented function key masking (context-sensitive function key macros)Robin Haberkorn1-0/+33
* 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-16removed claim of no bugs in sciteco(1) ;-)Robin Haberkorn1-6/+0
2015-03-16documented the automatic EOL translation featureRobin Haberkorn1-4/+55
2015-03-10added --no-profile command line optionRobin Haberkorn1-0/+12
2015-03-10added the <"I> conditional for checking a directory separatorRobin Haberkorn1-1/+12
* It is still useful to have this in macros since you may want to work with non-normalized file names. For instance, env variables (including $SCITECOPATH and $SCITECOCONFIG) may (and will probably) include backward-slash separators on Windows
2015-03-10always normalize directory separators to "/" in the "*" Q-RegisterRobin Haberkorn1-1/+9
* on Windows, this register contained backward slashes. This means that macros working with that register had to cope with both forward and backward slashes. * The file names are still displayed in the native style by the UI * This approach also has disadvantages: What if the user wants to insert the current file name somewhere where "\" is expected? However, this seems to be an unlikely case and the use can still replace the "/" with "\" again. * Avoid some virtual method calls in QRegisterBufferInfo
2015-03-07canonicalize $SCITECOCONFIG and $SCITECOPATH variablesRobin Haberkorn1-0/+7
* this makes them absolute and also resolves links on Unix * macros can now assume the corresponding Q-regs to be absolute * Currently this does not make a big difference since the working directory of the SciTECO process cannot be changed. Once I implement a command to change the working dir, this is essential.
2015-03-07improved --help output and introduced PACKAGE_URL_DEV (for development home)Robin Haberkorn1-1/+6
* The PACKAGE_URL_DEV is also mentioned in --help output and sciteco(1)
2015-03-07changed save point file format to .teco-<n>-<filename>~Robin Haberkorn1-2/+4
* It is no longer possible to accidentally open save point files of the same or another SciTECO instance when typing something like EB*.cpp$ * The use of a trailing ~ is common among editors. These files will be recognized more easily as temporary by users. * People will often already have VCS ignore rules for files with trailing tilde. Therefore SciTECO savepoints will often be already ignored by VCS. * Since they still have a unique ".teco" prefix, they will not be confused by other programs as backup files. * Also mention in sciteco(1) that save point files are hidden on Windows.
2015-03-07sciteco(7): Use em-dash (\[em]) characters instead of "-" in sentencesRobin Haberkorn1-6/+6
this looks better in Unicode terminals
2015-03-07Curses UI: fixed translation of the backspace keyRobin Haberkorn1-1/+5
* for historic reasons, the backspace key can be transmitted as ^H by the terminal. Some terminal emulators might do that - these are fixed by this commit. * Use CTL_KEY('H') instead of standard C '\b' as the former is less ambiguous given the confusion around the backspace character.
2015-03-02updated documentation: cover undo/redo, the new ^G editing command and ↵Robin Haberkorn1-13/+118
removal of ^T
2015-02-18added session.hg and session.vcs macrosRobin Haberkorn1-2/+3
* 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-11implemented support for different indention stylesRobin Haberkorn1-1/+11
* the ^I command was altered to insert indention characters rather than plain tabs always. * The <TAB> immediate editing command was added for all insertion arguments (I, ^I but also FR and FS) * documentation was extended for a discussion of indention
2014-12-09support filename auto completions with forward-slash directory separators on ↵Robin Haberkorn1-0/+12
Windows * this is actually UNTESTED on Windows
2014-12-09Curses: support cycling through long lists of possible auto-completions and ↵Robin Haberkorn1-1/+9
optimized screen refreshing/redrawing * pressing e.g. TAB when the popup is showing a list of auto-completions will show the next page, eventually beginning at the first one again. * do not redraw curses windows in the UI methods directly. this resulted in flickering during command-line editing macros and ordinary macro calls because the physical screen was updated immediately. Instead, window refreshing and updated is done centrally in event_loop_iter() only after a key has been processed. Also we use wnoutrefresh() and doupdate() to send as little to the terminal (emulator) as possible.
2014-12-08do not show possible completions for hidden files and directoriesRobin Haberkorn1-1/+12
* added platform-dependant file_is_visible() function
2014-11-24implemented pQq and :Qq commandsRobin Haberkorn1-1/+1
2014-11-24introduced $SCITECOCONFIG env variable, and set different default for ↵Robin Haberkorn1-14/+34
$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
2014-11-24mention .teco_session files in sciteco(1)Robin Haberkorn1-1/+8
2014-11-24factored out file loading and saving into the View specialisation IOViewRobin Haberkorn1-2/+8
this will allow us to use the same algorithms for loading and saving Q-Registers (from/to file). * Saving with EW when a Q-Reg is edited has been fixed (was broken earlier) * SciTECO save point files are now named .teco-X-BASENAME When using IOView for Q-Regs, there will be no way to sensible count the save points. Each write of a Q-Reg may be to another file. Therefore, we number save-points globally. If the sequence of writes has to be reconstructed manually, one can still look at the save point files' modification dates * give more informative error messages when saving a file fails
2014-11-23updated Doxygen configuration: doxygen -u Doxyfile.inRobin Haberkorn1-74/+153
2014-11-22allow setting the "*" register as an alternative to nEBRobin Haberkorn1-1/+18
this is more consistent with SciTECO's idea of abstract registers and allows the currend buffer to be saved on the Q-Register stack. This allows the idiom: [* ! ...change current buffer... ! ]*
2014-11-21updated documentation on ED (buffer editing) hooksRobin Haberkorn1-13/+56
2014-11-17updated sciteco(7): information on Scintilla views versus documentsRobin Haberkorn1-3/+30
2014-11-14added ^# (XOR) operatorRobin Haberkorn1-3/+6
also changed precedence of + operator (higher than minus). the effects of this should be minimal
2014-11-10support new "~" conditional: useful for implying default parameters in macrosRobin Haberkorn1-8/+27
2014-11-09documented EC and EG commandsRobin Haberkorn1-0/+3
2014-11-02changed syntax for long Q-Register names: use [] brackets instead of {}Robin Haberkorn3-53/+53
this breaks many existing scripts, and means you may have to rebuild SciTECO with ./configure --enable-bootstrap The syntax of SciTECO might change in backwards-incompatible until version 1.0 is released.
2014-02-15fixed formatting of "Text Editor and Corrector"Robin Haberkorn1-1/+1
2013-03-19fixed minor Troff error: ".." is not allowedRobin Haberkorn2-2/+2
2013-03-18always recreate doxygen/Robin Haberkorn1-0/+1
* work around frequent Doxygen error
2013-03-17use new ^E\ string building character for arrays and to simplify number ↵Robin Haberkorn2-27/+27
insertions
2013-03-17^E\ string building character to format numberRobin Haberkorn1-0/+7
* new Expressions::format() * may be used format numbers as part of arrays (Q-Register names)