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 paste buffer functions as follows:
+------+------+------+ | (7) | (8) | (9) | | Mark | ^ | PgUp | +------+------+------+ | (4) | (5) | (6) | | <- | HOP | -> | +------+------+------+ | (1) | (2) | (3) | | Copy | v | PgDn | +------+------+------+ | (0) | (,) | | Paste | Cut | +------+------+------+
Note that the mined keypad function assignment as shown here
deviates from the more usual assignment of Home/End to
"move to beginning/end of line" and Del to "delete character".
This is deliberately designed to provide more useful functions
to easily available keys, while e.g. line movement can also
easily be achieved with HOP cursor-left or HOP cursor-right,
respectively, and character deletion can still be done with
the Del key on the smaller keypad.
This is considered much more useful than the
"standard assignment" although now and then a user is
irritated by it.
There is an option -k to switch to the "standard assignment".
Also the respective keys pressed together with the control key
invoke the "standard functions". In -k mode, the paste buffer
functions can be invoked by pressing these keys together with
the shift key. This behaviour depends on proper keyboard
configuration, see Keypad configuration
for details.
HOP - char left | move cursor to beginning of current line |
HOP - char right | move cursor to end of current line |
HOP - line up | move cursor to top of screen |
HOP - line down | move cursor to bottom of screen |
HOP - scroll up | scroll half a screen up |
HOP - scroll down | scroll half a screen down |
HOP - page up | move to beginning of file |
HOP - page down | move to end of file |
HOP - word left | move cursor to previous ";" or "." |
HOP - word right | move cursor to next ";" or "." |
HOP - delete tail of line/lineend | delete whole line |
HOP - delete whole line | delete tail of line |
HOP - delete previous character | delete beginning of line |
HOP - set mark | go to mark |
HOP - search | search for current identifier |
HOP - search next | repeat previous (last but one) search |
HOP - copy/cut | copy or cut, but append to buffer |
HOP - save buffer | save buffer, but append to file |
HOP - paste buffer | paste "inter-window buffer", which is the last saved buffer by any invocation of mined on the same machine by the same user. |
HOP - edit next file | edit last file |
HOP - edit previous file | edit first file |
HOP - exit current file | exit mined |
HOP - suspend | suspend without writing file |
HOP - show status line | toggle permanent status line |
HOP - enter HTML tag (alternate opening/closing) | embed copy area in HTML tags |
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 ^Q in emacs mode, or ^P in WordStar mode) can be used to compose characters. The six accents mentioned above (the most important Western European accents) can be entered with according prefix characters after the ^V, followed by a letter (indicated with an x in the listing); further generic accent composers are inherited from the RFC 1345 mnemonics table; the accent mnemonics are entered after a letter (indicated with an x in the listing). Mnemonic compositions produce the following accents:
Function: Keyboard mapping works as follows:
You enter a key sequence that is mapped to a character sequence
in the selected keyboard mapping table. The transformed character
sequence is used as input.
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. After a timeout, the shorter sequence
already matching will be used; the timeout can be cut by
typing a blank, the blank itself will then be discarded.
Pick list: Some other keyboard mappings, especially
for CJK input methods, contain multiple choice mappings.
In these cases, a selection menu is displayed that offers a
"pick list" to select a character from. A character can be
picked with a mouse click, or by navigation to the desired
choice with the cursor keys (down/up, right/left) or the
'<'/'>' keys , or by just selecting the menu row first
(cursor-up/down), then typing a digit 1-9 or 0 to select the
numbered character.
The space key can be configured to either navigate to the next
choice, the next row, or to select the current choice; see
option -K.
Keyboard mapping data are based on Unicode. So in CJK text
mode, the selection menu may contain symbols that are not
mapped to the active CJK text encoding. In a UTF-8 terminal,
these will still be displayed but cannot be inserted. In a
CJK terminal, these are not displayed; an empty entry
is shown instead.
An active and a standby keyboard mapping are maintained. They
can be toggled quickly for text input, also on the prompt line.
The current mapping is indicated by its two-letter script
tag in the flags area, showing "--"
if no mapping is active.
The active mapping can be selected in the following ways:
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 "¤" expect combining characters which are displayed as "'" and the Euro sign which is displayed as "E" and fullwidth ASCII characters which are displayed in visible form. (All with highlighted, cyan-coloured background; configurable, see just above.) Wide characters (double-width glyphs) are indicated by adding a space.
uterm
" in the
"doc
" subdirectory of the mined distribution.
See Locale configuration.
(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.)
ctags
command (Unix).
It opens another file if necessary and automatically saves
the current file then.
Command overview:
minedenv.sh
from the mined distribution.
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); MINEDTERM=vt100 is automatically assumed if the TERM variable starts with "vt100".
Unicode: UTF-8 | suffixes: .UTF-8 / .utf8 |
Traditional Chinese (Hongkong): Big5 with HKSCS | suffixes: .BIG5* / .Big5* / _HK / _TW (_TW ambiguous, .euctw may follow) |
Simplified Chinese: GB18030 (includes GBK and GB2312) | suffixes: .GB* / .gb* / .EUC-CN / .euccn / _CN |
Traditional Chinese (Taiwan): CNS (EUC-TW) | suffixes: .EUC-TW / .euctw |
Japanese: JIS / EUC-JP | suffixes: .EUC-JP / .eucjp / .euc (.euc ambiguous, kr/tw/cn may follow) |
Japanese: Shift-JIS | suffixes: .Shift_JIS |
Korean Unified Hangul: UHC (includes EUC-KR) | suffixes: .UHC / .EUC-KR / .euckr |
Korean: Johab | suffixes: .JOHAB |
One of the problems with locale conventions is that there is
no explicit distinction between text encoding and terminal
encoding although this is obviously a very different thing and
mixed combinations of both may occur and are actually supported
by mined. For this reason, mined follows a pragmatic approach:
For text encoding, mined checks the variables
LANG, LC_ALL, LC_CTYPE in this order.
For terminal encoding, mined checks the variables
LC_ALL, LC_CTYPE, LANG in this order.
Thus it is possible to specify for example that
mined runs in a UTF-8 terminal and should assume GB text encoding
by default:
LC_CTYPE=whatever.UTF8
LANG=zh_CN.gbk
An encoding specification with the -E parameter takes precedence over environment configuration.
If mined applies auto-detection of CJK encoding, it can be configured which encodings may be detected. For this purpose, set the MINEDDETECT environment variable to the list of encoding indications (capital letters as listed for the -E parameter) to disable auto-detection of other encodings. UTF-8 auto-detection cannot be disabled this way.
minedenv.sh
for Siemens 9780x terminals.
export MINEDKEYMAP=-gr
will set Greek keyboard mapping standby.
export MINEDQUOTES="»"
sets these »inwards« and according single smart quotes.
export MINEDQUOTES="»»"
sets these »Swedish» and according single smart quotes.
minedenv.sh
.
minedenv.sh
for details.
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.
src
of the mined distribution
contains a file keymaps.cfg
and a script
mkkbmap
; go into the src directory and
use the script to generate additional keyboard mappings:
The parameter to the mkkbmap
script can be one of
mkkbmap
will then generate an according
keyboard mapping file, e.g. for Bopomofo
keymaps.cfg
; the
entry is however initially disabled as it usually needs manual
adjustment: edit the configuration file; enable the new
entry by removing the leading '#' character, check the first
element which will be the name of the mapping to appear in the
keyboard mapping menu, check the last element of the entry
which is a two-letter shortcut and must be unique for all
mappings, then move the entry to the position where you want
it to appear in the menu. You can also group mappings by
adding "-" lines in this configuration file.
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).
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.
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.
In order to enable mouse use in a DOS box, deactivate
"QuickEdit mode" in the properties menu.
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:
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
").