This manual contains the main topics
Online help is also available.
These options are also looked for in the environment variable MINED.
The right-hand cursor block of typical keyboards is assigned the most important movement and copy functions as follows:
+------+------+------+ | (7) | (8) | (9) | | Mark | ^ | PgUp | +------+------+------+ | (4) | (5) | (6) | | <- | HOP | -> | +------+------+------+ | (1) | (2) | (3) | | Copy | v | PgDn | +------+------+------+ | (0) | (,) | | Insert |Delete| +------+------+------+
Configuration hint: (To enable mouse operation in a Windows DOS box, deactivate "QuickEdit mode" in the properties menu.)
Configuration hint: On Unix, in order to make Alt work as a modifier, set the xterm resource metaSendsEscape to true as suggested in the example file .Xdefaults.mined. (With older versions of xterm, setting eightBitInput to false may be required instead which doesn't actually disable 8 bit input.)
ctags
command).
HOP ESC t prompts for an identifier. (Also available from
search or popup menu.)
If a new file is opened for this purpose, the current
file is saved automatically.
In addition to the current position, also the paragraph justification margins (wrap-around margins) are remembered until the next invocation, but only if justification mode is switched on.
Auto indentation is automatically suppressed if text is entered very fast (by heuristic detection of input speed) in order to allow unmodified copy and paste using terminal mouse functions.
A pair of parentheses with matched indentation can be entered
by prefixing a parenthesis character with HOP.
For example, HOP "{" would enter a pair of "{" "}", both
auto-indented on their respective new line. Other pairs are
"(" ")", "[" "]", "<" ">".
HOP "/" enters an indented Javadoc comment frame.
mined -- [ filenames ... ]In restricted mode, only the file opened when mined was started can be edited, no commands changing file name reference, involving other files (copy/paste), or escaping to a shell command will be allowed. (When mined is invoked without filename argument, a file name will be prompted for despite restricted mode, however.)
In addition, the enter-control-code prefix (^V, or ^P in
WordStar mode) can also compose characters if the first
following key typed in is a character resembling an accent mark
("'`^°~). The accent is placed on the second character keyed in
or the default diacritic transformation is applied to it.
See also the description of the
^V function below for more
input options.
(If you have an appropriate keyboard, you can of course also
type in any character directly or using the
Compose/Combine key.)
An active and a standby keyboard mapping are maintained. They
can be toggled quickly for text input, also on the prompt line.
The active mapping can be selected in the following ways:
The diacritic substitution command (ESC _) replaces the two
characters at the cursor position with a suitable diacritic
character if possible.
Keyboard mapping
In UTF-8 text and terminal mode, optional keyboard mapping
is available. In this mode, input characters or sequences are
transformed to characters or sequences of a certain Unicode
script range.
Mapping tables for Greek, Cyrillic, Arabic, and Hebrew are
preconfigured (tables are the same as used by the yudit editor);
further mappings can be compiled in.
Note: As some typical keyboard mappings contain
ambigous key sequences where one may be a prefix of another, a
short delay is applied in these cases to allow recognition of
any such sequence to be mapped.
The current mapping is indicated by its two-letter script
tag in the flags area, showing "--"
if no mapping is active.
(also on prompt line)
(Alt-K also on prompt line)
minedenv.sh
".
Default values are compiled in and can be overridden by setting
the variables to empty values.
Illegal UTF-8 sequences are displayed with highlighted background, using the following indications. Furthermore, control characters encoded as a UTF-8 sequence and control characters in the "C1" range (values 0x80..0x9F) will be displayed similar to normal control characters but with coloured highlighting.
In Latin-1 terminal mode, Unicode characters outside the
Latin-1 range will be displayed as a block symbol
"¤" with highlighted,
cyan-coloured background (configurable, see just above).
Wide characters (double-width glyphs) are indicated by adding
a space and combining (zero-width) characters are indicated
using an accent symbol.
Combining characters:
If UTF-8 screen mode is enabled, mined also assumes by default
that the terminal can handle combining characters. (To disable
this, set the environment variable utf8_no_combining_screen.)
If mined operates on a terminal that handles combining
characters, it offers two editing modes: combined or separated.
They can be toggled by clicking on the "c" or "C" letter next
to the Latin/UTF-8 indicator in the flags display (right part
of the top screen line), or by the menu entry "eXtra -
combined display".
Search expression limitations
Unicode search ranges can not be very large as all
included characters are listed in an internal buffer which is
limited to ca. 1 KB.
Unicode search patterns like ä* do work now (since version 2000.4).
Environment
UTF-8 terminal operation should normally be selected by one of
the locale-related environment variables LC_ALL, LC_CTYPE, LANG,
whichever is found to exist first in that order. If its value
has a suffix of ".UTF-8", mined assumes UTF-8 terminal operation.
The recommended way of configuring the terminal environment
is to set LC_CTYPE implicitly when a UTF-8 terminal session
is started, see the script "uterm
" in the
"doc
" subdirectory of the mined distribution.
(Alternatively, the existence of the variable utf8_term
selects UTF-8 terminal mode; utf8_no_combining_screen indicates
that a UTF-8 terminal cannot handle combining characters;
utf8_screen activates UTF-8 screen output only; utf8_input
activates UTF-8 keyboard input only - these options were
introduced for testing with xterm version 104 which handled
UTF-8 output but delivered Latin-1 keyboard input.)
Case toggle
The case toggle function (ESC C, HOP ESC C, F11, HOP F11)
handles the full Unicode range, including some special cases
(e.g. Greek final s and optionally Turkish "i").
UTF-8 preservation and byte-transparent editing
Splitting within UTF-8 sequences is avoided; splitting of
combined characters is not avoided, however, they will join
seemlessly as lines are joined again. (Combining characters at
the beginning of a line are not displayed in combined display
mode.)
ctags
), opens
other file if necessary and automatically saves current file then.
minedenv.sh
from the mined distribution.
minedenv.sh
for Siemens 9780x terminals.
minedenv.sh
for details.
minedenv.sh
.
Input control (esp. escape sequences for function keys) is often
badly configured in operating system environments; for this
reason mined always accepts a wide variety of typical control
codes.
However, to accomodate some ambiguous cases, the kind of
terminal being used can be set with the following variable.
Set MINEDTERM=hp for HP terminal windows, set
MINEDTERM=siemens for Siemens terminals (9780x).
For command line options, "/" can be used instead of "-".
The "ESC -" command cannot go back within a group of
files named by the same wildcard expression. It goes to
the previous file name (or wildcard expression) instead.
Enabling the keypad HOP key: If you have a very old and
crappy BIOS, you may have to enable use of the cursor block
"5" key (for use as a HOP key) with a TSR driver (ENHKBD.COM)
or an enhanced keyboard driver.
(Older PC keyboard drivers were often so ignorant
to forbid you to use that key.)
DOS binaries: A DOS version (precompiled with djgcc) is
available for download from the
mined web site for users
who want a quick MSDOS binary. It is a "dual-mode" executable
which runs on plain DOS and also supports long file names in a
Windows 98/2000/... DOS box (not NT4.0).
The cygwin environment provides an emulation of a Unix 8-Bit
character set so diacritic characters entered in this version
are different from those entered in the EMX or djgcc or
Turbo-C versions. Especially in DOS versions other than cygwin,
diacritic input and display in UTF-8 text mode does not work as
would be expected.
Cygwin seems to have a bug with button identification, so the
right mouse button doesn't work as expected in the text area.
When compiled with Turbo-C, the file size being edited is limited
to 200KB to 500KB (depending on average line length and number
of lines).
The Turbo-C version is currently configured to handle
screen output using the "conio" module. It used to use an ANSI
driver which can be reactivated on request if anyone desires.
The disadvantage of conio is that it doesn't handle arbitrary
screen modes and sizes whereas good ANSI drivers support them
all (or is there any workaround?) The following remarks apply
to ANSI mode only:
(ANSI output only)
The default colour setting depends on an extended ANSI driver
(like NNANSI) as does the scroll down function anyway.
Unfortunately, there is no way to find out the current colour
setting nor is there an inverse video mode in many ANSI
drivers (only a fixed black on white mode) so that it is
impossible to implement just inverse display for highlighting.
Therefore, if mined thinks to see an ANSI driver of the
simpler kind, it will change its colour setting defaults. In
any case, these can be overridden with the MINEDCOL variable.
(ANSI output only)
Recommended ANSI driver:
Keyboard mapping pre-selection
With the environment variable MINEDKEYMAP the active or
standby mapping can be preselected. The value is a two-letter
script tag to set the active mapping, or it is prepended with
"-" to set the standby mapping.
Example:
export MINEDKEYMAP=-gr
will set Greek keyboard mapping standby.
Known script tags are: ar (Arabic), gr or el (Greek),
he (Hebrew), cy or ru (Cyrillic).
Keypad configuration
In order to enable the Alt key modifier for quicker entry of
"ESC" commands, or the keypad "5" key as a HOP key,
you may have to add some X configuration.
Also you may want to distinguish "Home" and "End" keys on the
two keypads of PC keyboards in order to enhance keypad value
(double assignment of functions to keypads is a waste of
resources).
See the example file .Xdefaults.mined in the distribution for
suggestions.
Compile-time configuration
Script highlighting
The subdirectory src
of the mined distribution
contains a file colours.cfg
; it contains entries
with the script name (as listed in the Unicode data file
Scripts.txt
), white space, and a colour index
into the xterm 256-colour mode.
Edit this file before building mined to adapt coloured
script display to your preferences.
MSDOS-only notes
Highlight mode:
The ANSI codes for selecting normal and exposed display can be
chosen with the environment variable MINEDCOL. The two
selections are separated by a space. Each selection is a
semicolon-separated list of the code values.
The default behaviour corresponds to the setting
Example: Green on red text, red on green status:
Users of the cygwin or EMX environments can easily compile
a version themselves.
For hints on compiling MSDOS versions, see also the file
"compilation
" in the "doc
"
subdirectory of the mined distribution.
In order to enable mouse use in a DOS box, deactivate
"QuickEdit mode" in the properties menu.
Mined tries to analyse the ANSI drivers capabilities by
checking some control sequences. This works, however, only if
the ANSI driver is at least able to send cursor position
reports.
For primitive ANSI drivers that cannot even do that, mined's
operation can be ensured with an emergency procedure:
A faked pseudo-report should be stuffed into mined as its
first input (with some key-stuffing program) and mined will
use no further cursor position requests. It will also assume a
simple ANSI driver then. The faked report should consist of
the screen size in lines and columns, embedded at the
positions of the ANSI cursor report sequence but with
different surrounding characters. For an invocation of mined
on a 25 lines and 80 columns screen a batch file for this
would look like:
In an extremely narrow terminal window (less than 8 characters), if lines are shifted out of the display, moving the cursor around may cause positioning errors and display garbage.
(Unix:) Mined cannot edit a pipe file and hangs if you try to do so. (But it can insert from, or write to, a pipe and is interruptable by ^\ then.) Mined can neither edit nor insert or write to device files.
(MSDOS:) Pipe input does not work. I don't know why.
(MSDOS:) These special character handling problems mainly apply to the Turbo-C version only: Typing of control-P while display output is active (i.e., during screen paging) can hang the system. Typing of control-C or control-Break while display output is active can at least leave some garbage on the screen. Control-S may stop screen output until control-Q is typed. Typing of control-P, control-C, or control-Break while a search operation is active can be desastrous. (Can anyone tell me how to disable BIOS/MSDOS interpretation of these characters from Turbo-C?)
minedenv.sh
" together with explanations and suggested values.
I recommend to include that file from the login profile
(e.g. "source .../minedenv.sh
" in
"$HOME/.profile
").