mined
[ -
/+
options ]
[ +
line ]
[ +/
search ]
[ files ... ]
xmined
...
umined
...
wmined
...
minmacs
...
mstar
...
mpico
...
This manual contains the main topics
Online help is also available.
mined x
mined x y z
cmd | mined
cmd
;
a file name for saving can be given later
mined x > y
mined | mail nn
cmd1 | mined | cmd2
cmd1
(output)
and cmd2
(as input)
minmacs ...
mstar ...
mpico ...
xmined ...
umined ...
wmined ...
+
number
+/
expr
-v
--
++
-
" or "+
".
+x
-r
-R
+R
+u-u
-uu
and is now on by default).
-u
(character set)
-EU
.
-l
(character set)
+u
which is
still valid for compatibility.)
-EL
.
+u-u
(character handling)
-c
(character handling)
-b
(character handling)
-E
X (character set)
-E
X (character set)
-E=
charmap (character set)
locale charmap
command):
Selects the respective character encoding for
text interpretation.
For details on locale-related character encoding configuration,
see Locale configuration.
-E.
suffix (character set)
-E:
flag (character set)
-Eu
(buffer encoding)
-K
X (input method handling)
+K
(input method handling)
-U
(terminal mode)
-U
option or environment setting).
In the latter case, -U
deselects UTF-8 terminal operation.
This option should normally not be used as the mode should
be configured in the environment (see
Locale configuration).
+U
(terminal mode)
-U
or +U
needs to be used if
the environment is correctly configured to indicate
UTF-8 as it should (see
Unicode handling / Terminal environment).
+UU
(terminal mode)
-cc
(terminal mode)
+c
(terminal mode)
+E
X (terminal mode)
+E
X (terminal mode)
+E
X (terminal mode)
+E=
charmap (terminal mode)
locale charmap
command):
Assumes the terminal to have the respective encoding.
For details on locale-related character encoding configuration,
see Locale configuration.
+E.
suffix (terminal mode)
+E:
flag (terminal mode)
-C
(character set and terminal mode)
-E
option
(with a single-letter CJK tag) effectively into a
combined -E
and
+E
option.
So mined assumes the given CJK encoding for both
terminal encoding (unless overridden by UTF-8 terminal
auto-detection) and text encoding.
Can be used for quick indication of CJK terminals
(e.g. cxterm, kterm, hanterm) if locale environment
is not properly set.
+C
(terminal mode)
+CC
(terminal mode)
+C
, but even
character codes that do not match the encoding scheme
(e.g. wrt. to specified byte ranges) are written
transparently to the terminal.
+CCC
(terminal mode)
+CC
and overrides
auto-detection of the terminal capability to display
CJK 3-byte / 4-byte codes which would by default
suppress their display if the terminal does not support them.
-A
(input handling)
+D
(keyboard assignment)
Xdefaults.mined
in the Mined runtime support library.)
-w
-a
+j
+jj
-j
-T
-Q
X
-Qs
or -Qr
),
-Q
option),
-Qs
or
-Qr
or
-Qf
).
-4
-8
-+4
-+8
-P
+P
-L
N
-e
-V
-VV
+V
+VV
-W
-B
-k
-*
-m
(default)
+m
-M
-o
N
-o
without a subsequent digit toggles scrollbar.)
-p
-t
< TAB >
-X
-s
-S
-d
N
+p
All 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.
+------+------+------+ | (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 keypad function assignment gives you the
best benefit of keypad usage and is thus considered
much more useful than the commonly expected "standard assignment"
although now and then a user is irritated by it.
-k
option switches
to the more common assignment by exchanging the
unshifted keypad assignments with the Alt- assignments,
keeping the mined assignment available with Alt.
-k
mode,
the more common function assignments (line navigation
and character deletion) are always assigned to
Control-Home/End/Del, while the paste buffer
functions are always assigned to Shift-Home/End/Del
(at least on the small keypad).
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/line end | 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.
Scrollable menus: In a low-height terminal (e.g. 24 lines), especially the Encoding menu and the Input Method menu may not fit on the terminal. In this case, they are scrollable with cursor keys, including Page Down/Up, Home, End keys.
Note: Your mouse driver may be configured to generate multiple (e.g. 3) mouse wheel events on one mouse wheel movement (e.g. with Windows).
Configuration hint: On Unix, in order to make Alt work
as a modifier, set the xterm resource metaSendsEscape to true
and the rxvt resource meta8 to false as suggested in the
example file Xdefaults.mined
in the
Mined runtime support library.
(With older versions of xterm, setting eightBitInput to false
may be required instead; this xterm option doesn't actually
disable 8 bit input as its name might suggest.)
With xterm, this setting can also be enforced dynamically with
the +D
option.
+VV
) the commands delete-end-of-line
(^K), delete-word (^T) and delete-end-of-sentence (currently
emacs mode only) append to the top buffer (disabled with the
option -VV
).
-p
that
distinguishes paragraph/line end display.
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.
Xdefaults.mined
in the Mined
runtime support library.)
-+4
or -+8
, a TAB key input will be
expanded to an appropriate number of Space characters instead
of inserting a TAB character. You can still insert a literal
TAB character with Control-V TAB.
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, mined also stores the paragraph justification margins (only if automatic paragraph justification is active) and the selected Smart Quotes style.
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.)
uprint
is installed and configured
properly, printing works in any selected character encoding.
See Printing configuration for further
details.
?
": this flag menu offers options
for permanent File info, Char info, or
Han character information display.
For the latter, further options can be selected
to configure the information shown.
--
": no keyboard mapping
is active.
U8
":
Unicode/ISO 10646 character set / UTF-8 encoding
16
" or "61
":
Unicode character set / UTF-16 encoding
(big-endian or little-endian, respectively)
L1
": Western
"Latin-1" character set / ISO 8859-1
WL
":
Windows Latin character set / "codepage" 1252
(superset of Latin-1)
L9
": Western
"Latin-9" character set (with Euro sign) / ISO 8859-15
Cy
":
Cyrillic character set / KOI8-RU encoding
(Russian, Ukrainian, Bjelorussian)
Ru
":
Cyrillic / Russian KOI8-R encoding;
used if locale environment indicates this as
terminal encoding, not in menu, use
"Cy
" instead
which combines KOI8-R and KOI8-U
Uk
":
Cyrillic / Ukrainian KOI8-U encoding;
used if locale environment indicates this as
terminal encoding, not in menu, use
"Cy
" instead
which combines KOI8-R and KOI8-U
I5
":
Cyrillic / ISO 8859-5 encoding
WC
":
Cyrillic / Windows Cyrillic encoding
Tj
":
Cyrillic / Tadjikistan encoding
Kz
":
Cyrillic / Kazachstan encoding
GP
":
Georgian character set (not Cyrillic) /
Georgian-PS encoding
I7
":
Greek / ISO 8859-7 encoding
I6
":
Arabic / ISO 8859-6 encoding
Ar
":
Arabic / MacArabic encoding (superset of ISO 8859-6)
I8
":
Hebrew / ISO 8859-8 encoding
He
":
Hebrew / Windows codepage 1255 (superset of ISO 8859-8)
MR
":
Mac-Roman character code
PC
":
PC DOS character code ("codepage 437")
PL
":
PC Latin character code ("codepage 850")
L
N"
where N is 2..8 or "0":
Latin-N or Latin-10 encodings / ISO 8859-2/3/4/9/10/13/14/16
B5
":
Traditional Chinese character set /
Big5 encoding with HKSCS extensions
GB
":
Simplified Chinese character set /
GB18030 encoding, includes GBK encoding,
includes GB 2312 / EUC-CN encoding
CN
":
Traditional Chinese character set /
CNS / EUC-TW encoding (including 4-byte code points)
JP
":
Japanese character set / JIS X 0208 / 0212 / 0213 /
EUC-JP encoding (including 3-byte code points)
sJ
":
Japanese character set / Shift-JIS encoding
(including single-byte mappings to Halfwidth Forms)
KR
":
Korean Unified Hangul character set / UHC encoding,
includes KS C 5601 / KS X 1001 / EUC-KR encoding
Jh
":
Korean Johab character set and encoding
VI
":
Vietnamese character set / VISCII encoding
TV
":
Vietnamese character set / TCVN encoding
TI
":
Thai character set / TIS-620 encoding
ç
": combined display mode
`
": separated display mode:
combining characters are separated from their
base character and displayed with coloured background
H
": HOP applies to next command
h
": HOP not active
E
": text is being edited
V
": text is being viewed (modification inhibited)
=
": cut/copy replaces (overwrites) paste buffer
+
": cut/copy appends to paste buffer
=
": like "=
",
and indicates Unicode paste buffer mode
+
": like "+
",
and indicates Unicode paste buffer mode
»
": auto-indentation enabled: entering a newline
indents the following line like the current one
¦
": auto-indentation disabled
j
": justification only on request (ESC j command)
j
": justification is performed whenever
text is entered beyond the right margin
J
": justification is performed whenever
text is inserted and the line exceeds the
right margin (slightly buggy)
": non-blank line end terminates
paragraph (blank space at line end continues paragraph)
«
": empty line terminates paragraph
-o1
option.
«
| LF (Unix-type line end)
change with MINEDRET or MINEDUTFRET (may contain up to 3 characters to configure different appearance) |
µ
| CRLF (MSDOS-type two-character line end)
change with MINEDDOSRET or MINEDUTFDOSRET |
@
| CR (Mac-type line end)
transparently handled and displayed with +R command line option
|
º
| NUL character (pseudo line end) |
¬
| "none" line end (virtual line end as used to split input lines too long for internal handling; will be joined into a single line when saving the file) |
·
| non-breaking space (character code hex A0) |
«
| Unicode line separator |
¶
| Unicode paragraph separator
change with MINEDPARA or MINEDUTFPARA |
¶
| end of paragraph (if enabled by -p )
change with MINEDPARA or MINEDUTFPARA |
»
| line extending the end of the screen line
(move cursor right to shift line display) change with MINEDSHIFT or MINEDUTFSHIFT |
«
| line shifted out left of the screen line
(move cursor left to shift line display back) change with MINEDSHIFT or MINEDUTFSHIFT |
·
| position spanned by TAB character
change with MINEDTAB or MINEDUTFTAB (may contain up to 3 characters to configure different appearance within the TAB span) |
profile.mined
in the
Mined runtime support library.
Default values are compiled in and can be overridden by setting
the variables to empty values.
-P
, mined hides
one word (separated by white space) behind the string
"assword" in a line (to accommodate for "password" or
"Password") and displays reverse "*" instead.
Password hiding can be disabled with +P
.
P
option),
password hiding is activated when editing a file whose
file name starts with "." (Unix "hidden" file convention).
-Q
is available to configure your
style preference; see also
Terminal interworking problems for configuration hints
to deal terminal-related graphics display trouble.
-Q
).
-Qv
command line option.
For the most common Western European accents, the following function keys are defined as accent prefix keys:
F5 | diaeresis: composes next input character with diaeresis, e.g. a » ä |
Shift-F5 | tilde: composes next input character with tilde, e.g. a » ã |
Control-F5 | ring: composes next input character with ring or with cedilla, e.g. a » å , c » ç |
F6 | acute: composes next input character with acute accent (accent d'aigu), e.g. a » á |
Shift-F6 | grave: composes next input character with grave accent, e.g. a » à |
Control-F6 | circumflex: composes next input character with circumflex accent, e.g. a » â |
For the Sun keyboard, the function keys R4/- , R5/÷ , R6/× , R3 , R1 , R2 are attached to the same prefix functions, in this order.
For Vietnamese input support, the following additional
accent prefix keys may be configured
(see Xdefaults.mined
in the
Mined runtime support library):
Control-1 | acute: composes following character with acute |
Control-2 | grave: ... |
Control-3 | hook above |
Control-4 | tilde |
Control-5 | dot below |
Control-6 | circumflex |
Control-7 | breve |
Control-8 | horn |
Control-9 | stroke |
Alt-1 | circumflex and acute |
Alt-2 | circumflex and grave |
Alt-3 | circumflex and hook above |
Alt-4 | circumflex and tilde |
Alt-5 | circumflex and dot below |
Control-Alt-1 | breve/horn and acute: composes following A/a with breve and acute, or following O/o or U/u with horn and acute |
Control-Alt-2 | breve/horn and grave: ... |
Control-Alt-3 | breve/horn and hook above |
Control-Alt-4 | breve/horn and tilde |
Control-Alt-5 | breve/horn and dot below |
For accent compositions, mnemonic patterns
(generic accent mnemonics) are listed in the following table;
the respective letter to place the accent(s) on is indicated
with an "x
" below.
generic mnemonic | accent placed on the base character ("x ")
|
---|---|
x: or "x
| diaeresis (umlaut) |
x' or ´x
| acute (accent d'aigu) |
x! or `x
| grave |
x> or ^x
| circumflex |
x? or ~x
| tilde |
x0 or °x
| ring above |
x,
| cedilla |
x-
| macron |
x(
| breve |
x.
| dot above / middle dot |
x_ or _x
| line below |
x/
| stroke |
x"
| double acute |
x;
| ogonek |
x<
| caron |
x2
| hook above |
x9
| horn |
x-> or >x
| circumflex below |
x-. or .x
| dot below |
x--. or .x-
| dot below and macron |
x.-. or .x.
| dot below and dot above |
x7 or x.-
| dot above and macron |
x~- or x?-
| tilde and macron |
x;-
| ogonek and macron |
x:-
| diaeresis and macron |
x-:
| macron and diaeresis |
x-'
| macron and acute |
x-!
| macron and grave |
-x
| topbar |
--x
| bar |
,x
| comma below / left hook |
x#
| double grave |
x)
| inverted breve |
x&
| hook |
%x
| retroflex hook |
x,,
| palatal hook |
x~~
| middle tilde |
x-? or ?x
| tilde below |
x--: or :x
| diaeresis below |
x-0 or ox
| ring below |
x-( or (x
| breve below |
x(-. or .x(
| breve and dot below |
x>-. or .x>
| circumflex and dot below |
x9-. or .x9
| horn and dot below |
x'.
| acute and dot above |
x('
| breve and acute |
x(!
| breve and grave |
x(2
| breve and hook above |
x(?
| breve and tilde |
x<.
| caron and dot above |
x,'
| cedilla and acute |
x,(
| cedilla and breve |
x>'
| circumflex and acute |
x>!
| circumflex and grave |
x>2
| circumflex and hook above |
x>?
| circumflex and tilde |
x:'
| diaeresis and acute |
x:<
| diaeresis and caron |
x:!
| diaeresis and grave |
x9'
| horn and acute |
x9!
| horn and grave |
x92
| horn and hook above |
x9?
| horn and tilde |
x0'
| ring above and acute |
x/'
| stroke and acute |
x?'
| tilde and acute |
x?:
| tilde and diaeresis |
Mnemonic character substitution commands (ESC _ and national variants) replace the two characters (or the HTML character tag) at the cursor position with a suitable composite character (e.g. accented character) if possible.
Xdefaults.mined
in the Mined runtime support library).
mkkbmap
script
(from tables in various formats as used by other editors) and
then compiled into mined.
See Mined configuration below for details.
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 short by
typing a Space key, the Space character itself will then be
discarded. (The timeout value is 900 ms by default and can be
configured with the environment variable MAPDELAY.)
-K
.
While navigating through the pick list, the line and the selected item in the line are highlighted accordingly; if the current item is a CJK character, also its character information (description and optionally pronunciations as configured with the Han info option of the '?' information flag menu) is displayed on the status line. If the item is a word comprising multiple CJK characters, the information for only the first of them is shown. The available information is derived from the Unihan database.
Keyboard mapping data are based on Unicode. So in CJK text mode, the selection menu (the pick list) 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.
--
" if no mapping is active.
The active mapping can be selected in the following ways:
-u
or
-l
).
It also detects UTF-16 with BOM (byte order mark U+FEFF) which
can represent the complete 21 bit Unicode subset of ISO-10646.
Since mined 2000.10, UTF-16 is maintained transparently, i.e.
a UTF-16 encoded file is written back in UTF-16 again (with BOM).
No explicit menu/command line options are currently available
for UTF-16 since internal handling is done in UTF-8. However, the
character encoding flag indicates UTF-16 file encoding with either
"16
" (big endian) or
"61
" (little endian).
U8
" if UTF-8
text interpretation is selected. For Latin-1 text interpretation
"L1
" is shown, for others see
Mode indication flags.
You may click on the indication flag to toggle between the
current and the previous selected encoding.
With HOP ESC u, permanent display is toggled. Other commands insert the code of the current character or insert a character taking its encoding from the text. For details, see the command summary.
See also the generic section Character input support above for input support for accented characters and Keyboard Mapping.
-Eu
or in the Paste buffer menu
(righ-click on the Buffer mode flag "=
" or
"+
") and select "Unicode".
=
" or
"+
"), except in Unicode text mode.
--
| if preceded by a Space character: en dash (U+2013)
otherwise: em dash (U+2014) |
-
| if an adjacent character is in the Hebrew script range: Hebrew hyphen mark Maqaf (U+05BE) |
<-
| leftwards arrow (U+2190) |
->
| rightwards arrow (U+2192) |
<>
| left right arrow (U+2194) |
+UU
.
+u-u
).
Xdefaults.mined
in the
Mined runtime support library.
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.
8
| for an unexpected UTF-8 continuation byte (range 80-BF) |
4
| for a 0xFE (254) byte |
5
| for a 0xFF (255) byte |
«
| for a too short UTF-8 sequence if followed by a single-byte character (00..7F) |
»
| for a too short UTF-8 sequence if followed by a multi-byte character (C0..FF) |
Legal Unicode characters that cannot be displayed are indicated with the following replacements:
e
| the character code U+FFFE |
f
| the character code U+FFFF |
¤ or
¤ (if wide)
or %
(if the terminal cannot display ¤ )
| a Unicode character that cannot be displayed in the (non-UTF-8) terminal (non-combining) |
' or
'
| a Unicode combining character that cannot be displayed in the (non-UTF-8) terminal |
E
| the Euro character U+20AC (in a non-UTF-8 terminal) |
"
| a quotation mark character (typographic quote mark) |
-
| a dash character |
0 ..9 ,
A ..Z
etc
| a corresponding fullwidth ASCII character (in a non-UTF-8 terminal) |
¤ 46
").
(Note: Terminal support for combining characters is
auto-detected; additional command line options are available
in case this fails.)
If mined operates on a terminal that handles combining
characters, it offers two editing modes: combined or separated.
They can be toggled by clicking the Combining display flag
in the Mode indication flags area
(right part of the top screen line),
or by the menu entry "eXtra - combined display";
separated display mode can also be selected by the
command line option -c
.
Xdefaults.mined
in the
Mined runtime support library.
With mlterm, enable this with the sample configuration
file mlterm_key
in the
Mined runtime support library.
Control-Backarrow can also be configured to work with xterm
but doesn't appear to work with rxvt or mlterm,
use F5 Backarrow instead.
+UU
right-to-left display option or auto-detected), the joined
character width will be handled correctly in cooperation with
the terminal.
uterm
for this purpose, with its own manual page.
(In case uterm
is not installed, it is also
included in the Mined runtime support library.)
+EU
selects UTF-8 terminal mode.
mkkbmap
script.
¤
| CJK character that cannot be displayed in (8-bit) terminal |
% or
%
| CJK character that cannot be displayed in (8 bit or CJK) terminal because the terminal encoding does not support it |
' or
'
| CJK combining character that cannot be displayed in (8-bit) terminal |
? or
?
| CJK character code that has no known mapping to Unicode
(to enforce display on CJK terminal use option +C )
|
# or
#
| invalid CJK character code that is outside of the
code range assigned to the encoding scheme
(to enforce display on CJK terminal use option +CC )
|
#
| CJK character in extended code range
(esp. 3 and 4 byte codes, or codes with 0x80...0x9F
byte range) that cannot be displayed on CJK terminal
due to terminal capability limitations
(to enforce display on CJK terminal use option +CCC )
|
<
| incomplete or otherwise illegal CJK code |
?
") collects
all options for information display, mainly character-related.
If "Han info" is enabled in this menu, when the cursor is
over a Han character and either descriptive or pronunciation
information about this character is available in the Unihan
database (from unicode.org), this information is displayed.
(For the Unicode version used for the Unihan data source,
see the mined change log.)
?
" flag.
The same information is always shown while you are browsing
an input method pick list (then on the status line).
The information includes the character code (in CJK encoding,
both CJK code and corresponding Unicode value are shown).
The amount of descriptive information (from the Unihan
database) to be shown can also be preconfigured with the
environment variable MINEDHANINFO;
see Han info configuration below.
-E
...
with a number of options to specify the desired text encoding
(see the encoding options above).
-E
parameter,
especially for CJK encodings) to disable auto-detection of
other encodings.
UTF-8 auto-detection cannot be disabled this way.
-E
command line
option (or -l
or -u
):
For Japanese, the JIS characters that map to two Unicode characters are supported.
With HOP ESC u, permanent display is toggled. Other commands insert the code of the current character or insert a character taking its encoding from the text. For details, see the command summary.
CJK terminals:
+E
options, see the
description of the Terminal
encoding options above.
For usage of the locale environment variables, see
Locale configuration.
Note: In native CJK terminals, it is often troublesome to find a working encoding configuration and font setup, and the locale environment is not automatically set by the terminals. A collection of wrapper scripts is available ( http://towo.net/mined/terminals.tar.gz) to help with this setup problem and demonstrate the invocation of a number of different CJK and 8 bit encoded terminal windows, along with selection of suitable fonts and proper locale environment setting.
Note: Native CJK terminals have a different assumption of the range of character codes supported in an encoding family, e.g. Big5 / Big5 with HKSCS, GB2312 / GBK / GB18030, EUC-KR / UHC, EUC-JP without/with 3 byte codes. For compact handling, mined always assumes the largest superset of these encoding families. It does, however, have some features to prevent display garbage in most cases when a terminal supports a smaller character set:
+C
option to override this
display suppression and enforce transparent display of unknown
characters in a CJK terminal.
+CC
option to override this
display suppression and enforce transparent display of invalid
character codes in a CJK terminal.
+CCC
option to override this
display suppression and enforce transparent display of extended
character codes in a CJK terminal.
See also Terminal interworking problems for special hints about certain terminals.
+E
X).
For configuration details, see
Locale configuration below.
Mined Command reference (command and key function assignments)
|
profile.mined
in the Mined runtime support library.
usrshare
); if mined is
installed into standard locations, they are copied to one of the
directories /usr/share/mined
,
/usr/share/lib/mined
,
/usr/local/share/mined
,
/opt/mined/share
,
$HOME/opt/mined/share
(depending on operating system and installation options).
Mined runtime support includes the following files:
README
VERSION
CHANGES
LICENSE.GNU
mined.hlp
conf_user/profile.mined
conf_user/Xdefaults.mined
conf_user/xinitrc.mined
conf_user/mlterm/main
conf_user/mlterm/key
bin/uprint
bin/minedmar
bin/minedmar.bat
bin/uterm
bin/mterm
bin/umined
bin/xmined
bin/wmined
bin/wmined.bat
setup_install/mined.desktop
setup_install/mined.ico
setup_install/bin/configure-xterm
setup_install/bin/makeprint
setup_install/bin/installfonts
setup_install/bin/bdf18to20
setup_install/bin/mkicon
Recognition of some special terminal features or restrictions is associated with the setting of TERM (xterm, linux, vt100, sun*, cygwin, rxvt, *ansi*, 9780*, hp*, xterm-hp, superbee*, sb*, microb*, scoansi*, xterm-sco, cons*, att605-pc, ti_ansi, mgterm).
For detection of function keys and cursor keys, the escape sequences being used by terminals are often not known to an operating system environment because they are poorly and incompletely configured. Because this does usually not work as expected (see this bug report just for an example), mined does not rely on the termcap/terminfo configuration of function key codes; rather it always accepts a wide variety of typical codes. A few ambiguous codes are resolved according to the TERM variable.
In an xterm, window headline and icon text are set to the current filename and "(*)" is added if the text has been modified.
+E
)
or text encoding (-E
). They override
environment variable settings.
For encoding recognition from locale environment variables,
mined recognises locale specifications typically found in
system installations, including those which do not include an
explicit encoding suffix. Known encoding suffixes ("charset" or
"codeset" component of locale name, starting with ".") are
recognised regardless of whether the given locale is installed
or not. Other encodings are recognised by region suffix
(starting with "_") or full locale name or alias.
In addition to hard-coded locale recognition (especially for CJK),
locale values and associated encodings are configured in the
compile-time configuration file locales.cfg
which
especially lists locale names that do not have an explicit
encoding suffix.
You can use these settings (known locale name or generic
locale name suffix) even on legacy systems without locale
support to indicate the terminal environment properly to mined.
-E
X or +E
X
with a single-letter encoding tag as listed with the description
of the
-E
options;
further encoding tags are configured in the compile-time
configuration file charmaps.cfg
.
-E=
charmap or +E=
charmap
with a character encoding name ("charmap" as reported by the
locale charmap
command).
-E.
suffix or +E.
suffix
with a locale encoding suffix ("charset"/"codeset" of locale name).
-E:
flag or +E:
flag
with a 2-letter indication used by mined to indicate the
respective text encoding in the Encoding flag.
-E
specifies
text encoding while +E
would specify
terminal encoding to be assumed.
The following table lists major encodings and generic locale suffix values by which they are recognised; in addition (as mentioned above), a large number of locale names without encoding suffix as found on various systems in known to mined and will cause it to assume the corresponding terminal encoding.
Unicode: UTF-8 | suffixes: .UTF-8 / .utf8 |
Traditional Chinese (Hongkong): Big5 with HKSCS | suffixes: .BIG5* / .Big5* / .big5* / _HK / _TW (_TW ambiguous, following encoding overrides) |
Simplified Chinese: GB18030 (includes GBK and GB2312) | suffixes: .GB* / .gb* / .EUC-CN / .euccn / _CN.EUC / _CN |
Traditional Chinese (Taiwan): CNS (EUC-TW) | suffixes: .EUC-TW / .euctw / .eucTW / _TW.EUC |
Japanese: JIS / EUC-JP | suffixes: .EUC-JP / .eucjp / .eucJP / .ujis / _JP.EUC / _JP / .euc (.euc ambiguous, more specific string overrides) |
Japanese: Shift-JIS | suffixes: .Shift_JIS / .shiftjis / .sjis / .SJIS |
Korean Unified Hangul: UHC (includes EUC-KR) | suffixes: .UHC / .EUC-KR / .euckr / .eucKR / _KR.EUC / _KR |
Korean: Johab | suffixes: .JOHAB |
Vietnamese: VISCII | suffixes: .viscii |
Vietnamese: TCVN | suffixes: .tcvn |
Thai: TIS-620 | suffixes: .tis* / .TIS* / _TH / .iso8859[-]11 / .ISO8859[-]11 |
Latin-9: ISO 8859-15 | suffixes: @euro / .iso8859[-]15 / .ISO8859[-]15 |
Cyrillic: ISO 8859-5 | suffixes: @cyrillic (unless preceded by uz_UZ which indicates UTF-8) |
Latin or other: ISO 8859 encodings | suffixes: .iso8859[-]N / .ISO8859[-]N (with number N) |
Russian Cyrillic: KOI8-R | suffixes: .koi8r |
Ukrainian Cyrillic: KOI8-U | suffixes: .koi8u |
Tadjikistan Cyrillic: KOI8-T | suffixes: .koi8t |
Russian, Ukrainian, Bjelorussian Cyrillic: KOI8-RU | suffixes: .koi |
MacRoman: | suffixes: .roman |
Windows Latin: CP1252 | suffixes: .cp1252 |
Windows Cyrillic: CP1251 | suffixes: .cp1251 |
PC Latin: CP850 | suffixes: .cp850 |
Windows Hebrew: CP1255 | suffixes: .cp1255 |
Georgian: Georgian-PS | suffixes: .georgianps |
Kazachstan Cyrillic: PT154 | suffixes: .pt154 |
Examples: To indicate that mined is running in a UTF-8 terminal (normally auto-detected, included here for demonstration) and should assume GB18030 text encoding by default, invoke either of:
LC_ALL=whatever.UTF-8 TEXTLANG=zh_CN.gbk mined
LC_CTYPE=whatever.UTF-8 TEXTLANG=chinese mined
LANG=whatever.UTF-8 mined -EG
LC_ALL=en_IN mined -E.gbk
mined +EU -E.EUC-CN
mined +EU -E=GB18030
mined +EU -E:GB
The following assumptions are made based on environment variables or command-line parameters:
encoding ("codepage") | CP850 (PC mapping of Latin-1 character set)
| +EP
CP437 (IBM PC VGA encoding)
| +Ep
CP1252 (Windows ANSI extension of Latin-1)
| +EW
|
---|
Note:
It is not unlikely that the assumption about the terminal
encoding taken by mined does not match the actual terminal
encoding (e.g. mined cannot determine the encoding based on
the ambiguous setting TERM=ansi). Also the environment
variable CYGWIN is not maintained through telnet.
Explicitly setting TERM to a suitable value after remote login
may help but may not always work either (e.g. pcansi is not
known on SunOS).
In these cases, use the explicit +E
option to force mined to assume a specific terminal encoding;
see the option values listed above for the main DOS encodings.
Note: As indicated above, cygwin emulates the Windows "ANSI" character encoding (extension of ISO Latin-1) in a DOS box window (unless reconfigured with the CYGWIN variable) instead of the IBM PC character set that a DOS box runs by default. This may produce unexpected changing of initial appearance when the cygwin-compiled mined version and the djgpp-compiled mined version are used one after the other. Since mined 2000.12, text encoding interpretation can be changed while editing in the PC versions as well as in the Unix version by clicking the Encoding flag.
Note: The environment setting "CYGWIN=codepage:oem" which is properly detected and handled by mined is not conveyed with remote login.
Note:
Running mined in a dosemu session (DOS emulator on Linux)
works fine, even in an xterm-embedded session although not
perfectly in that case: ^S and ^Q are interpreted for flow
control (thus ^S will hold all output until ^Q is entered),
and the mined option -Qa
should be
used to tune menu borders right.
Xdefaults.mined
which lists settings that should be applied to the terminal
for proper operation of several features as described
throughout this manual.
In some terminals, the cursor may not be well visible or not
visible at all if the cursor is on a character
with reverse background (control character, occurs e.g. in xterm)
or highlighted background (invalid character code, occurs e.g.
in xterm and rxvt).
See the X resource parameters for "cursorColor" in the example
configuration file Xdefaults.mined
for remedy.
If your terminal scrolls down one line when you click the left mouse button in the text area, the terminal type is not properly set up. This occurs, e.g., when you run inside a cygwin or rxvt terminal but the environment variable TERM is incorrectly set to xterm. Set it to the correct value for remedy.
If mouse wheel movement moves more than expected, especially if it cannot move by single items in a menu, this is probably a configuration issue with your mouse driver. You are probably running a Windows-based X server which is (often by default) configured to generate multiple mouse wheel events on each actual mouse wheel movement. Often not even in the Control Panel mouse section, but only in a configuration menu of mouse-specific setup software (e.g. "Browser Mouse Settings"), configure the scroll unit to 1.
any terminal: menu border display
any terminal: slow terminal feature auto-detection
export ESCDELAY; ESCDELAY=3000
export ESCDELAY; ESCDELAY=1200
mlterm
xterm
Xdefaults.mined
in the
Mined runtime support library.
+D
.
(Unfortunately this cannot be done by default as it cannot be
undone because the previous state cannot be detected.)
rxvt
Xdefaults.mined
in the
Mined runtime support library.
cxterm
kterm
hanterm
konsole
DOS console
PuTTY
profile.mined
in the
Mined runtime support library
for Siemens 9780x terminals.
export MINEDKEYMAP=-gr
will set Greek keyboard mapping standby.
export MINEDKEYMAP=py-rs
will set Pinyin input method active and Radical/Stroke
input method standby.
export MINEDQUOTES="»"
sets these »inward« quotes and corresponding single smart quotes.
export MINEDQUOTES="»»"
sets these »Swedish» quotes and corresponding single smart quotes.
M | show Mandarin pronunciation |
C | show Cantonese pronunciation |
J | show Japanese pronunciation |
S | show Sino-Japanese pronunciation |
K | show Korean pronunciation |
V | show Vietnamese pronunciation |
P | show Hanyu Pinlu pronunciation |
T | show Tang pronunciation |
D | show character description |
F | display full information (in popup-menu form); without F, the information will be shown on the status line where it is subject to truncation |
Xdefaults.mined
in the
Mined runtime support library for suggestions.
uprint
from the
Mined runtime support library
to print the current contents of the text being edited
in any selected encoding (unless the environment variable
MINEDPRINT is set to direct mined to use a different print command).
paps
or
uniprint
for actual formatting (print preprocessing).
paps
is available at
http://paps.sourceforge.net/ and uses the Pango layout
engine for formatting.
uniprint
is part of the yudit distribution; if
you don't have it installed on your system, there is another
script makeprint
in the support library which can
be used to download and build the needed uniprint program.
The mined print script (uprint
) prefers
paps
if it is available as it has more capabilities
for printing a wide range of Unicode characters, and it does
right-to-left formatting.
uprint
fails for
some reason, mined tries to print with either the print
command configured in the environment variable LPR as a fallback,
or with lp/lpr as a last resort. Working character encoding
support cannot be expected in this case, however.
profile.mined
in the Mined runtime support library for
more details and for a number of suggestions of suitable values.
Mined does not apply any default non-Latin-1 indications in order
to avoid display problems with fonts that do not support them.
Depending on your visual preference, there are a number of suitable
Unicode characters for use as indications especially in the Unicode
ranges of Arrows, Geometric Shapes and Symbols (U+2190-U+2BFF).
MINEDRET=123 # line end displays as 122222223
The indication of DOS line ends (CR/LF) may be configured with the variable MINEDDOSRET or MINEDUTFDOSRET.
-p
, mined displays
distinct indicators for line ends and paragraph ends.
A paragraph is defined to continue while lines end with white
space (space or TAB character).
The default paragraph marker is "¶" and is also used to indicate
a line ending with a Unicode Paragraph Separator. It can be
changed with the environment variable MINEDPARA or MINEDUTFPARA.
MINEDTAB=123 # TAB displays as 12222223 MINEDTAB=12 # TAB displays as 11112111
src/colours.cfg
; it contains entries with the
script name (as listed in the Unicode data file
Scripts.txt
), blank space, and a colour index
into the xterm 256-colour mode. (To make good use of 256
colour mode, the terminal program should be compiled with 256
colour support enabled. Configure xterm with
configure --enable-256-color
.)
colours.cfg
before building mined to
adapt coloured script display to your preferences.
src/charmaps.cfg
which defines the character encodings that mined knows and how
they are presented in the Encoding menu, together with flags for
indication in the Encoding flag and tags for use with the
-E
and +E
options (and the MINEDDETECT environment variable).
charmap-name
must
correspond to an existing character mapping file
charmaps/charmap-name.map
.
Additional character mappings can be generated with the script
mkchrmap
.
src/locales.cfg
which maps locale names to associated character encodings.
While this list contains mainly locale names without explicit
encoding suffix, mined also checks generic locale name suffix
values and assumes the corresponding terminal encoding.
Thus the given names or suffixes can be used even on legacy
systems without locale support to indicate the terminal
environment and preferred text encoding properly to mined.
src/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
+
sign which is implicitly expanded to the relative path name
etc/charmaps/hkscs/hkscs-2004-cj.txt
;
the HKSCS input codes file should be taken from
http://info.gov.hk/digital21/eng/hkscs/
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
Input Method 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.
DOS binaries: Two DOS-based versions, compiled with djgpp and with cygwin, are available for download from the mined web site http://towo.net/mined/ for users who want a quick binary on DOS-based systems. The djgpp binary is a "dual-mode" executable which runs on plain DOS and also supports long file names in a Windows 98/2000/XP/... DOS box (not NT4.0).
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
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.)
Immediate adjustment to changed window size does not work in the DOS version if the size change is caused by a TSR (e.g. VGAMAX using a hotkey); in that case, mined adjusts its screen display only after the next key is typed.
The cygwin terminal environment (cygwin in a DOS box window) provides an emulation of a Unix 8 bit character set so non-ASCII characters entered in this version are different from those entered in other DOS-based versions. Editing UTF-8 text, on the other hand, works transparently in all DOS-based versions. See PC terminals above for more details.
In order to enable mouse use in a DOS box, deactivate
"QuickEdit mode" in the properties menu.
The following only applies if DOS ANSI driver output is used
which is currently not the case in any configuration:
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.
Recommended ANSI drivers:
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:
The remaining remarks apply to the Turbo-C version only which is no longer supported (use djgpp instead):
profile.mined
in the Mined runtime support library
together with explanations and suggested values.
mined.hlp
and the printing script uprint
man fonts.conf
(Unix:) Mined cannot edit a pipe or device file and hangs if
you try to do so. (But it can insert from, or write to, a pipe.)
This restriction does not refer to editing from standard
input in a piped command like cmd | mined
which works of course.
(MSDOS:) Piped editing from standard input does not work for unknown reason. This restriction does not apply to the cygwin version.
(MSDOS, xterm:) Non-cygwin versions (djgpp etc.) do not work in an xterm for unknown reason. The cygwin version does of course work in xterm.