mined(1)

๐Ÿ“ฆ version 2022.27, in opensuse-leap 16.0

๐Ÿ’– mined(1) โ€” MinEd, the Unicode text editor ๐Ÿ’–

Okay bestie, this is the manual page for MinEd โ€” a powerful text editor with extensive Unicode and CJK support. Buckle up, itโ€™s a whole vibe. ๐Ÿ’…

๐ŸŒธ NAME ๐ŸŒธ

MinEd โ€” powerful text editor with extensive Unicode and CJK support.

โœจ SYNTAX โœจ

mined [ -/+options ] [ +line ] [ +/search ] [ files ... ]

xmined ...
umined ...

wined ...

minmacs ...
mstar ...
mpico ...
๐Ÿšจ Note, bestie: Mined suppresses backup file names from the command line file list if they appear after their base version name as generated by command line auto-completion, in order to prevent their accidental editing; thus after file name "x" the following would be excluded from the file list (where N is a number): "x~", "x;N", "x.~N~", so that, e.g., mined x* edits x and x1 but not x~. Lowkey important, no cap.

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

๐ŸŒˆ Note: if there is no dotted line below, use 8 bit terminal environment for proper display of manual page.

ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท

Mined is a text editor withโ€ฆ okay, literally so many features. Letโ€™s go category by category, bestie. ๐Ÿซถ

๐Ÿ”’ Security and safety features

  • โ†’NEWโ†’ Transparent editing of encrypted files, using filters configurable by file type.
  • Systematic text and file handling safety, avoiding loss of data. Safety first, always.
  • Backup features, supporting simple or versioned backup.
  • Hard link preservation.
  • Optional password hiding. ๐Ÿ‘€

๐ŸŽฎ Interactive features

  • Intuitive user interface.
  • Logical and consistent concept of navigating and editing text (without ancient line-end handling limitations or insert/append confusion). Iconic, honestly.
  • Supports various control styles:
    • Editing with command control, function key control, or menu control.
    • Navigation by cursor keys, control keys, mouse or scrollbar.
  • Concise and comprehensive menus (driven by keyboard or mouse).
  • HOP key paradigm doubles the number of navigation functions that can be most easily reached and remembered by intuitively amplifying or expanding the associated function. The way this slays ๐Ÿ’…
  • Interactive file chooser and interactive file switcher.
  • Proper handling of window size changes in any state of interaction. No awkward resizing moments. โœจ

๐ŸŒ Versatile character encoding support

  • Extensive Unicode support, including double-width and combining characters, script highlighting, various methods of character input support (mapped keyboard input methods, mnemonic and numeric input), supporting CJK, Vietnamese, Hebrew, Arabic, and other scripts.
  • Character information from recent Unicode version.
  • Extensive accented character input support, including multiple accent prefix keys.
  • Support for Greek (monotonic and polytonic).
  • Support for Cyrillic accented characters.
  • Support of bidirectional terminals.
  • Support of Arabic ligature joining on all terminals.
  • East Asian character set support: handling of major CJK encodings (including GB18030 and JIS encodings with combining characters).
  • Support for a large number of 8 bit encodings (with combining characters for Vietnamese, Thai, Arabic, Hebrew).
  • Support of CJK input methods by enhanced keyboard mapping including multiple choice mappings (handled by a pick list menu); characters in the pick list being sorted by relevance of Unicode ranges.
  • Han character information with description and pronunciation.
  • Auto-detection of text character encoding, edits files with mixed character encoding sections (e.g. mailboxes), transparent handling and auto-detection of UTF-16 encoded files.
  • Auto-detection of UTF-8 / CJK / 8 bit terminal mode and detailed features (like different Unicode width and combining data versions).
  • Comprehensive and flexible (though standard-conformant) set of mechanisms to specify both text and terminal encodings with useful precedences.
  • Flexible combination of any text encoding with any terminal encoding.
  • Encoding support tested with: xterm, mlterm, rxvt, cxterm, kterm, hanterm, KDE konsole, gnome-terminal, Linux console, cygwin console, mintty, PuTTY. Slay. ๐Ÿ’…

๐Ÿ“ Text editing features

  • Text layout features:
    • Paragraph wrapping, also justifying item lists.
    • Auto-indentation and Undent function (smart Backspace).
    • Smart quotes (with quotation marks style selection and auto-detection) and smart dashes.
    • โ†’NEWโ†’ Advanced list support (bullet and numbered lists). Obsessed.
  • Search and replacement patterns can have multiple lines.
  • โ†’NEWโ†’ Search and replacement patterns can contain substitution references like \1 to matching sub-expressions like \(...\) (can be nested). Big brain energy.
  • Cross-session paste buffer (copy/paste between multiple โ€” even subsequent or remote โ€” invocations of mined).
  • Optional Unicode paste buffer mode with implicit conversion.
  • Marker stack for quick return to previous text positions.
  • Multiple paste buffers (emacs-style).
  • Optional rectangular copy/paste area.
  • Interactive selection highlighting (with mouse or keyboard selection), standard dual-mode Del key behaviour.
  • Program editing features, HTML support and syntax highlighting, identifier and function definition search, also across files; structure input support.
  • Visible indications of special text contents (TAB characters, different line-end types, character codes that cannot be displayed in the current mode).
  • Full binary transparent editing with visible indications (illegal UTF-8 or CJK, mixed line end types, NUL characters, ...).
  • Print function that works in all text encodings.
  • Optional emacs command mode.

๐Ÿชถ Small-footprint operation, portability and interworking

  • Plain text mode (terminal) operation.
  • Optimized use of terminal features for a wide range of terminals, including large terminal support (2015x2015) of recent xterm and mintty.
  • Instant start-up. Fr fr.
  • Runs on many platforms (including legacy systems): Linux, Android, Raspberry Pi, Unix (SunOS, BSD, Mac OS X, QNX, GNU Hurd, HP-UX, IBM AIX, Irix, SCO UnixWare, Ultrix, Tru64), DOS (djgpp), Windows (cygwin, Interix, MSYS), OpenVMS, Haiku. The reach? Iconic. ๐ŸŒˆ

๐Ÿ“š This manual contains the main topics

  • Command line options.
  • Editing text with mined, an overview:
    • Keypad layout.
    • The HOP function.
    • Mouse control and Menus.
    • Paste buffers.
    • Visual selection and Keypad modes.
    • Rectangular copy/paste.
    • Text position marker stack.
    • Paragraph justification.
    • Auto indentation and Structure input support.
    • List support (bullet and numbered lists).
    • Search and replace multiple lines.
  • Overview: input support features.
  • Handling files with mined:
    • Tags file support.
    • โ†’NEWโ†’ Encrypted files.
    • Data safety and security, Backup and recovery files and File locking.
    • Line end modes and binary-transparent editing.
    • File info: Memory of file position and editing style parameters.
    • File chooser and File switcher.
    • Backup integration.
    • Version control integration.
    • Printing.
  • Working with mined:
    • Quick Options (Mode indication) flags.
    • Structured editing support.
    • Password hiding.
    • Visible indication of line contents.

Language support

  • Character handling support:
    • Combining characters.
    • Character information display.
    • Character conversion features.
    • Smart quotes.
  • Character input support:
    • Accented and mnemonic input support.
    • Combining character input.
    • Special character input shortcuts.
    • Character input mnemonics.
    • Keyboard Mapping and Input Methods.
  • Character encoding support:
    • Auto-detected character encodings.
    • CJK and mapped 8 bit encoding support.
    • Combining characters.
  • Unicode support:
    • Character input support.
    • Encoding conversion support.
    • Bidirectional terminal support.
    • Joining characters.
  • CJK support:
    • CJK input method support.
    • Han character information display.
  • Terminal encoding support Mined Command reference (command and key function assignments):
    • Generic command modifiers (esp. HOP key).
    • Cursor and screen motion.
    • Entering text:
      • Input support commands.
    • Modifying text.
    • Text block and buffer operations.
    • Search.
    • File operations.
    • Menu.
  • Miscellaneous
  • MSDOS keyboard functions
  • Emacs mode
  • Windows keyboard mode
  • WordStar mode
  • Configuration of user preferences
  • Environment interworking and configuration hints
    • Mined runtime support library
    • PC versions
    • VMS version
    • Android version
    • Terminal environment
      • Locale configuration
      • PC terminals
      • Terminal setup and configuration
      • Terminal interworking problems
    • Keyboard Mapping / Input Method preselection
    • Smart Quotes style configuration
    • Han info configuration
    • Common paste buffer configuration
    • Keypad configuration
    • Printing configuration
    • Mined configuration
  • Environment variables
  • Author and Acknowledgements

F1 is your interactive help bestie โ€” tap it and the manual pops back with answers ๐Ÿซถ

๐Ÿ’ป Command line options ๐Ÿ’ป

Mined can be invoked in all these ways, no cap:

  • with or without a list of file names
  • reading from a pipe (reading text from standard input)
  • writing into a pipe (writing edited text to standard output)
  • using a script that starts it in a new window

โœจ Examples โœจ

  • mined x โ€” edits the file x
  • mined x y z โ€” edits files x, y, and z
  • cmd | mined โ€” edits the output of program cmd; a file name for saving can be given later
  • mined x > y โ€” takes the contents of file x and edits it for writing into y
  • mined | mail nn โ€” edits a text to be mailed
  • cmd1 | mined | cmd2 โ€” modifies text within a pipe between program cmd1 (output) and cmd2 (as input)
  • minmacs ... โ€” runs mined in emacs-compatible command mode (like mined -e)
  • mstar ... โ€” runs mined in WordStar-compatible command mode (like mined -W)
  • mpico ... โ€” runs mined in pico-compatible command mode (alpha)
  • xmined ... โ€” starts a new terminal window (xterm or rxvt, depending on current TERM variable setting) and invokes mined in it
  • umined ... โ€” starts a new terminal window in UTF-8 mode (xterm or rxvt, depending on font availability and usage capabilities) and invokes mined in it
  • wined ... โ€” (in cygwin) starts mined in a window (using the mintty terminal, applying Windows look-and-feel)
  • wined.bat ... โ€” (in Windows) starts mined in a window, using Windows keyboard emulation mode

๐Ÿš€ Startup options ๐Ÿš€

  • +number โ€” Mined positions to the given line number.
  • +/expr โ€” Mined initially searches for the given search expression. โ†’NEWโ†’ The search can be repeated with F9.
  • -v โ€” Mined starts in view only mode. The text cannot be modified.
  • -- โ€” Restricted mode (tool mode): no other files can be edited or otherwise affected. (Also triggered if the program name starts with "r", e.g. rmined).
  • ++ โ€” End of options; a subsequent file name can start with - or +.
  • +@ โ€” Apply extended grooming to file info file; drop entries for files that are not accessible. See File info: Memory of file position and editing style parameters for details.

๐Ÿ“ File handling ๐Ÿ“

  • +x โ€” Make new files executable (Unix). When cloning a file (with Save As or a similar feature), or if permissions are restricted by the environment (umask setting in Unix), executable permission is set only where also read permission is set.
  • +bX โ€” Select backup mode, where X is one of:
    • - โ€” no backup files
    • s โ€” simple backup files (F~)
    • e โ€” emacs style numbered backup files (F.~N~)
    • v โ€” VMS style numbered backup files (F;N)
    • n โ€” numbered backup files (whichever style occurs)
    • a โ€” automatic backup files (whichever style occurs)

See Backup files for details.

  • +zX โ€” Preselect file chooser sort options, where X is one of:
    • x โ€” sort by file name extensions
    • d โ€” list directories first

๐Ÿ”„ Line end handling (transparent and transforming) ๐Ÿ”„

  • -r โ€” Convert MSDOS line ends (CR LF) to Unix line ends (LF) (stripping CR at line ends). Can be combined with -R or +R. Also sets line end type for new files to LF for the djgpp version (which defaults to CR LF).
  • +r โ€” Convert Unix line ends (LF) to MSDOS line ends (CR LF) (adding CR at line ends). Can be combined with -R or +R. Also sets line end type for new files to CR LF.
  • -R โ€” Convert Mac line ends (CR) to Unix line ends (LF). Can be combined with -r or +r.
  • +R โ€” Recognise Mac line ends (CR) and indicate them on display; nothing is transformed with this option. Can be combined with -r or +r.
  • +u-u โ€” Interpret Unicode line separator and paragraph separator as normal characters, not line ends (handling them as line ends was previously enabled with -uu and is now on by default).

๐Ÿ”ค Character set and character handling ๐Ÿ”ค

  • -u (character set) โ€” Interprets edited text as UTF-8, disables UTF and CJK auto detection. Synonym of -EU.
  • -l (character set) โ€” Interprets edited text as Latin-1, disables UTF and CJK auto detection. Synonym of -EL.
  • +u-u (character handling) โ€” Interpret text as UTF-8, but interpret Unicode line separator and paragraph separator as normal characters, not line ends.
  • -c (character handling) โ€” Selects separated display mode for combined characters (separating base character and combining characters). This mode can also be toggled from the Options menu or by clicking on the Combining flag (next to the character encoding flag) in the flags area.
  • -b (character handling) โ€” Toggle "poor man's bidi" mode: input support for right-to-left scripts, based on Unicode script ranges. (Enabled by default unless the terminal is detected to be in bidi mode; so e.g. in mlterm, poor man's bidi is disabled by default.)
  • -EX (character set) โ€” Where X is one of B/G/C/J/S/K/H: Selects one of the supported CJK character encodings for text interpretation and disables auto-detection of CJK encodings. For details, see CJK encoding support. For more details on supported encodings, see the Character encoding flags listing in the Quick Options (Mode indication) flags section.
  • -EX (character set) โ€” Where X is one of U/L or another 1-letter character encoding tag: Selects Unicode/UTF-8, Latin-1, or one of the other supported character encodings for text interpretation. For details on supported encodings, see the Quick Options (Mode indication) flags listing.
  • -E=charmap (character set) โ€” Where charmap is a character encoding name (as reported by the 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) โ€” Where suffix is a character encoding suffix ("codeset") as used in locale names: Selects the respective character encoding for text interpretation. For details on locale-related character encoding configuration, see Locale configuration.
  • -E:flag (character set) โ€” Where flag is a 2-letter indication used by mined to indicate the respective text encoding in the Encoding flag: Selects the respective character encoding for text interpretation. For details on supported encodings and their flags, see the Quick Options (Mode indication) flags listing.
  • -Eu (buffer encoding) โ€” Enables Unicode buffer mode which always maintains the Copy/Paste buffer in Unicode, thus facilitating conversion between different encodings being edited. For details, see Unicode Copy/Paste buffer conversion.
  • -E? (character set) โ€” Determine the encoding(s) of the text file(s) given as parameters by auto-detection, print out the information and quit.
  • -E or -E- โ€” โ†’NEWโ†’ Disable text encoding auto-detection and derive it from the locale environment.
  • -KX (input method handling) โ€” Configure the Space key to perform a certain function in keyboard mapping selection menus ("CJK input method pick lists"), where X is one of:
    • 'n' โ€” to navigate to the next choice (like cursor-right),
    • 'r' โ€” to navigate to the next row (like cursor-down),
    • 's' โ€” to select the current choice (like Enter).
  • -K=im-im (input method selection) โ€” Select input method and/or standby input method (for quick switching with Alt-k). The syntax is the same as for the optional environment variable MINEDKEYMAP (see below).

๐Ÿ–ฅ๏ธ Terminal mode ๐Ÿ–ฅ๏ธ

  • -U (terminal mode) โ€” Toggles UTF-8 screen handling assumption, i.e. selects UTF-8 screen handling unless UTF-8 keyboard input is already selected (by another -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) โ€” Selects UTF-8 screen handling. Note that none of the options -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). Also, mined performs auto-detection of UTF-8 terminal encoding and UTF-8 terminal features (different width data versions, handling of double-width, combining and joining characters), so even if the environment is not correctly configured, mined should work without this explicit terminal mode parameter.
  • +UU (terminal mode) โ€” Selects bidirectional terminal support. This mode implies UTF-8 and also assumes that Arabic ligature joining (of LAM/ALEF combinations) is applied; it will be handled by mined accordingly.
  • +UU-U (terminal mode) โ€” Selects bidirectional terminal support without Arabic ligature joining (like mintty).
  • -cc (terminal mode) โ€” tells mined "bestie, this terminal can't do combining characters, periodt." By default โ€” unless it auto-detects otherwise โ€” mined assumes combining characters work on UTF-8 terminals and do not work in CJK terminals.
  • +c (terminal mode) โ€” the opposite vibe: assumes your terminal does support combining characters. On by default for UTF-8 terminals, off by default for CJK terminals, unless detected otherwise.
  • +EX (terminal mode) โ€” where X is one of B/G/C/J/X/S/x/K/H: assumes a CJK-encoded terminal using one of the supported CJK character encodings. The deets live in CJK encoding support. โœจ
  • +EX (terminal mode) โ€” where X is one of g/c/j: assumes a CJK-encoded terminal in one of the CJK character encodings like G/C/J, and also assumes the terminal can't display GB18030 4-byte encodings, CNS 4-byte encodings, or EUC-JP 3-byte encodings, respectively. ๐Ÿ’…
  • +EX (terminal mode) โ€” where X is one of U/L or another 1-letter character encoding tag: assumes a Unicode/UTF-8 or Latin-1 encoded terminal, respectively, or an 8-bit terminal running one of the other supported character encodings. For the full rundown on supported encodings, see the Quick Options (Mode indication) flags listing. For terminal encoding deets, see Terminal encoding support. ๐Ÿฆ‹
  • +E=charmap (terminal mode) โ€” where charmap is a character encoding name (as reported by the locale charmap command): assumes the terminal has that encoding. Locale-related character encoding configuration is explained in Locale configuration.
  • +E.suffix (terminal mode) โ€” where suffix is a character encoding suffix ("codeset") as used in locale names: assumes the terminal has that encoding. Again, see Locale configuration for the locale-related encoding stuff.
  • +E:flag (terminal mode) โ€” where flag is a 2-letter indication used by mined to indicate the respective encoding as text encoding in the Encoding flag: assumes the terminal has that encoding. Supported encodings and their flags are in the Quick Options (Mode indication) flags listing.
  • +E? (terminal mode) โ€” โœจ auto-detect time โœจ โ€” figure out the terminal encoding plus further terminal encoding features and properties by auto-detection, print out the info, and quit. iykyk.
  • -C (character set and terminal mode) โ€” (Deprecated.) turns a subsequent -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. Handy for a quick indication of CJK terminals (like cxterm, kterm, hanterm) if your locale environment isn't properly set. ๐ŸŽ€
  • +C (terminal mode) โ€” displays unknown characters on a CJK terminal: assumes a CJK encoded terminal (e.g. cxterm, kterm, hanterm; being more specific about the encoding is advisable), and characters encoded in a CJK encoding format are displayed transparently even if they don't map to a valid Unicode character.
  • +CC (terminal mode) โ€” displays invalid characters on CJK terminal: implies +C, but even character codes that don't match the encoding scheme (e.g. wrt. to specified byte ranges) get written transparently to the terminal. no cap.
  • +CCC (terminal mode) โ€” displays extended characters on CJK terminal: implies +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 doesn't support them. main character energy for your weird bytes ๐Ÿ”ฅ
  • +D (keyboard assignment) โ€” sets up xterm (by sending dynamic configuration codes) to apply two useful keyboard handling modes: the Del key on the small keypad sends the DEL character rather than an escape sequence, so it can be distinguished from the Del key on the big (numeric) keypad. And prepend ESC to a character if pressed with the Alt or Meta key, so Alt-commands work (e.g. Alt+f to open the file menu, Alt+Shift+H to enter HTML markers etc). (Unfortunately this can't be done by default because it can't be undone โ€” the previous state can't be detected. ๐Ÿ™ˆ) (This xterm setting should rather be configured permanently, as suggested in the sample file Xdefaults.mined in the Mined runtime support library.)
  • +# โ€” โ†’NEWโ†’ assume a dark terminal background and adjust some colours accordingly. ๐Ÿ–ค
  • -nc โ€” suppress usage of terminal colour attributes.

โœจ Information display โœจ

  • +H โ€” enable syntax highlighting for HTML/XML and server scripting. ๐Ÿ’–
  • -H โ€” disable HTML/XML syntax highlighting.
  • +?c โ€” enable character code information display on the status line.
  • +?X โ€” enable character code information display (implies +?c) with additional information, where X is one of:
    • s: Unicode script
    • n: Unicode character name
    • โ†’NEWโ†’ q: Unicode named sequence
    • d: Unicode character decomposition
    • m: mined input mnemonics available for this character
Note: setting any of these options may disable some others, since not all combinations are considered useful. ๐Ÿซถ
  • +?h โ€” enable full Han character information display as a popup. On top of the character description, a set of pronunciations can be selected with the variable MINEDHANINFO.
  • +?x โ€” enable compact Han character information on the status line. Same deal: on top of the character description, a set of pronunciations can be selected with the variable MINEDHANINFO.
  • +?f โ€” enable file and position information display on the status line (enabled by default). Heads up though: when editing a file that doesn't fit completely in memory (e.g. a large file on an old system), this option may cause considerable swapping. In that case, disable the feature with -?f. ๐Ÿ˜ญ
  • -?X โ€” deselect the respective +? option.

โœจ Editing behaviour โœจ

  • -q โ€” derive the quotation marks style from locale information (environment variables LANGUAGE, TEXTLANG, LC_ALL, LC_CTYPE, LANG). See Smart quotes for the details. Note: if either LANGUAGE or TEXTLANG is used, -q is assumed implicitly. ๐ŸŽ€
  • -q=locale โ€” derive the quotation marks style from the given locale. (-q:locale works too.)
  • +q or +q=locale โ€” like -q but exchange primary and secondary style. ๐Ÿ’…
  • -q:style โ€” set the given quotation marks style if it's available for any language, e.g. -q:"๏ฟฝ๏ฟฝ". (-q=style works too.)
  • -w โ€” recognise fewer places as word boundaries for the word skip and delete commands.
  • -a โ€” append mode: append to the text buffer or external file for copy/delete commands instead of replacing it.
  • +j โ€” set justification level 1 (or increment a level previously set by the environment variable to 1 or 2): level 1 initially enables automatic word wrap at line end when typing over the right margin. Can be changed by clicking on the j/J flag. โœจ
  • +jj โ€” set justification level 2: level 2 initially enables automatic word wrap at line end when typing within a paragraph; buggy. Can be changed by clicking on the j/J flag.
  • -j โ€” set justification level 1 or 2 (whichever isn't the one previously set). Can be changed by clicking on the j/J flag.
  • -T โ€” when moving vertically over a Tab character, stay left of the Tab column range (on the Tab character). The default depends on the previous position. Also, stay left on a wide character when moving vertically over it.
  • +T โ€” when moving vertically over a Tab character, stay right of the Tab column range (behind the Tab character). The default depends on the previous position.
  • -V โ€” place the cursor before the pasted region after paste commands. (If this option is enabled already, -V acts like -VV.)
  • -VV โ€” like -V, and disable emacs-style paste buffer functions for the "delete word" and "delete to end of line" commands (^T, ^K). ๐Ÿ’€
  • +V โ€” place the cursor behind the pasted region after paste commands. (If this option is enabled already, +V acts like +VV.)
  • +VV โ€” like +V, and enable emacs-style paste buffer functions for the "delete word" and "delete to end of line" commands (^T, ^K).
  • +[ โ€” initially enable rectangular paste buffer mode. See Rectangular copy/paste. ๐Ÿฆ‹
  • -[ โ€” initially disable rectangular paste buffer mode.
  • +V:X or -V:X โ€” enable/disable visual selection behaviour, where X is one of
    • k: keep selection when searching
    • c: automatically copy after mouse selection

โœจ Keyboard function mode selection โœจ

  • +eX โ€” select emulation mode, especially control key function mapping, where X is one of
    • e: emacs mode
    • s: WordStar mode
    • w: Windows keyboard mode
    • W: Windows behaviour (keyboard mode, CRLF for new files, cmd.exe with ESC !)
    • p: pico mode
    • m: mined default
  • -e โ€” select emacs mode. This assigns functions to control keys, M-X commands (ESC commands, using the "meta" key as emacs calls the Alt prefix) and C-X commands as defined by the emacs editor. Also the emacs paste buffer ring and cut/paste behaviour is enabled. ๐Ÿ‘‘
  • -W โ€” select WordStar mode. This configures the WordStar command key layout and enables many functions of the ^K, ^O, and ^Q menus.
  • -kX โ€” select keypad modes, where X is one of
    • m: mined keypad mode.
    • s or S: Shift-select mode: shifted keypad keys (cursor keys, PgUp/PgDn/Home/End) start or extend text selection (with visual highlighting) and visual selection behaviour is slightly adapted to common usage; in addition, Shift-HOP is mapped to the Copy function. Unshifted keypad keys retain their default mined functions. ๐Ÿ’–
    • w: Windows keypad mode; implies -kS (also implied by +ew):
    • c: Home and End keys of the small ("editing") keypad invoke Mark/Copy to paste buffer (overriding the selected mode for them)
    • C: Home and End keys of the big ("numeric") keypad invoke Mark/Copy to paste buffer (overriding the selected mode for them)
  • +t โ€” (Deprecated.) Windows keypad mode, like -kw. ๐Ÿซถ
  • +tt โ€” (Deprecated.) Shift-select mode, like -kS. ๐Ÿ’…
  • -k (as a single-letter option) โ€” Swaps the Home and End key functions of the two keypads (small keypad, numeric keypad), i.e. it exchanges the two keypads with respect to these keys. This assigns the more usual functions "goto line beginning", "goto line end" to the Home and End keys of the right keypad. The (assumedly more useful) mined default is to assign the frequently used paste buffer functions (mark, copy) to these keys. ๐Ÿซถ In turn, the assigned functions of the Home and End keys of the small keypad ("editing keypad") are exchanged to provide the other function than on the right keypad, respectively โ€” provided the terminal and its configuration support this distinction. โœจ Also Alt-Home/End are assigned the respective other functions on each keypad so the most useful keypad functions should always be quite easily available. ๐Ÿ‘‘ Regardless of this switching, mined tries to map fixed functions to modified Home and End keys: Ctrl-Home/End for line begin/end movement (both keypads), Shift-Home/End for the paste buffer copy functions (small keypad) โ€” provided the terminal, its mode and configuration support distinction of modified keypad keys. ๐ŸŒธ See also the section on Keypad layout for a motivating overview of the mined keypad assignment features and options. And about terminal support and configuration, see Keypad configuration for further hints. ๐Ÿฆ‹
  • +k โ€” Enforces usage of terminal "keypad mode" which switches the numeric keypad to send "application keypad" escape sequences. This is normally not needed. On certain terminals, mined will automatically use this mode (e.g. Linux console), and in terminal emulators it is usually not needed unless you are running a misconfigured X windows system โ€” in which case you can enable distinguished keypad functions by using the NumLock function of the keyboard and switching on this option. ๐Ÿ”ฅ
  • +Bp โ€” โ†’NEWโ†’ Backspace should apply "plain backspacing" rather than "smart backspacing", i.e. no auto-undent and only delete one combining character of a combined character; without this option, use Control-Backspace for the "plain" function; with this option, use Shift-Control-Backspace for the "smart" function. ๐ŸŽ€
  • -B โ€” (Deprecated.) Enforce the Del control character to delete left, Backspace to move left. Should normally not be used, see "Automatic backspace mode adaptation" below. ๐Ÿ’€

๐ŸŽจ Appearance ๐ŸŽจ

  • -QX โ€” Select menu border style, where X is one of:
    • s โ€” simple border, ๐ŸŽ€
    • r โ€” rounded corners, ๐ŸŒธ
    • f โ€” fat border, ๐Ÿ’…
    • d โ€” double border, โœจ
    • a โ€” ASCII border (can be combined with another option -Qs or -Qr), ๐Ÿฆ‹
    • v โ€” VT100 alternate character set graphics border, ๐Ÿ’œ
    • @ โ€” block border (deprecated), ๐Ÿ’€
    • 1 โ€” (or another digit) add a margin between menu borders and contents (can be combined with any other -Q option), โญ
    • B โ€” โ†’NEWโ†’ full menu background, ๐ŸŒˆ
    • b โ€” โ†’NEWโ†’ transparent menu background, ๐Ÿงš
    • p โ€” โ†’NEWโ†’ plain menu borders (no lines), ๐Ÿ“
    • P โ€” โ†’NEWโ†’ very plain: no menu borders, ๐Ÿ™ˆ
    • Q โ€” stylish selection bar for navigating menu items, see image (can be combined with another option -Qs or -Qr or -Qf or -Qd), ๐Ÿ‘‘
    • q โ€” disable stylish selection bar ๐Ÿ’…

Mined sets an appropriate default based on its assumptions of the terminal capabilities. ๐Ÿซถ

  • -O โ€” Disable script colour highlighting (for Greek, Cyrillic...). ๐ŸŽจ
  • +O โ€” Enable script colour highlighting (for Greek, Cyrillic...). (Disabled by default in dark terminals.) ๐ŸŒˆ
  • -f โ€” Restrict usage of graphic characters: use cell-grained scrollbar, simple menu borders, no fancy menu bar for highlighting the selected menu item. โœจ
  • -ff โ€” Further restrict usage of graphic characters: no Unicode box drawing graphic characters for menu borders. ๐Ÿ’œ
  • -fff โ€” Further restrict usage of graphic characters: no graphic characters (including VT100 graphics) for menu borders. ๐Ÿ’€
  • -F โ€” Assume a screen font with limited coverage of special symbols and restrict usage of special marker characters for display of line indications. (This is needed e.g. for KDE konsole or for xterm using TrueType fonts.) Interpretation of the MINEDUTF* environment variables is suppressed. ๐Ÿ™ˆ
  • -FF โ€” Assume a screen font with even more limited coverage of special symbols and restrict usage of special characters for indication of selected menu items. Also, trigger substitution display of a number of special characters in text (like in non-Unicode terminals). ๐Ÿ˜ญ
  • +F โ€” Revert the effect of one -F option (e.g. preconfigured in the environment variable MINEDOPT) or a corresponding assumption of mined about the specific terminal which would limit font usage. ๐Ÿซถ
  • +FF โ€” Fully enable usage of characters for special indications. โญ

๐Ÿงญ Further mode selection, interface and display behaviour ๐Ÿงญ

  • -N โ€” Set Tab size to either value of 8, 4, 2. The effective Tab size can be changed while editing with the ESC T command or from the Options menu. โœจ
  • -+N โ€” Set Tab spacing expansion mode to either size or 8, 4, 2. In this mode, a TAB input character will be expanded to an appropriate number of spaces. To enter a real Tab character, type Ctrl+V Tab (^V^I). The effective Tab size can be changed while editing with the ESC T command or from the Options menu. Tab expansion mode can be changed while editing with the HOP ESC T command or from the Options menu. ๐Ÿฆ‹
  • -P โ€” Hide passwords; enables hidden display of one word behind the string "assword" in a line (to accommodate for "password" or "Password"): hidden characters are indicated by reverse * characters. By default, this mode is activated when editing a file whose name starts with .. ๐Ÿ™ˆ
  • +P โ€” Unhide passwords; always display them. ๐Ÿ‘‘
  • +ZZ โ€” Virtual bold stropping: displays keywords of Algol-like programming languages in bold while transparently editing them in all-capital letters ("upper stropping"), which is started with entering only one capital letter. Implicitly enabled on file name suffix .a68 (disable with -ZZ). ๐Ÿ”ฅ
  • +Z_ โ€” Underline strop style: use underlined instead of bold for stropping. To activate virtual underline stropping, use both options: +ZZZ_. ๐Ÿ’œ
  • -LN โ€” (N is a number) Define mouse wheel movement to scroll by N lines (default 3). Ctrl-mouse-wheel always scrolls by 1 line. Shift-mouse-wheel scrolls by 1 page. Mouse-wheel on the scrollbar scrolls by half a page. ๐Ÿ“
  • +M: โ€” Enable file tabs header display (above menu line which is also enabled). ๐ŸŽ€
  • -M: โ€” Disable file tabs header display. ๐Ÿ’…
  • -M โ€” Suppress display of menu header line (including flags). Pull-down and pop-up menus can still be opened with keyboard commands. Mouse control remains enabled. โœจ
  • -MM โ€” Suppress display of menu header line (including flags) and disable quick menu (right-click on text). Pull-down and pop-up menus can still be opened with keyboard commands, the quick menu can still be opened with Alt+space or ESC space. ๐ŸŒธ
  • -MM+M โ€” Disable quick menu but leave menu header and flags line enabled. ๐Ÿฆ‹
  • +* โ€” Enable enhanced mouse control: Menu items can be navigated with the mouse without button pressed. Enabled by default for mintty, xterm, gnome-terminal, cygwin console. โญ
  • -* โ€” Disable enhanced mouse control (if enabled by default or by previous option), otherwise disable mouse support altogether. โš ๏ธ
  • -** โ€” Disable mouse support altogether. ๐Ÿ’€
  • -oN โ€” Select scrollbar display mode. N=0 disables the scrollbar (may speed up editing on slow remote lines), N=1 enables cell-grained scrollbar display, N=2 (default) enables finer-grained scrollbar display on a UTF-8 terminal. ๐ŸŒˆ
  • -oo โ€” Selects old (until 2000.14) left/right click behaviour on scrollbar. ๐Ÿงš
  • -o โ€” Disables the scrollbar. ๐Ÿ™ˆ
  • +o โ€” Enables the scrollbar. ๐Ÿ‘‘
  • -p โ€” Enables distinguished display of line ends and paragraph ends with different symbols. ๐Ÿ“
  • -X โ€” Disables display of the filename in the window title bar. ๐Ÿ’œ
  • -s โ€” Stay with cursor in top line after page down or bottom line after page up instead of center line. โœจ
  • -S โ€” Use scrolling for page up/down. ๐Ÿฆ‹
  • -dN โ€” Apply delay between lines of page output to achieve visually effective display build-up which may help to quickly focus on the new cursor position (the screen output is displayed starting from the cursor position, proceeding to the screen edges). If N lies between '0' and '9', the respective number of milliseconds is applied between display of two lines. If N='0', still an output flush is performed. If N='-', no delay at all is applied though still the order of display output is from cursor position to edges. Default: '-'; configuration is currently disabled in the Unix version as usleep doesn't seem to be very portable. ๐Ÿ˜ญ
  • +p โ€” Enables support for proportional display fonts. This does not really work, however, with e.g. xterm or SunOS shelltool as they do not reliably position characters after using control sequences. ๐Ÿ’€

All options are also looked for in the environment variable MINEDOPT (or MINED for compatibility). ๐Ÿซถ

On the command line, options containing wildcard characters ("?", "*") may need to be quoted (if matching files starting with - or + exist). โญ


โœ๏ธ Editing text with mined โœ๏ธ

Mined is always in insert mode. No cap. ๐Ÿ’… Commands are single control characters, double key commands starting with ESCAPE, and a collection of function keys (for various types of keyboards and terminals). As a specialty, note the prefixing 'HOP KEY' which amplifies or expands the effect of certain commands "just as you would expect"; this provides for more command flexibility without having to remember too many keys. It is described in a separate section below. ๐Ÿฆ‹

๐ŸŽน Keypad layout ๐ŸŽน

Okay bestie, so the control key layout for basic movement is topographic on the left-hand side of the keyboard โ€” an idea that comes from way back in early editors when keyboards didn't even have cursor keypads. (And yeah, using a cursor block is more comfortable, but a simple set of control key assignments is lowkey useful as a fallback on terminals or remote connections with reduced functionality. No cap.)

The right-hand cursor block of typical keyboards is assigned the most important movement and paste buffer functions. It's giving main character energy for your hands.

Keypad assignment features:

  • Mined optimizes keypad usage for the most frequently used functions โ€” especially paste buffer functions in addition to navigation functions โ€” by making them easily accessible on the keypad. โœจ
    • For this purpose, mined distinguishes between Home/End keys on the numeric keypad and on the small keypad (whenever possible with the terminal) in order to avoid the waste of resources by the usually redundant mapping of these two keypad blocks. ๐ŸŽ€
    • Note: this means that on the big ("numeric") keypad the mined keypad function assignment for Home/End deviates from their more usual meanings. This is deliberately designed to enhance support of quick copy/paste with these easily reachable keys, while line movement can also easily be achieved with HOP cursor-left or HOP cursor-right, respectively. This keypad function assignment gives you the best benefit of keypad usage and is thus considered much more useful than the "standard assignment". ๐Ÿ’…
    • The Del and Backarrow keys perform their usual dual-mode function; if a visual selection is active, they delete the selection (with a Cut to the paste buffer), if there is no visual selection, they delete the next or previous character, respectively. ๐Ÿ”ฅ

small ("editing") keypad and big ("numeric") keypad:

              +-------+-------+-------+    +-------+-------+-------+
              | Insert| Home  | PgUp  |    | (7)   |  (8)  | (9)   |
              | Paste |LineBeg|       |    | Mark  |   โ†‘   | PgUp  |
              +-------+-------+-------+    +-------+-------+-------+
              | Delete| End   | PgDn  |    | (4)   |  (5)  | (6)   |
              |Del/Cut|LineEnd|       |    |  โ†    |  HOP  |  โ†’    |
              +-------+-------+-------+    +-------+-------+-------+
                                           | (1)   |  (2)  | (3)   |
                                           | Copy  |   โ†“   | PgDn  |
                                           +-------+-------+-------+
                                           | (0)           | (.)   |
                                           | Paste         |Del/Cut|
                                           +-------+-------+-------+
  • The centrally placed HOP key is a prefix modifier that can be used for intuitive modification of navigation functions and for useful alternatives of paste buffer functions. ๐Ÿฆ‹

big ("numeric") keypad after HOP:

                                           +-------+-------+-------+
                                           | (7)   |  (8)  | (9)   |
                                           |go Mark|Scr top|FileBeg|
                                           +-------+-------+-------+
                                           | (4)   |  (5)  | (6)   |
                                           |LineBeg|       |LineEnd|
                                           +-------+-------+-------+
                                           | (1)   |  (2)  | (3)   |
                                           |Append |Scr bot|FileEnd|
                                           +-------+-------+-------+
                                           | (0)           | (.)   |
                                           |Cross-paste    |+Append|
                                           +-------+-------+-------+

See The HOP function below for alternative keys to trigger it. ๐Ÿ‘‘

  • Mined offers additional function mappings for modified keypad keys, both for providing unambiguous mappings in any case and to handle the deviation of its benefit-optimized Home/End keypad mapping from frequent expectations, and an option to customize Home/End:
    • Alt-Home/End are mapped to the Home/End functions of the other keypad, respectively. So by default, on the numeric keypad they invoke the line navigation functions. ๐ŸŒˆ
    • The -k option exchanges Home/End functions of the small and numeric keypads with each other, and switches Alt-Home/End to also invoke the "other" function, respectively: keypad function assignments:
    • (cf Windows keypad mode below) Ctrl-Del is always mapped to character deletion, while Shift-Del is mapped to the paste buffer Cut function, regardless of the visual selection. ๐Ÿ’€
    • (cf Windows keypad mode below) Ctrl-Home/End are always mapped to line navigation, while Shift-Home/End are mapped to the paste buffer functions Mark/Copy, regardless of the -k option.
    • Alt-Del is mapped to the respective "other" function, depending on visual selection. ๐Ÿ™ˆ
    • Note: Keypad function assignments as described depend on terminal support to distinguish all involved keys and modifiers which is unfortunately not always the case. Terminal support for proper distinction of different keypads and modified keys may be enhanced by appropriate terminal configuration, see the section on Keypad configuration. โ†’NEWโ†’ With xterm since 280, all desired distinctions between different keypads as well as modified keypad keys are achieved (by using the modifyKeyboard resource mode in combination with VT220 Keyboard and Application Keypad modes). ๐Ÿซถ
  • Two Keypad modes (see below) change the function assignment of the keypads.
    • In Shift-select mode (option -kS), Shift-modified keypad keys activate or extend a visual text selection; also Shift-5 (on keypad) performs Copy to paste buffer. ๐ŸŒธ
    • In Windows keypad mode (option -kw), additionally non-shifted keypad keys are changed to perform the more common functions, at the price of losing the easy Home/End assignment to invoke Mark/Copy to paste buffer (which can however be overridden with options -kc and -kC). See Keypad modes below for an overview. ๐Ÿ˜ญ

๐Ÿ‡ The HOP function ๐Ÿ‡

This function, triggered by any of the HOP keys, amplifies or expands functions as listed below. To achieve the combined function, first press any key that is assigned the HOP function, then any key assigned the base function from the table below. It's literally a little prefix spell. โœจ

Note: To enable using the HOP function also on keyboards that do not support the keypad "5" or "*" keys (e.g. small notebooks without numeric keypad), a few alternative HOP keys are provided: Control-Q, Shift-TAB, the Menu or Windows keys (if running Linux), or (providing a dual-mode function) the Control-G and ESC keys. ๐Ÿงš

  • 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 โ€” embed copy area in HTML tags

While a pull-down or pop-up menu is open, any HOP key or the Space key or the middle mouse button toggles the HOP amplifier/expander for a function subsequently invoked in the menu; the menu redisplays with function names changed where applicable. ๐ŸŽ€


๐Ÿ”ค Character-oriented navigation and editing ๐Ÿ”ค

Okay so from the traditional restriction of Unix tools to the line as a unit of operation, other editors are stuck in a line-oriented movement and insertion paradigm which implies some weird and counter-intuitive behaviour. Not mined though. ๐Ÿ’…

Mined handles the end-of-line position like any ordinary character during movement and editing operations. Also search and replacement strings can contain line ends. Iconic behaviour, honestly. โœจ


๐Ÿญ Mouse control and menus ๐Ÿญ

All versions of mined (Unix, DOS/Windows) support mouse operation. Yes bestie, even the old-school ones. ๐Ÿ–ฑ๏ธ

Mouse control operates on pull-down and pop-up menus, flags, the text area, the bottom line, and the scroll bar, in order to provide the most useful functions and menu-driven command selection at hand.

๐ŸŒŸ Summary of mouse functions ๐ŸŒŸ

In text area:

  • left click moves the text cursor to the mouse position
  • Shift-left click (works in mintty) extends the selection ๐Ÿ’…
  • left click-drag-release selects a text area and (with option auto-copy) copies it to the paste buffer; using Alt while dragging (moving the mouse) toggles rectangular selection
  • double-click (actually click on current position) = word selection (within timeout) โœจ
  • middle click displays the text status line or, if permanent file status is enabled, shows character information
  • right click pops up the quick menu
  • mouse wheel scroll scrolls by N lines (default 3, adjust with option -L). Ctrl-mouse-wheel always scrolls by 1 line. Shift-mouse-wheel scrolls by 1 page. Note: mouse-wheel on the scrollbar scrolls by half a page.

On scroll-bar:

  • left click moves one page towards the mouse position (as seen from the current scrollbar position marker) or (with option -oo) moves one page down
  • middle click moves to text position in file corresponding to relative mouse position on scrollbar
  • left click-drag moves text position in file by moving relative mouse position on scrollbar
  • right click moves one page away from the mouse position (as seen from the current scrollbar position marker) or (with option -oo) moves one page up
  • mouse wheel scroll scrolls by half a page

On bottom line (status line):

  • left click moves one page down
  • middle click displays the text status line or, if permanent file status is enabled, shows character information
  • right click moves one page up

On pull-down menu header (in left menu area of upper line):

  • left or right click or mouse wheel scroll opens menu
  • middle click opens menu with HOP-modified functions

On flag indication (in right flag area of upper line):

  • middle click toggles flag
  • left click opens flag menu if menu is open: toggles flag (effectively allowing double-click to toggle)
  • right click or mouse wheel scroll opens flag menu

On file tab area

  • left or middle click or mouse drag opens selected file
  • โ†’NEWโ†’ right click or mouse wheel scroll opens file switcher menu (like Alt-F3)
  • โ†’NEWโ†’ control-right click opens file opening menu (like F3)
  • โ†’NEWโ†’ control-mouse wheel scroll switches to next/previous file tab

On open menu

  • mouse wheel scroll navigates in menu
  • mouse movement (without holding button) navigates in menu โ€” enabled by default in mintty, xterm, gnome-terminal, cygwin console; may be controlled with -* / +* command line options. Mouse movement right/left (well beyond menu border) navigates to neighbour menu; mouse movement right (a few positions) on submenu item opens submenu
  • left click invokes menu item pointed to with the mouse
  • left or right drag (holding button down after opening the menu) navigates in menu
  • left or right release (after mouse dragging) invokes selected menu item
  • middle click toggles HOP modifier
  • Ctrl-mouse-wheel switches to next or previous menu
Configuration hint: To enable mouse operation in a Windows console window, deactivate โ€œQuickEdit modeโ€ in the properties menu.

Mined provides three kinds of menus, all can be opened with either mouse clicks or commands. The menus offer the most important editing functions (apart from simple movement). Some menus have their items grouped into sections, some of which have subtitles.

The HOP flag can be toggled while a menu is open with any of the HOP key, ^G, Space, or the middle mouse button. When a pull-down menu is opened with the middle mouse button, the HOP variation is initially triggered, offering the HOP variations of the menu items.

The three menu groups are used as follows:

  • A pull-down menu is opened by clicking the mouse on the menu header (in the left part of the top screen line) or scrolling the mouse wheel on this header. Shortcut: Each pull-down menu can also be opened with ESC or Alt and the small initial letter of the menu header (Alt-f or ESC f for the file menu etc.).
  • A flag menu is opened by clicking the right mouse button on a flag indication in the flags area (right part of the top screen line) or scrolling the mouse wheel on it. The flag menus have optional markers in front of each item showing which items are currently active. Shortcut: The Info menu, Input Method (Keyboard Mapping) menu, Smart Quotes menu, Encoding menu can also be opened with Alt-F10, Alt-I, Alt-K, Alt-Q, or Alt-E, respectively (or use an ESC prefix instead of an Alt- modifier respectively).
  • The pop-up menu is placed above the text area and can be opened with a right-click or Alt-Space (ESC Space).

When a menu is open, the cursor-left or cursor-right keys cycle through the pull-down and flag menus. Alt-cursor-left and Alt-cursor-right navigate quickly between the two sets of menus (pull-down or flag menus).

When a submenu is open, cursor-left goes back to the parent menu, cursor-right opens its next menu to the right.

There are three methods to navigate within a menu:

  • With the keyboard: open menu as described above, navigate with cursor keys or by typing the first letter of the desired menu item (which cycles through all items starting with that letter, or containing a word starting with that letter); activate menu item with Enter key.
  • With mouse clicks: open menu with click (and release) mouse button, switch to other menu with another click, click on item to activate it. The mouse wheel may be used to navigate menu items.
  • With mouse dragging: open menu with mouse button (left or right), browse menus and items with button held down, activate selected item with releasing mouse button.

Methods may be mixed, e.g. open a menu with either mouse click or keyboard, navigate with mouse wheel, then select with Enter.

When selecting a menu item, in most cases the associated function is carried out and the menu closed afterwards. In some cases, an option is toggled and the menu stays open (esp. in Info menu: Han info pronunciation selection, character information โ€œwithโ€ attributes selection).

Scrollable menus: In a low-height terminal (e.g. 24 lines), longer menus (especially the Encoding menu and the Input Method menu) may not fit on the terminal. All menus are scrollable with cursor keys, including Page Down/Up, Home, End keys. When the window size is changed, open menus are closed in order to prevent resizing and repositioning problems; this is planned to be enhanced in a future version.

๐Ÿซถ Hints ๐Ÿซถ

Note: Your mouse driver or Windows system may be configured to generate multiple (e.g. 3) mouse wheel events on one mouse wheel movement (e.g. with Windows). An option -L1 could compensate for that scaling (as mined applies a mouse wheel factor by itself which is 3 by default).

Layout configuration: See Menu display below for configuration of menu appearance.

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.

๐ŸŒˆ Interoperable and multiple paste buffers ๐ŸŒˆ

๐Ÿ’– System paste buffer / Clipboard ๐Ÿ’–

In the Windows/cygwin version, Shift-Ins inserts the Windows clipboard rather than the mined paste buffer. Copy to paste buffer always fills paste buffer and the clipboard, too. In this case, the lineend type is not copied from the clipboard (i.e. typically CRLF) but adapted to the current line.

๐Ÿฆ‹ Inter-window paste buffer ๐Ÿฆ‹

Mined can perform copy/paste operations within different editing sessions (parallel or subsequent invocations of mined): The command HOP Ins (e.g. ^G ^P) will insert the most recent paste buffer copied or cut in any of the user's mined sessions. This can also work remotely in a network; to configure this features, see Common paste buffer configuration.

๐Ÿ“ Multiple paste buffers ๐Ÿ“

Mined provides emacs-style multiple paste buffers that are organised as a buffer ring. Every buffer cut or copy operation (that places the text between the marked and the current position to the buffer) creates a new buffer and stacks it to the list of buffers. If the feature โ€œdeleted word/line appends to bufferโ€ is enabled (+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).

To paste a non-top-most buffer, paste the most recent buffer first as usual, then use the buffer-ring command (Alt-Ins or Ctrl-F4, or M-y in emacs mode) to exchange the pasted text with the previous buffer. This can be repeated, going down the stack of buffers, and at its bottom, starting over from the top again.

โœจ Keypad modes and Visual selection โœจ

Okay so mined literally shows your text selection โ€” both when you select with the mouse and when you select with the keyboard. Iconic.

๐ŸŽ€ Keypad modes ๐ŸŽ€

  • Shift-select mode (enabled with option -kS) โ€” Shift-modified keypad keys start or extend visual text selection. Otherwise the keypad functions are not modified, so that e.g. the useful quick Mark/Copy selection with Home/End keys can still be used. Note: terminal support to report Shift-modified cursor keys is required to enable this feature.

The option adjusts some other interactive responses as well to match common selection practice:

  • auto-copy (after click-and-drag) is disabled
  • Shift-mouse-left-click extends the selection (if supported by terminal)
  • mouse-right-click does not extend the selection before opening the menu
  • in addition, Shift-HOP is mapped to the Copy function

Shift selection keypad functions are as follows:

  • Shift-Left โ€” select character left
  • Shift-Right โ€” select character right
  • Shift-Control-Left โ€” select word left
  • Shift-Control-Right โ€” select word right
  • Shift-Up โ€” select line up
  • Shift-Down โ€” select line down
  • Shift-Control-Up โ€” select to previous beginning of paragraph
  • Shift-Control-Down โ€” select to next beginning of paragraph
  • Shift-Home โ€” select to beginning of line
  • Shift-End โ€” select to end of line
  • Shift-Control-Home โ€” select to beginning of text
  • Shift-Control-End โ€” select to end of text
  • Shift-PgUp โ€” select to previous page
  • Shift-PgDn โ€” select to next page
  • Shift-5 (on keypad) โ€” copy selected text to paste buffer
  • Windows keypad mode (enabled with option -kw, also implied by Windows emulation option +ew) โ€” additionally non-shifted keypad keys are changed to perform the more common functions, at the price of losing the easy Home/End assignment to invoke Mark/Copy to paste buffer (which can however be overridden with options -kc for the small ("editing") keypad and -kC for the big ("numeric") keypad). Also, some Control-modified keys change their function assignment to match more common usage.

Keypad functions include the Shift selection functions above and add the following functions:

  • Home โ€” move cursor to previous beginning of line
  • End โ€” move cursor to next end of line
  • Control-Left โ€” move cursor to previous beginning of word
  • Control-Right โ€” move cursor to next end of word
  • Control-Up โ€” move cursor to previous beginning of paragraph
  • Control-Down โ€” move cursor to next beginning of paragraph
  • Control-Home โ€” move cursor to beginning of text
  • Control-End โ€” move cursor to end of text
  • Control-Backarrow โ€” delete word left
  • Control-Del โ€” delete word right
  • HOP Control-Backarrow โ€” delete to beginning of line
  • HOP Control-Del โ€” delete to end of line

Shift-select mode (-kS) may become the default in a future version. Big mood, honestly.

Visual selection is toggled by the following actions:

  • Start visual selection highlighting:
    • mouse click (then drag)
    • Mark command (Home key, Control-space, or Mark/Select from quick menu or Edit menu)
    • (in Shift-select mode) Shift-cursor keys
  • Extend visual selection highlighting:
    • mouse drag
    • keyboard navigation
    • (in Shift-select mode) Shift-cursor keys
    • mouse click
    • (in Shift-select mode) Shift-mouse-click
  • Hide visual selection highlighting:
    • modify text
    • (unless in Windows keypad mode) Copy (End key or from quick menu or Edit menu)
    • Mark twice (e.g. press Home Home)
    • (unless in Windows keypad mode) mouse release (after drag, with auto-copy option)
    • Find (except Find matching parenthesis) (except with "keep on search" option)
    • Goto text position
    • Open file
  • Re-enable selection highlighting and continue previous selection:
    • "continue Select" from menu
    • (in Shift-select mode) Shift-cursor keys
    • (in Shift-select mode) Shift-mouse-click

Selection behaviour can be tuned with a few options in the Paste buffer menu.

Note: The actual behaviour of the paste buffer functions acting on the text selection (Copy, Cut) are not affected by the visual selection; they work alike even if the selection is hidden.

The Delete key is the only function that is actually modified by visual selection, following a dual-mode behaviour consistent with most contemporary text editors: if a non-empty visual selection is active, it deletes the selected area (Cut to paste buffer), otherwise, it deletes the next character.

๐Ÿงš Rectangular copy/paste ๐Ÿงš

Rectangular copy/paste area mode can be toggled on the Paste buffer flag (see also description of Quick Options (Mode indication) flags), in the Paste buffer menu, with HOP Mark while already on marked position, or preselected with the option +[.

Rectangular selection can also be toggled temporarily by using Alt with the left mouse button while moving the mouse for drag-selection. Note, however, that a subsequent paste will apply the untoggled mode.

Note: Rectangular area is a property of the copy/paste function, not of the paste buffer.
Note: The result of rectangular paste may not be quite as expected in these cases: - The paste buffer contains lines of different length. - The border of the paste area (in either the text or the paste buffer) contains characters of different width, like TAB, double-width, or isolated combining characters, or even incomplete character codes.

๐ŸŽฏ Text position markers ๐ŸŽฏ

A default marker for quick use and additional 16 numbered text markers are available.

Marker 0 has a special function:

  1. it is set when opening a file at the memorized position
  2. whenever a new current marker is set, the previous one is pushed to marker 0.

For keyboard commands to set and move to markers, see Text marker navigation in the Command reference below.

๐ŸŒ€ Text position marker stack ๐ŸŒ€

In addition to the explicit text markers, mined implicitly maintains a marker stack to support navigation and orientation when browsing files.

Whenever a command moves the position by a far distance (Go to marker, Go to line, Go to file beginning/end, Go to next/previous file, Search functions including Search identifier definition across files, Replace with confirm), the current position is first pushed to this stack.

Later, in order to return to the previous position, use the command ESC Enter (Alt-Enter) to move along the positions in the marker stack. The command HOP ESC Enter (HOP Alt-Enter) moves again forward along the stack.

๐Ÿ’– Paragraph justification / word wrap ๐Ÿ’–

Manual paragraph line/word wrap is invoked with the justify command (ESC j or ESC J); it justifies the current paragraph (wraps its lines/words) according to the effective margins and paragraph termination mode.

Clever justification: With ESC j, mined automatically determines left margins depending on the current paragraph and line contents. Heuristic detection of numbered items will trigger automatic indentation.

Normal justification: With ESC J, mined justifies strictly according to the margin values currently configured.

See commands listing below "ESC j" for margin setting commands.

Paragraph termination modes: Two different definitions of paragraph end are available.

  • The primary mode is to add a space at the end of each line when the paragraph continues and to end the line without space where the paragraph ends. This seems an intuitive way and as a big advantage over other approaches, it is transparent with respect to visual formatting, i.e. no text property is required that would affect visual layout of the text.
Note: Additional visual support of paragraph end detection is available with the mined option -p that distinguishes paragraph/line end display.
  • The other word-wrap mode is to add an empty (blank-only) line after each paragraph. Obviously this imposes more additional requirements on text formatting discipline and reduces freedom of text layout.

The mode in effect is indicated in the Quick Options (Mode indication) flags display; see description of Quick Options (Mode indication) flags.

๐ŸŒธ Auto indentation ๐ŸŒธ

By default, mined acts in auto-indent mode: When you enter a newline, the following line will be filled with the same prefix of space characters (Space or Tab) as the current one. This option can be toggled from the Options menu. A new line without auto indentation can be entered with the ^O command.

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.

โœจ NEW Advanced list support (bullet and numbered lists) โœจ

Okay so bestie, here's the list glow-up: a new paragraph (according to the currently selected paragraph end mode, or considering Unicode paragraph separators) after a bullet or numbered item will clone the bullet or auto-increment the numbering. The undent function (smart Backspace) also considers list bullets or numberings and removes the last level.

Note: an item paragraph is considered to start at a bullet or numbering even if the previous line does not terminate a paragraph.

๐Ÿงฉ Structure input commands ๐Ÿงฉ

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.

๐Ÿ”™ Back-Tab (Undent function / reverse indent) ๐Ÿ”™

Smart backspacing, literally: a Backarrow key from a position that is only preceded by white space on the line and on the line above will revert the input position to the previous matching indentation level. To avoid auto-undentation ("Delete single"), use Ctrl-Backarrow or F5 Backarrow to delete only one character left, or toggle auto-indentation off from the Options menu.

Note: in xterm, Ctrl-Backarrow only works if configured in your X configuration, see the example configuration file Xdefaults.mined in the Mined runtime support library.
Note: โ†’NEWโ†’ configuration option plain_BS (command line option +Bp) switches the Backarrow key from smart backspacing to plain backspacing, i.e. no auto-undent and only delete one combining character of a combined character. Use Shift-Control-Backarrow to perform smart backspacing then.

๐Ÿงต Tab expansion ๐Ÿงต

With one of the options -+8, -+4, -+2, 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 Ctrl-V Tab.

๐Ÿ”Ž Search and replace multiple lines ๐Ÿ”Ž

Mined has overcome the typical Unix tool limitation of line orientation in search operations. Search and replacement patterns can contain embedded newlines. Enter a newline (linefeed character) in the search string with ^V^J or \n (or \r to match CRLF newlines).

Note: if combining multi-line substitution with substitution references (&, \1, etc), lineend types are not strictly preserved.

๐Ÿช„ NEW Substitution references ๐Ÿช„

Mined supports 10 substitution references (like sed), a full match reference "&" and โ†’NEWโ†’ numbered references "\1" through "\9" to refer to the corresponding matching sub-expressions marked "\(...\)" in the search pattern. Sub-expressions can be nested.

๐Ÿ–๏ธ Header line underlining ๐Ÿ–๏ธ

The command HOP "-" (e.g. Ctrl-G -) underlines the header line before the cursor position with as many "-" characters as needed; it applies to the current line unless the cursor is at a line beginning, in which case it applies to the previous line.

โŒซ Automatic backspace mode adaptation โŒซ

There is much confusion about what character codes are delivered by the Backarrow and Del keyboard keys in different operating environments and configurations. For proper operation, the "stty erase CHAR" configuration should generally be set correctly to reflect the actual code emitted by the terminal. Mined detects this setting and adjusts its handling accordingly, so that the "Backarrow" key should normally work as expected (delete a character left).


๐ŸŒˆ Overview: input support features ๐ŸŒˆ

๐ŸŽ€ Character input ๐ŸŽ€

Mined provides several methods to support input of special characters that may not be easily available on the keyboard.

  • Accented and mnemonic input support defines Accent prefix keys to compose accent combinations with subsequently entered characters.
  • It also provides Character input mnemonics for easily memorisable input of a wide range of characters, including most composed Unicode characters.
  • Input support commands include a quick shortcut for two-character mnemonics.
  • Input support commands also provide for character input by hexadecimal / octal / decimal character code or Unicode value, including support for subsequent entry of multiple numeric characters according to ISO 14755.
  • Keyboard mapping switching the keyboard to support another script. This feature also provides CJK input methods.

๐Ÿงฑ Structured input ๐Ÿงฑ

  • HTML tag input (starting/closing or embedding marked text).
  • Auto indentation and Back-Tab.
  • Structure input commands: Input of indented matching parentheses and Javadoc frames.
  • Paragraph justification (line/word wrap).
  • Header line underlining.

๐ŸŒŸ Special features ๐ŸŒŸ

  • Smart quotes automatic transformation of entered straight quote marks into typographic quotation marks (style can be selected in flags area) or apostrophe, separate accents as appropriate typographic symbols, as well as smart dashes and other smart text replacements.
  • Right-to-left script input support.

๐Ÿ’– Handling files with mined ๐Ÿ’–

๐Ÿท๏ธ Tags file support / Identifier and file lookup ๐Ÿท๏ธ

The ESC t command moves to the definition of an identifier (on which the cursor should be placed) using the tags file (generated by the 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.

As a special function, if ESC t is typed on an include statement (line beginning with "#include" or "include"), the included file will be opened.

Note: like with a number of positioning commands, ESC t places the current position on the position marker stack before going to the location of the identifier definition. The command ESC Enter (Alt-Enter) moves back to that position, also saving the current file if needed first.

๐Ÿ” NEW Encrypted files ๐Ÿ”

Mined edits encrypted files transparently.

For reading or writing an encrypted file, a respective filter is used as configured in the runtime configuration file $HOME/.minedrc. See the sample configuration file in the Mined runtime support library for details. It contains pre-configured entries for using GnuPG (for files ending with ".gpg" or ".pgp") or openssl (for files ending with ".ssl").

Mined does not currently provide handling for passwords or passphrases for file encryption. Therefore, any passwords or passphrases needed for encrypted file access will either have to be entered on every access, or password or passphrase files may be used as offered by the respective decryption and encryption commands of GnuPG and openssl. See the sample configuration file for examples.

Note: if manual password input is used with openssl, be careful to remember the password which is newly assigned every time the file is written.
Note: when editing an encrypted file, the backup file will be encrypted, too. Decrypted content is exchanged with the filters using pipes, so no intermediate decrypted version is stored on the file system. Copy/paste text blocks are not encrypted, though, but they are readable for the current user only anyway (on any nontrivial file system). The same applies for a recovery file that mined writes in emergency cases to save the edited text.

๐Ÿ›ก๏ธ Data safety and security ๐Ÿ›ก๏ธ

Mined has a robust and defensive concept of handling edited text and file contents in case of any kind of program or system errors.

๐Ÿ’พ Backup files ๐Ÿ’พ

With command line option(s) +b, mined saves a backup copy of any file being overwritten (like saving the file being edited, saving to a different file, copying the paste buffer to a file). It supports three backup file name conventions and a few combined modes to select among them:

  • +b- โ€” no backup files
  • +bs โ€” simple backup files: filename~
  • +be โ€” emacs style numbered backup files: filename.~N~ where N are increasing version numbers
  • +bv โ€” VMS style numbered backup files: filename;N (using the original notation of the VMS operating system) where N are increasing version numbers
  • +bn โ€” numbered backup files, either emacs or VMS syntax, whichever already exists (with a higher version number)
  • +ba โ€” automatic backup files, either numbered if numbered backups (either style) already exist, or simple
Note: in order to preserve possibly existing hard links to the file being edited, it is actually copied, not just renamed for the backup version (like with joe, vim, or emacs with option backup-by-copying).
Note: in mined 2011.19, +ba (automatic simple/numbered backup) is the default, and +b is a shortcut for +ba. This is subject to change in a future version, however.
Note: to select your preference, use the runtime configuration file $HOME/.minedrc, or include the respective option in the environment variable MINEDOPT, or set the environment variable VERSION_CONTROL (compatible with usage by emacs and cp), with the following mapping:
  • none or off โ€” $HOME/.minedrc: backup_mode -; command line option: +b- โ€” no backups
  • numbered or t โ€” $HOME/.minedrc: backup_mode e; command line option: +be โ€” emacs style numbered backups
  • existing or nil โ€” $HOME/.minedrc: backup_mode a; command line option: +ba โ€” automatic backup mode
  • simple or never โ€” $HOME/.minedrc: backup_mode s; command line option: +bs โ€” simple backups
  • backup_mode n โ€” +bn โ€” numbered backups (automatic style)
  • backup_mode v โ€” +bv โ€” VMS style numbered backups
Note: to place backup files in a different directory than the original file, use the environment variable BACKUP_DIRECTORY or BACKUPDIR. It can be either an absolute pathname (e.g. $HOME/.backups) or a relative pathname (e.g. .~) in which case backup files are stored relative to the respective working directory of mined.
Note: on VMS, backup options are ignored as VMS handles backup files natively.

๐Ÿ”’ File locking ๐Ÿ”’

Mined checks and maintains interoperable lock files, which are symbolic links mentioning the user and machine currently editing the file (not on MSDOS and VMS). If the user tries to modify the text of a file locked by somebody else, mined informs the user and changes editing mode to view-only. The lock can be overridden (removed or ignored) from the File menu.

Mined implements workarounds for network file systems that do not support handling lock files or symbolic links properly: cygwin symbolic links that appear as plain text files on Samba/CIFS mounted file shares, and lock files that could be created but cannot be deleted due to weird permission configuration of a network file share.

๐Ÿ’พ Edited text / Recovery files

okay so bestie, this is the part where mined is literally the most protective friend you have. Every care has been taken to prevent loss of the edited text in case of save errors or accidental quit commands etc โ€” it does not play about your work. mined always prompts before discarding any modified text, even when you're editing without an associated filename (and yeah, in that case other popular editors just ignore loss of edited text, which is giving "not a girl's girl" energy, but we move).

There are three cases, however, in which edited text would be lost:

  • if you explicitly discard edited text (e.g. ESC q and not answering the "Save?" question with "y") โ€” that's on you, bestie ๐Ÿ™ˆ
  • if mined is sent an external terminating signal (e.g. on terminal I/O error); two exceptions are the SIGKILL signal (which cannot be caught by a program) and SIGTERM (see below)
  • in the rare case that mined should fail with an internal signal (e.g. if out of memory) ๐Ÿ˜ญ

In these cases, mined can save the edited text in a recovery file dir/#name# (when editing file dir/name); in the explicit case, this is only done if the answer to the "Save?" question is "r" (to "recover later"). If the edited file is later opened, and a recovery file still exists (which is newer than the file being opened), mined will display a notice. In the File menu, there is the option to recover the text from the recovery file. Note: The recovery file is interoperable with emacs (as are the use cases); however, mined is superior here because emacs mangles non-ASCII characters in recovery files ๐Ÿ’…. Mind, though, that interoperability with respect to recognising recovery files depends on consistent configuration of their location; see the directory configuration option below.

Note: If mined is sent an explicit SIGTERM signal it tries to terminate normally instead, writing modified text to the file being edited, including interactive handling if needed.
Note: After catching a signal, mined also tries an emergency save of the edited text into a "panic file" in one of the directories $TMPDIR, $TMP, $TEMP, /usr/tmp, or /tmp (whichever variable is defined first and directory is writable in this order; or similar directories under VMS or MSDOS). The file contains the edited text, identical to the recovery file. It is written first, before the recovery file, to provide a quick save attempt e.g. if the system is crashing and the file system of the edited file is no longer available. Literally emergency save, she's got your back ๐Ÿซถ
Note: If possible, mined also tries to continue normally after panic handling (unless multiple external signals are nested).
Note: To place recovery files in a different directory than the original file, use the environment variable AUTO_SAVE_DIRECTORY or AUTOSAVEDIR or BACKUP_DIRECTORY or BACKUPDIR as described for backup files above.

๐Ÿ‘€ Overwriting files and Change monitoring

If any command is issued to write to a file not previously read in (after change of file name or working directory, or with a Copy to file command), mined prompts for confirmation. No sneaky overwrites in this house โœจ

Also, if mined detects that the file being edited has been changed, it displays a notice and asks for confirmation before saving. To this aim, mined checks the modification time, โ†’NEWโ†’ file size, device and inode (in case the file got replaced by rename/move/mount operations). This is checked if mined is notified of refocussing the window (if supported by the terminal), and after shell commands (ESC !, ESC c, ESC z).


๐Ÿ” File access permissions

When creating a new file, its access permissions are set according to the default behaviour set in the user environment (umask setting in Unix). However, when cloning a file (with Save As / Set Name / ESC n / ESC d), file access permissions of the originally opened file are preserved and cloned โ€” so the clone matches the original, iconic behaviour honestly.

The +x command line option adds executable permission to newly created files but only to those users that are also given read permission by the rules above.


โœจ Special file types โœจ

๐ŸŽ€ Character or block device files

Mined rejects reading from or writing to a device file in order to prevent being blocked. Exception: /dev/clipboard on cygwin.

๐Ÿฅค FIFO files

Mined can edit a FIFO file (named pipe) like any other file. Before mined can finish loading from the pipe, another process needs to have written to it and then close it. Before mined can finish saving to the pipe, another process needs to have opened it for reading. It's giving teamwork, lowkey ๐Ÿค

๐ŸŒŠ Pipe input

When invoked within a pipe, redirecting input, mined loads its text buffer from standard input. โ†’NEWโ†’ Mined does not manipulate the screen mode before data is available from the pipe, so to some extent it can interwork even with screen programs providing its input.

๐ŸŒˆ Pipe output

In the "Editing for standard output" mode (i.e. when invoked within a pipe, redirecting output), only one "file save" operation can be performed writing to standard output. If more than one such operations are issued (e.g. using the ESC w / F2, F3, or suspend command) only the first one will write the text buffer to standard output; any subsequent one is treated as usual (with empty file name). โ†’NEWโ†’ If mined exits after writing to a pipe, it does not manipulate the screen mode after beginning to write, so to some extent it can interwork even with screen programs taking its output.


๐Ÿฆ‹ Line end modes and binary-transparent editing

Mined is binary transparent. It can handle all types of line ends (Unix (LF), DOS (CRLF), Mac (CR, with option +R), โ†’NEWโ†’ ISO 8859/EBCDIC Next Line (NL, not after auto-detection of text encoding), and Unicode separators (LS, PS)) simultaneously in the same editing session. They are indicated by different visible line end indications. Files without trailing line end can be edited and created (using the delete character right function on the last line end). NUL characters are handled as virtual line ends. Lines too long for internal handling are split transparently (with a "none" virtual line end).

Character codes that are illegal in the currently selected text encoding are maintained transparently and are clearly indicated (e.g. illegal UTF-8 sequences in Unicode text) โ€” she sees everything, no cap ๐Ÿ‘‘

Files with mixed encoding (e.g. UTF-8 / 8 bit sections) can be edited comfortably.

Input: To enter a NUL character, use ^V # 0 or ^V NUL or ^V Ctrl-Space (if the keyboard supports Ctrl+Space).


๐Ÿง  File info: Memory of file position and editing style parameters

On every file saving command, mined remembers the last text position, paragraph justification margins (only if automatic paragraph justification is active), selected Smart Quotes style and Input Method (Keyboard Mapping), and TAB display width. File info memory is relative to the working directory, using a hidden file info file (.@mined โ€” mined also handles its DOS short name @MINED~1 where it occurs, to provide some interoperability with the DOS version of mined); previously used file marker files (@mined.mar) will be migrated and cleared from duplicate entries.

Note: File information is stored every time the user invokes a command to save the file (even if no write is performed because the text has not been edited). When editing that file again (from the same working directory), mined will automatically move to that position (and set text marker 0 to it). Muscle memory but make it filesystem, we love to see it ๐Ÿ’–

๐Ÿงน File info grooming

Mined checks and removes duplicate entries (from previous versions) in the file info file. With option +@, mined also checks whether file info entries correspond to actual files that exist and are visible to the user; it will otherwise remove such entries. Mined can be called with this option alone and will then exit after file info grooming. Mind, however, that files may be invisible only temporarily (e.g. due to unmounted file systems, or unplugged USB drives), and will get their info entries removed then, too. So like, grooming is great but don't unplug your USB and then be surprised, bestie ๐Ÿ’€


๐Ÿ—‚๏ธ File chooser

To select a filename for a file operation (e.g. open, save, insert, write buffer), mined opens an interactive file chooser that presents a listing of files and directories in the current directory (for the change directory command, only directories are shown). The list can be navigated and manipulated in these ways:

  • cursor keys (including page down/up, end/begin)
  • mouse movement and scroll
  • entering a filename prefix which navigates to the first file matching it
  • TAB will usually copy the current filename into the editing field (if it was partially matching a file name, it is thus completed, similar to file completion on the command line but case-insensitively)
  • TAB on a directory will navigate the file chooser into it
  • TAB or HOP while the filename editing field is containing wildcards interprets the entered file name as a pattern and switches to a filtered file listing (recognising "*", "?", "[abc-x]", "[^abc-x]" wildcard expressions, no escapes)
  • Enter on a directory will navigate the file chooser into it (unless for the ESC d command in which case it is selected)
  • Enter on a selected (or entered) filename will choose the name

Also, a filename can be typed in directly (being interpreted as a filename prefix interactively). The filename or prefix is displayed in the title bar of the popup file chooser menu. When entering file or directory names, the leading ~ notation to refer to one's home directory is accepted โ€” home sweet home ๐Ÿ โœจ

Note: The full path name of the currently displayed directory is shown as the first entry in the file chooser menu.
Note: A few sorting options are offered in the "Options" - "File sort options..." submenu. They can also be preselected with the command line option +zX. See the file chooser options for details.
Note: In the file chooser, filenames are interpreted in Unicode (UTF-8 encoding) while file name parameters given on the command line are interpreted in the terminal encoding. This may lead to inconsistent handling of non-ASCII filenames. Use the ESC ? command to display the file name using native encoding.
Note: On some file systems, retrieving directory information can be slow. Mined handles this and provides feedback about delayed operation, retrieves directory information lazy by page being displayed, and flushes display of the file chooser by line to provide visual feedback about the file information being retrieved. She's literally giving you a loading indicator, icon behaviour fr fr ๐ŸŒธ

File tabs

Okay bestie, imagine browser tabs but make it editor-core. Mined gives you virtual file tabs sitting right above the header line, listing out every file name as it got opened โ€” whether from the command line or via the file chooser. ๐ŸŒธ

  • Click a file name in the file tabs panel, or hold-and-move the mouse over them, and boom: you're editing a different file. If the current file has been modified, it gets saved first, no stress. ๐Ÿ’–
  • Right-click = opens the file switcher menu (same energy as Alt+F3).
  • Control-right click = opens the file opening menu (like F3).
  • Control-mouse wheel scroll = switches to the next/previous file tab. iykyk ๐Ÿฆ‹

File switcher

The File switcher serves up a whole list of active files to pick from, and it's literally made up of the files supplied on the command line plus any files you opened or saved later. Main character energy, honestly. โœจ

Summon it with Alt+# or ESC #, or Alt+F3 or ESC F3, or just slide through the File menu. ๐ŸŽ€ The Close file command (yep, in the File menu) closes the current file and removes its name from the list.

Ways to navigate and manipulate the list:

  • cursor keys (including page down/up, end/begin) โ€” the classic, ate ๐Ÿ’…
  • mouse movement and scroll
  • entering a filename prefix, which navigates you to the first file matching it
  • Enter on a selected (or entered) filename will choose the name ๐Ÿ‘‘

Want to reload the current file and stay (approximately) at the current position? Use ESC Enter (Alt-Enter) after reloading. ๐Ÿซถ


Page length

ESC P sets how many lines mined assumes to be on a page. Why do you care? Because then the status line can show you the page number, so finding your spot in a print-out is lowkey effortless. ๐Ÿ”ฅ

Also, the Goto Line/% command (^G etc.) accepts a final 'p' or 'P' โ€” in those cases it positions you to the top of the given page.

And this info gets associated with and stored alongside the file name if file position memory is enabled; see File info: Memory of file position and editing style parameters above. ๐Ÿ’พ


Restricted mode (tool mode)

Bestie, this is the locked-down vibe check. Restricted mode gets triggered with:

mined -- [ filenames ... ]

or, if it's installed:

rmined [ filenames ... ]

In restricted mode, only the file opened when mined was started can be edited. Straight up: no commands that change the file name reference, no commands involving other files (so no copy/paste shenanigans), and no escaping out to a shell command. Not allowed, periodt. ๐Ÿšซ๐Ÿ’€


Backup integration

From the File menu there's a backup command that invokes a "bu" script โ€” and that script must reside in the user's command search path. That's the whole vibe. ๐ŸŽ€


Version control integration

Also in the File menu: checkout and checkin commands, which invoke "co" or "ci" scripts, respectively (again โ€” they must live in the user's command search path). โœจ

This is basically your gateway to ClearCase or any other version control system, and mined does the automatic save or screen update as appropriate. Iconic teamwork, honestly. ๐Ÿซถ


Printing

File menu โ†’ print command โ†’ prints the text you're currently editing. ๐Ÿ–จ๏ธ

If the script uprint is installed and configured properly, printing works in any selected character encoding. See Printing configuration for the deets.

On Windows, mined uses notepad /p for printing.

Note: the font size you interactively configure in notepad also affects the print size. With a fixed-width font, a font size of not more than 10pt gives you at least 80 characters per line; and if 72 characters per line are enough for you, you can use 11pt font size. Choose wisely bestie ๐Ÿ’…

๐ŸŒˆ Working with mined ๐ŸŒˆ

Quick Options (Mode indication) flags

The right side of the top menu bar is showing off a bunch of one-letter or two-letter indications for certain modes โ€” and babes, they're interactive. ๐ŸŽ€ The associated flag menus can be opened from there with a mouse right-click, or you can toggle the modes quickly with a middle-click. (Keyboard shortcuts for handling flags and menus are available too, so you're never stuck.)

  • Information display mode
    • "?" โ€” this flag menu offers options for permanent File info, Char info, or Han character information display. For Char info and Han info, you can then select further options to configure the information shown.
Note: in extreme situations, a permanent File info display might cause swapping (when editing a file that does not fit completely in memory, e.g. a large file on an old system). In that case: disable the feature. ๐Ÿ™ˆ
  • (In non-Latin-1 text and terminal mode only) Input Method (Keyboard Mapping)
    • "--" โ€” no keyboard mapping is active.
    • "..." โ€” a two-letter input method tag means an according keyboard mapping is active, mapping keyboard input to characters of the selected Unicode script range, or using a more complex CJK input method involving "pick list" selection menus. See Keyboard Mapping and Input Methods below. ๐Ÿฆ‹
    • Right mouse button on this indication opens a menu for selection of the desired keyboard mapping.
    • Left mouse button on this indication toggles between the current and the previous selected keyboard mapping.
Note: in the open Input method menu, the last column indicates the source of the input method with a short tag, as follows: - "U" โ€” generated from Unicode data file UnicodeData.txt - "H" โ€” generated from Unihan database Unihan.txt - "C" โ€” transformed from cxterm input table - "M" โ€” transformed from input method of the m17n project - "Y" โ€” transformed from yudit keyboard mapping file - "V" โ€” transformed from vim keymap file - "X" โ€” transformed from X keyboard mapping file
  • Smart Quotes
    • Two quote marks are displayed that act as automatic "smart quotes": when you type a " or ' character (straight double or single quote), it gets replaced by an opening or closing typographic quote mark (double or single, respectively), depending on the text context. So fancy โœจ
    • Right mouse button on these indications opens a menu for selection of the desired quotation marks style.
    • Left mouse button on this indication toggles between the current and the previous style selected with the menu.
  • Character encoding (used for text interpretation)
    • A two-letter character encoding tag indicates the text encoding currently assumed for display. Changing the encoding changes the interpretation of the text โ€” which is otherwise handled transparently; it does not recode the text. ๐Ÿซถ
    • Right mouse button on these indications opens a menu for selection of the desired quotation marks style.
    • Left mouse button on this indication toggles between the current and the previous selected encoding.
Note: see Character encoding support below for a list of encodings that are auto-detected.
Note: for hints on preselecting preferred text encoding (as well as terminal encoding) and a note on adjusting the available encodings and configuring the Encoding menu, see Locale configuration.
  • "U8" โ€” Unicode/ISO 10646 character set / UTF-8 encoding
  • "16" or "61" โ€” Unicode character set / UTF-16 encoding (big-endian or little-endian, respectively) In contrast to the other encodings, UTF-16 has no separate entry in the Character encoding menu, as its internal handling is UTF-8 and cannot be switched while editing; these two flag values only indicate that the file being edited was found to be encoded and will be saved in UTF-16. ๐Ÿ’พ
  • "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, Byelorussian)

submenu more NE Eurasian:

  • "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
  • "AR" โ€” โ†’NEWโ†’ Armenian character set / ARMSCII encoding ๐Ÿ†•

submenu Greek/Semitic:

  • "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)

submenu more Latin:

  • "MR" โ€” Mac-Roman character encoding
  • "PC" โ€” PC DOS character encoding ("codepage 437") ๐ŸŽ€
  • "PL" โ€” PC Latin character encoding ("codepage 850")
  • "LN" where N is 2..8 or 0 โ€” Latin-N or Latin-10 encodings / ISO 8859-2/3/4/9/10/13/14/16

CJK encodings:

  • "B5" โ€” Traditional Chinese character set / Big5 encoding with HKSCS extensions, extends CP950
  • "GB" โ€” Simplified Chinese character set / GB18030 encoding, extends CP936, 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 / EUC-JP encoding (including 3-byte code points)
  • "JX" โ€” โ†’NEWโ†’ Japanese character set / EUC-JIS-2004 (X 0213) encoding
  • "32" โ€” โ†’NEWโ†’ Japanese character set / Windows "Shift_JIS" encoding / CP932 (including single-byte mappings to Halfwidth Forms)
  • "SX" โ€” โ†’NEWโ†’ Japanese character set / Shift_JIS-2004 (X 0213) encoding
  • "KR" โ€” Korean Unified Hangul character set / UHC encoding / CP949, includes KS C 5601 / KS X 1001 / EUC-KR encoding
  • "Jh" โ€” Korean Johab character set and encoding

Further Asian encodings:

  • "VI" โ€” Vietnamese character set / VISCII encoding
  • "TV" โ€” Vietnamese character set / TCVN encoding
  • "WV" โ€” โ†’NEWโ†’ Vietnamese character set / CP1258 encoding
  • "TI" โ€” Thai character set / TIS-620 encoding
  • Combining display (available only if the current text encoding contains combining characters)
    • "๏ฟฝ" โ€” combined display mode
    • "`" โ€” separated display mode: combining characters are separated from their base character and displayed with coloured background
  • HOP key active
    • "H" โ€” HOP applies to next command
    • "h" โ€” HOP not active
  • Edit mode vs. View only mode
    • "E" โ€” text is being edited
    • "V" โ€” text is being viewed (modification inhibited)
    • Note: this is not related to a file being read-only; if you "edit" and modify the text of a read-only file, you will have to save to a different file name (or discard)
  • Paste buffer (double flag)
    • "%" โ€” normal copy/paste mode
    • "[" โ€” rectangular copy/paste mode
    • "=" โ€” cut/copy replaces (overwrites) paste buffer
    • "+" โ€” cut/copy appends to paste buffer
    • "%" or "[", "=" or "+" โ€” as above, and indicates Unicode paste buffer mode (in non-Unicode text encoding)
  • Auto-indent mode
    • "๏ฟฝ" โ€” auto-indentation enabled: entering a newline indents the following line like the current one
    • "๏ฟฝ" โ€” auto-indentation disabled
  • TAB expand mode and TAB width โ†’NEWโ†’
    • "N" โ€” (where N is 2 or 4 or 8) TAB is inserted literally, TAB width is as indicated
    • "N" โ€” (where N is 2 or 4 or 8) TAB is expanded to spaces, TAB width is as indicated
  • Automatic paragraph justification levels
    • "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)
  • Paragraph termination definition effective for justification
    • " " โ€” non-blank line end terminates paragraph (blank space at line end continues paragraph)
    • "๏ฟฝ" โ€” empty line terminates paragraph

๐Ÿ–ฅ๏ธ Scrollbar

By default, mined displays a scrollbar at the right side. It may be used for position indication within the text and for relative or absolute positioning with the three mouse buttons. ๐Ÿ–ฑ๏ธ๐Ÿ–ฑ๏ธ๐Ÿ–ฑ๏ธ

In a UTF-8 terminal, mined uses Unicode character cell vertical eighths characters U+2581..U+2587 for a fine-grained scrollbar display. If your Unicode font doesn't include those block characters, you may switch to the cell-grained scrollbar with the -o1 option. font vibe check, bestie โœจ

๐ŸŽ€ Text position marker stack

On commands that jump away from the current position (HOP Mark, File Begin/End, Search, Search identifier definition, Search current character, Goto Line/%, Goto Next/Previous File), the current position is remembered in a position stack. The command ESC Enter goes backward, HOP ESC Enter forward in this "stack", even if this means switching the file being edited. ๐Ÿ’…

๐Ÿงš Structured editing support

๐ŸŒˆ HTML support: syntax highlighting and tag entry/matching

HTML tag entry: With the ESC H commands, opening and closing HTML tags can be entered or (with HOP) a marked area can be enclosed into HTML tags. ๐Ÿท๏ธ

Syntax highlighting: HTML tags and comments, attributes and values can be highlighted, or dimmed to set them back from the actual text contents; if mined detects a dark terminal background (works with xterm and mintty), it adds a highlighting background to improve the contrast. Other highlighting modes apply to HTML comments and JSP code. This option is activated if the file name suffix is one of .html, .htm, .xhtml, .shtml, .mhtml, .sgml, .xml, .eml, .xul, .xsd, .xsl, .xslt, .wsdl, .dtd; it can be toggled from the Options menu. Additional highlighting of embedded server-side scripting is activated if the file name suffix is one of .jsp, .php, .asp, .aspx. HTML/XML syntax highlighting can be enabled with option +H or using Preference configuration per file-type. iykyk โœจ

HTML tag matching: With the ESC ( or ESC ) command, mined searches for the opening / closing HTML tag corresponding to the current one. ๐Ÿ”Ž

Note: While you edit within a line and change its HTML ending status (by entering or deleting '<' or '>'), the display status of subsequent lines is not changed. (You may refresh the display with ESC ".".) ๐Ÿ˜ญ

Configuration hint: The colour used for displaying HTML tags can be configured with the environment variable MINEDHTML using an ANSI sequence, e.g. MINEDHTML=34 (the default). ๐ŸŽจ

๐Ÿ” Search structure match

With the ESC ( or ESC ) commands, mined searches for a matching end of various structures, like opening/closing HTML/XML tags (see above), matching parentheses or brackets, matching comments (/* */), matching conditional macros (#if...), mail messages (in a mailbox file), MIME attachments. See the ESC ( command in the command reference for details. ๐Ÿ“ฌ

๐Ÿงฉ Structure input

A structure template with opening and closing ends can be inserted with the structured input feature. HOP followed by one of {, (, [, < enters a corresponding bracket pair, HOP / enters a Javadoc comment frame. HOP - enters an underlining line matching the previous line. ๐Ÿ› ๏ธ

Visual structure input is supported by Auto indentation. ๐ŸŒธ

๐Ÿ™ˆ Password hiding

With the option -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. ๐Ÿ”’

By default (without any P option), password hiding is activated when editing a file whose file name starts with . (Unix "hidden" file convention). sneaky but make it safe ๐Ÿ’…

๐Ÿ‘‘ Virtual bold/underline stropping

With the option +ZZ, mined displays all-capital words in bold lower-case and supports their input using only a first capital letter, then small letters to input a word in all-upper-case. This is to support editing computer programs in Algol-like languages in their typical publication look. Use +Z_ for underline stropping, disable with -ZZ. Enabled by default if the filename ends with .a68. โœจ

๐Ÿงต Long line splitting

mined has an internal line length limit (> ca. 1024 characters). When opening a file, longer lines are split. This is handled transparently as virtual "none" line ends are used and indicated. When saving the file, lines will be joined again. ๐Ÿซถ

๐Ÿ’– Visible indication of line contents and display

Various options are available to indicate line control characters (Tab and line-feed) as well as shifted line display (of lines longer than the screen width). (So you can see how many dummy blank spaces there are before the line ends or how many superfluous blank spaces precede a Tab character.) ๐Ÿ‘€

Environment variables can be used to modify these indications. See Display layout for details.

Default indications and according configuration variables:

  • ๏ฟฝ / โŽ LF (Unix-type line end) โ€” customize indication with MINEDRET or MINEDUTFRET (may contain up to 3 characters to configure different appearance behind the line end)
  • ๏ฟฝ / โŽ CRLF (MSDOS-type two-character line end) โ€” (๏ฟฝ on black and white terminals); customize indication with MINEDDOSRET or MINEDUTFDOSRET
  • ๏ฟฝ / โŽ CR (Mac-type line end) โ€” (@ on black and white terminals); customize indication with MINEDMACRET or MINEDUTFMACRET; 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)
  • ๏ฟฝ โ†’NEWโ†’ NL (U+0085, ISO 8859/EBCDIC Next Line)
  • ๏ฟฝ / โŽ LS (U+2028, Unicode line separator)
  • ๏ฟฝ PS (U+2029, Unicode paragraph separator) โ€” customize indication with MINEDPARA or MINEDUTFPARA

These are the rest of the little display indications, bestie โ€” lowkey iconic how much detail there is ๐Ÿ’…:

  • ๏ฟฝ โ€” end of paragraph (if enabled by -p). Customize the indication with MINEDPARA or MINEDUTFPARA.
  • ๏ฟฝ โ€” no-break space (Unicode character U+00A0).
  • ๏ฟฝ โ€” line extending the end of the screen line (move cursor right to shift line display). Customize the indication with MINEDSHIFT or MINEDUTFSHIFT.
  • ๏ฟฝ โ€” line shifted out left of the screen line (move cursor left to shift line display back). Customize the indication with MINEDSHIFT or MINEDUTFSHIFT.
  • ๏ฟฝ โ€” position spanned by Tab character. Customize the indication with MINEDTAB or MINEDUTFTAB (may contain up to 3 characters to configure different appearance within the Tab span).

Configuration: Display colour of the indications is by default red or a dimmed foreground colour; this can be changed with the environment variable MINEDDIM, display colour for Unicode line end indications and other special (esp. invalid) character indications with MINEDSPECIAL. Their values should be the numeric part of an ANSI terminal control sequence, e.g. 31 for red, "33;44" for yellow text on blue background. MINEDDIM can also be set to an integer percentage value (e.g. MINEDIM="50%") to have mined apply dim colour to the indications; the colour value is computed from the current foreground and background colours (if the terminal supports their detection). For more details and recommended settings see the example script file profile.mined in the Mined runtime support library. Default values are compiled in and can be overridden by setting the variables to empty values.

Note: With the -F option, mined limits usage of special characters for line indication and suppresses the interpretation of the MINEDUTF* environment variables.

โœจ Function key help bars โœจ

For quick reference of functions attached to function keys, modified function keys, and other modified keys (as used for accent prefix functions), a number of help bars can be displayed in the bottom line. F1 followed by another F1, optionally modified by a combination of Control/Shift/Alt, displays a help line with function attachments to the respectively modified function keys; F1 followed by Ctrl-1/Alt-1/Alt-Ctrl-1 or Control with a punctuation key (e.g. Ctrl-,) displays a help line for the respective accent prefix functions attached. See the F1 help bars command reference for details.

Menu borders are displayed using Unicode Box Drawing characters in a UTF-8 terminal, using VT100-mode graphics characters if they are detected to be available, or using ASCII graphics otherwise.

Configuration hint: The menu style option -Q is available to configure your style preference; see also Terminal interworking problems for configuration hints to deal terminal-related graphics display trouble. Alternatively, the option -f reduces font assumptions and adjusts usage of special characters accordingly.

In addition to round or rectangular corners, also fancy item selection display style can be selected (-Q).

With a non-UTF-8 terminal, if your system's termcap/terminfo database does not indicate the VT100 graphics capability for the terminal you use but you know (or want to try if) your terminal has that capability, use of graphical borders can be enforced with the -Qv command line option.

Configuration hint: The colour of menu borders can be changed with the environment variable MINEDBORDER. The marker of selected items in flag menus can be changed with the environment variable MINEDMENUMARKER.

โ†’NEWโ†’ The apperance of the menu background and borders can be configured in the runtime configuration file $HOME/.minedrc.

๐ŸŒ Language support ๐Ÿ’ฌ

Most of the information in this chapter is redundant. It collects language-specific features described in the other chapters in a more technical context, here assorted by languages / scripts for more convenient quick reference.

Language-specific typographic quotation marks are supported by the Smart quotes feature. See Quotation Marks Styles on the mined web site for a listing of locale-specific styles.

๐ŸŒธ Latin-script languages ๐ŸŒธ

๐Ÿ”ค Character sets ๐Ÿ”ค

In addition to Unicode, mined supports Latin-1 (ISO 8859-1), Latin-9 (ISO 8859-15), Mac-Roman, Windows (CP1252) and DOS (CP437, CP850) Western character sets, as well as further ISO character sets for Central European (Latin-2, ISO 8859-2), South European (Latin-3, ISO 8859-3), Turkish (Latin-5, ISO 8859-9), Nordic (Latin-6, ISO 8859-10), Baltic (Latin-7, ISO 8859-13), Celtic (Latin-8, ISO 8859-14), Romanian (Latin-10, ISO 8859-16), โ†’NEWโ†’ EBCDIC (CP1047), โ†’NEWโ†’ and ISO 6937. To view and edit a file in one of these encodings, select it from the Encoding menu (section "8 Bit" for Western, or submenu "more Latin"), or use the respective command line parameter. See Character encoding flags for details.

Terminal: If your terminal runs any of these encodings, mined can detect this by proper setting of environment variables (LC_* or LANG, and TERM). See Terminal environment for details.

โŒจ๏ธ Character input support โŒจ๏ธ

For input of accented characters, mined provides an extensive set of accent prefix functions, covering Western accents as well as

  • Macron (Latvian, Lithuanian, Polynesian languages)
  • Breve (Romanian, Turkish)
  • Dot above (Lithuanian, Polish)
  • Ogonek (Lithuanian, Polish)
  • Caron/H๏ฟฝฤek (Croatian, Czech, Lithuanian, Latvian, Estonian, Slovenian, Slovak)
  • Stroke (Croatian, Maltese, Polish, Vietnamese)
  • and others

For other characters and ligatures, mined provides mnemonic input. See Character input support for more details.

๐Ÿ” Language-specific mnemonic conversion support ๐Ÿ”

The generic mnemonic transformation command ESC _ (which transforms a mnemonic transcription in the text into its accented or ligature character) has a few national variants, using keys available on the respective keyboards as commands:

  • German: ESC ๏ฟฝ etc. transforms ae to ๏ฟฝ, oe to ๏ฟฝ
  • French: ESC ๏ฟฝ etc. transforms ae to ๏ฟฝ, oe to oe ligature
  • Scandinavian: ESC ๏ฟฝ etc. transforms ae to ๏ฟฝ, oe to ๏ฟฝ
  • โ†’NEWโ†’ Italian: ESC ๏ฟฝ etc. transforms 'e or ๏ฟฝe to ๏ฟฝ rather than ๏ฟฝ etc.
  • โ†’NEWโ†’ East European> ESC < accented letter typical on East European keyboard > (like l with stroke, u with ring, o with double acute, s with caron, etc) transforms ,e to e with ogonek (rather than cedilla) etc., and -d to d with stroke

(See mnemonic character substitution commands in the Command reference for details.)

๐Ÿ”  Language-specific case conversion ๐Ÿ” 

(The following rules apply if the respective language is indicated by the language tag as extracted from one of the environment variables LANGUAGE, TEXTLANG, LC_ALL, LC_CTYPE, LANG.)

  • Lithuanian: (If language tag begins with "lt") Proper case conversion of accented i with retained i dot.
  • Turkish, Azeri, Tatar, Bashkir: (If language tag begins with "tr" or "az" โ†’NEWโ†’ or "crh" or "tt" or "ba") Proper case conversion of i<->I with dot above / dotless i<->I.
  • Dutch: (If language tag begins with "nl") Title case conversion with Shift-F3 supports "IJ" pseudo ligature like in "IJsselmeer".

๐Ÿงš Esperanto ๐Ÿงš

๐Ÿ”ค Character sets ๐Ÿ”ค

In addition to Unicode, mined supports the Latin-3 character set (ISO 8859-3), and the DOS codepage CP853 (especially as terminal encoding). To view and edit a file in Latin-3 encoding, select it from the Encoding menu (submenu "more Latin"), or use the command line parameter -E3. To tell mined it runs a CP853 DOS setting, use a LC_CTYPE variable setting ((.CP853)) or the option +E=CP853. See Character encoding flags for details.

Terminal: If your terminal runs this encoding, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

โŒจ๏ธ Input method โŒจ๏ธ

Mined supports a built-in input method for Esperanto, using the "x-system", plus "Sm" for the Spesmilo sign. Select it from the Input method menu.

โœจ Accented character input support โœจ

Instead of the input method, also the following accent prefix functions can be used:

  • Ctrl-F6
  • Ctrl-^ โ€” circumflex
  • Alt-Shift-F5
  • Ctrl-( โ€” breve

๐ŸŒบ Hawai'ian ๐ŸŒบ

โœจ Accented character and 'okina input support โœจ

The following shortcuts and accent prefix functions can be used:

  • HOP ` (grave accent) โ€” glottal stop / 'okina (U+02BB)
  • Alt-Ctrl-F6
  • Ctrl-- (Ctrl-minus) โ€” macron (long vowel)
Note: In smart quotes mode, the grave accent (or backquote) ` alone enters a glottal stop as well.

โ„๏ธ Russian, Ukrainian, other Cyrillic-script languages โ„๏ธ

๐Ÿ”ค Character sets ๐Ÿ”ค

In addition to Unicode, mined supports ISO Cyrillic (ISO 8859-5), Windows Cyrillic (CP1251), and KOI8-RU which is a convenient merge of KOI8-R (Russian) and KOI8-U (Ukrainian) (which are also supported separately but not included in the menu), โ†’NEWโ†’ and DOS Ukrainian (CP1125 and CP1131). To view and edit a file in one of these encodings, select it from the Encoding menu ("Cyrillic" or submenu "more NE Eurasian"), or use the respective command line parameter. See Character encoding flags for details.

Terminal: If your terminal runs any of these encodings, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

โŒจ๏ธ Input method โŒจ๏ธ

Mined supports a built-in input method for Cyrillic. Select it from the Input method menu.

โœจ Accented character input support โœจ

In combination with a Cyrillic input method or keyboard, mined provides accent prefix support for Cyrillic accented letters. Accent prefix functions for Latin letters are reused for Cyrillic accents, see the following table:

  • F5
  • Ctrl-: โ€” diaeresis
  • Alt-Ctrl-F6
  • Ctrl-- โ€” descender / macron
  • Alt-F5
  • Ctrl-/ โ€” stroke
  • Ctrl-& โ€” hook
  • Ctrl-- Ctrl-& โ€” middle hook
  • Alt-Shift-F5
  • Ctrl-( โ€” breve
  • Ctrl-; โ€” tail / tick / upturn
  • F6
  • Ctrl-'
  • Ctrl-๏ฟฝ โ€” vertical stroke
  • Shift-F6
  • Ctrl-` โ€” grave
  • Shift-F5
  • Ctrl-~ โ€” titlo
  • acute acute
    • double acute
  • grave grave
    • double grave

See Character input support for more details.

๐ŸŽจ Script highlighting ๐ŸŽจ

To distinguish some Cyrillic letters from Latin look-alikes, Cyrillic is by default displayed with colour highlighting.

๐Ÿ‡น๐Ÿ‡ฏ Tadjik

Character sets

okay so besides Unicode, mined also speaks KOI8-T. to view + edit a file in this Tadjik encoding, just grab it from the Encoding menu (submenu "more NE Eurasian") or use the command line parameter -E:Tj. See Character encoding flags for the deets โœจ

Terminal check bestie: if your terminal runs this encoding, make sure you actually say so properly with an environment variable (LC_* / LANG). See Terminal environment for details ๐Ÿซถ

Input method

mined's got a built-in input method for Cyrillic โ€” pick it from the Input method menu ๐Ÿ‘‘

Accented character input support

see above for Cyrillic accented input support ๐Ÿ’…

Script highlighting

Cyrillic is by default displayed with colour highlighting ๐ŸŒˆ


๐Ÿ‡ฐ๐Ÿ‡ฟ Kazakh

Character sets

besides Unicode, mined supports PT154. to view + edit a file in this Kazakh encoding, select it from the Encoding menu (submenu "more NE Eurasian"), or use the command line parameter -E:Kz. See Character encoding flags for details โœจ

Terminal: if your terminal runs this encoding, indicate it properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

built-in input method for Kazakh โ€” it's right there in the Input method menu ๐Ÿ˜Œ

Accented character input support

see above for Cyrillic accented input support ๐Ÿ’–

Script highlighting

Cyrillic is by default displayed with colour highlighting ๐ŸŒˆ


๐Ÿ‡ฌ๐Ÿ‡ช Georgian

Character sets

besides Unicode, mined supports Georgian-PS. to view + edit a file in this encoding, select it from the Encoding menu (submenu "more NE Eurasian"), or use the command line parameter -E:GP. See Character encoding flags for details โœจ

Terminal: if your terminal runs this encoding, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details ๐Ÿซถ


๐Ÿ‡ฆ๐Ÿ‡ฒ Armenian

Character sets

โ†’NEWโ†’ so besides Unicode, mined now supports ARMSCII ๐Ÿคฉ to view + edit a file in this encoding, select it from the Encoding menu (submenu "more NE Eurasian", tell me if that's not suitable), or use the command line parameter -E:AR. See Character encoding flags for details โœจ

Terminal: if your terminal runs this encoding, indicate it properly with an environment variable (LC_* / LANG). See Terminal environment for details.


๐Ÿ‡ฌ๐Ÿ‡ท Greek

Character sets

besides Unicode, mined supports ISO Greek (ISO 8859-7). to view + edit a file in this encoding, select it from the Encoding menu (submenu "Greek/Semitic"), or use the command line parameter -E:I7. See Character encoding flags for details โœจ

Terminal: if your terminal runs this encoding, indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

yep, there's a built-in input method for Greek โ€” it lives in the Input method menu ๐Ÿ’…

Accented character input support

so when you pair mined with a Greek input method or keyboard, you get accent prefix support for both monotonic Greek and polytonic Greek ๐Ÿ˜ค

Monotonic Greek only uses one accent โ€” the tonos, which looks like an acute โ€” and you enter it with the F6 or Ctrl-' prefix function.

Polytonic Greek uses โ€” among many others โ€” the oxia accent, which is nowadays considered identical and looks like the monotonic tonos. BUT here's the tea: for historic reasons there are literally two sets of Greek accented letters with this accent in Unicode โ€” one with tonos and one with oxia ๐Ÿซ  while this may be considered a design flaw of Unicode, both kinds of characters genuinely exist and mined supports both accents. which one you use is totally up to you, bestie.

Note, e.g., that:

F6 < alpha >

enters the Greek letter alpha with tonos, and

Ctrl-F6 < alpha >

enters the Greek letter alpha with oxia.

Likewise, with mnemonic input:

^V ' < alpha >   (using the apostrophe key)

enters the Greek letter alpha with tonos, and

^V ยด < alpha >   (using the acute accent key)

In these examples, < alpha > indicates the Greek letter alpha, which you can e.g. enter by selecting the Greek input method and typing the a key ๐Ÿ‘‘

Accent prefix functions for Latin letters get reused for Greek accents โ€” here's the table, bookmark it fr:

  • F5 / Ctrl-: / Ctrl-" โ€” dialytika
  • Shift-F5 / Ctrl-~ โ€” perispomeni
  • Ctrl-F5 / Ctrl-, โ€” iota (ypogegrammeni)
  • Ctrl-Shift-F5 / Ctrl-; โ€” prosgegrammeni
  • Alt-Shift-F5 / Ctrl-( โ€” vrachy
  • F6 / Ctrl-' (Ctrl-apostrophe) โ€” tonos
  • Ctrl-F6 / Ctrl-ยด (Ctrl-acute) / Ctrl-^ โ€” oxia
  • Shift-F6 / **`Ctrl-`` (Ctrl-grave) โ€” varia
  • Alt-F6 / Ctrl-< โ€” psili
  • Alt-Shift-F6 / Ctrl-. โ€” dasia
  • Ctrl-Shift-F6 โ€” macron
  • Alt-6 โ€” psili and oxia
  • Ctrl-Alt-6 โ€” dasia and oxia
  • Alt-7 โ€” psili and varia
  • Ctrl-Alt-7 โ€” dasia and varia
  • Alt-8 โ€” psili and perispomeni
  • Ctrl-Alt-8 โ€” dasia and perispomeni

For polytonic Greek, you can combine 2 or 3 accents by applying the respective accent prefix functions in sequence ๐ŸŒ€ and for convenience, the most frequent combos of 2 accents are also available as dedicated accent prefix keys, as listed above. Also, modified Ctrl-/Alt-/Alt-Ctrl-digit keys are used for polytonic Greek accent prefix functions. See Character input support for more details โœจ

Script highlighting

to tell some Greek letters apart from their Latin look-alikes, Greek is by default displayed with colour highlighting ๐Ÿ‘€๐Ÿ’–

Script-specific case conversion

case conversion of final sigma is handled properly, no cap ๐Ÿซถ


๐Ÿ‡ช๐Ÿ‡น Amharic

Input method

mined's got two built-in input methods for Amharic, bestie:

  • one's called "Ethiopic" (source: yudit)
  • the other's called "Amharic" and was generated from Unicode character names (preferable according to user feedback) โœจ

pick your fave from the Input method menu ๐Ÿ‘‘


๐Ÿ‡ธ๐Ÿ‡ฆ Arabic

Character sets

besides Unicode, mined supports ISO Arabic (ISO 8859-6), MacArabic and DOS Arabic (CP720). to view + edit a file in one of these encodings, select it from the Encoding menu (submenu "Greek/Semitic"), or use the respective command line parameter -E:I6 or -EA. See Character encoding flags for details ๐Ÿ’…

Terminal: if your terminal runs ISO Arabic, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

built-in input method for Arabic โ€” it's in the Input method menu ๐ŸŒธ

Accented character input support

not yet implemented ๐Ÿ˜ญ Tell me if you have a proposal or preference for assignment of accent prefix functions to the keyboard ๐Ÿซถ

Bidi support

mined has implicit primitive support for visual right-to-left input โ€” which is however not the preferred storage method, since complete right-to-left text should be stored in logical order โš ๏ธ

Mined auto-detects and cooperates with a bidi terminal (mintty, mlterm), in which case visual right-to-left input is disabled.

a full context-aware bidi display and editing technique would still have to be integrated into mined. Tell me if you are interested ๐Ÿ‘€


๐Ÿ‡ฎ๐Ÿ‡ฑ Hebrew

Character sets

besides Unicode, mined supports ISO Hebrew (ISO 8859-8) and Windows Hebrew (CP1255). to view + edit a file in one of these encodings, select it from the Encoding menu (submenu "Greek/Semitic"), or use the respective command line parameter -E:I8 or -EE. See Character encoding flags for details โœจ

Terminal: if your terminal runs this encoding, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

built-in input method for Hebrew โ€” Input method menu, you know the drill ๐Ÿ’…

Accented character input support

not yet implemented ๐Ÿ˜ญ Tell me if you have a proposal or preference for assignment of accent prefix functions to the keyboard ๐Ÿซถ

Bidi support

same situation as Arabic, bestie: implicit primitive support for visual right-to-left input, which is however not the preferred storage method, since complete right-to-left text should be stored in logical order โš ๏ธ

Mined auto-detects and cooperates with a bidi terminal (mintty, mlterm), in which case visual right-to-left input is disabled.

A full context-aware bidi display and editing technique would still have to be integrated into mined. Tell me if you are interested ๐Ÿ‘€

Smart replacement

fun special case ๐ŸŽ€ as a special case of smart dash input replacement (enabled together with smart quotes), mined inserts Hebrew Maqaf as a dash in the context of Hebrew letters. iconic tbh โœจ


๐Ÿ‡จ๐Ÿ‡ณ Chinese

Character sets

besides Unicode, mined supports Big5 with HKSCS extension (extending CP950), GB18030 (extending CP936, extending GKB, including EUC-CN), and CNS (EUC-TW) multi-byte character sets ๐Ÿคฏ to view + edit a file in one of these encodings, select it from the Encoding menu (section "Chinese"), or use the respective command line parameter -EB or -EG or -EC. See Character encoding flags for details โœจ

Auto-detection: Big5 and GB18030 text encoding are also auto-detected when opening a file (with a certain success rate ๐Ÿ‘€). Set the environment variable MINEDDETECT="BG" to constrain auto-detection to Big5 and GB18030 encodings. See Mined configuration for details.

Terminal: Mined supports native CJK terminals โ€” make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal encodings support for details on detection and handling of CJK terminal features ๐Ÿซถ

Input method

mined provides these built-in input methods for Chinese, bestie:

  • Pinyin
  • Cangjie
  • WuBi
  • 4Corner
  • Boshiamy
  • plus special support for a Radical/Stroke lookup input method โœจ

select the input method of your preference from the Input method menu ๐Ÿ‘‘

Han character information display

mined provides special support for display of Han character information according to the Unihan database ๐Ÿ”ฅ it comprises semantic information and Mandarin, Cantonese, Hanyu Pinlu, Hanyu Pinyin, XHC Hanyu pinyin, and Tang dynasty pronunciation. the way that's so much info fr ๐Ÿ˜ญ

Accented character input support

for Latin-based Pinyin transcription of Chinese, the usual accent prefix functionality is available ๐ŸŽ€

Japanese ๐Ÿ‡ฏ๐Ÿ‡ต

Character sets

So besides Unicode, mined has your back with JIS character sets in EUC-JP or Shift_JIS (CP932) multi-byte encoding โ†’NEWโ†’ plus EUC-JIS-2004 (X 0213) or Shift_JIS-2004 (X 0213) encoding. To view and edit a file in one of these encodings, pick it from the Encoding menu (section "Japanese"), or just use the matching command line parameter -EJ or -ES. The deets live in Character encoding flags.

Auto-detection: EUC-JP/-JIS and Shift_JIS text encodings also get auto-detected when you open a file (with a certain success rate, no cap, it's not perfect ๐Ÿ’€). Set the environment variable MINEDDETECT="JS" to constrain auto-detection to EUC-JP and Shift_JIS encodings, โ†’NEWโ†’ or MINEDDETECT="Xx" to constrain auto-detection to EUC-JIS X 0213 and Shift_JIS X 0213 encodings. More in Mined configuration.

Terminal: mined supports native CJK terminals โ€” just make sure you actually indicate this properly with an environment variable (LC_* / LANG). See Terminal encodings support for how detection and handling of CJK terminal features works.

Input method

Mined ships these built-in input methods for Japanese: Hiragana, Katakana, TUT roma, and special support for a Radical/Stroke lookup input method. Pick your fave from the Input method menu โœจ

Mined does not, however, implement advanced Japanese input methods that provide semantics-based Hanja input. For those you'll have to set up or use an external input method with your operating environment, which then gets handled by the terminal โ€” and the terminal delivers ready-composed characters transparently to the application. Teamwork ๐Ÿ’…

Han character information display

Mined has special support for display of Han character information according to the Unihan database. It comprises semantic information and Japanese and Sino-Japanese pronunciation. Iconic.

Accented character input support

For Latin-based Romaji transcription of Japanese, the usual accent prefix functionality is available. ๐ŸŽ€


Korean ๐Ÿ‡ฐ๐Ÿ‡ท

Character sets

Besides Unicode, mined supports UHC (CP949, including EUC-KR) and Johab multi-byte character sets. To view and edit a file in one of these encodings, select it from the Encoding menu (section "Korean"), or use the respective command line parameter -EK or -EH. See Character encoding flags for details.

Auto-detection: UHC text encoding is also auto-detected when opening a file (with a certain success rate). Set the environment variable MINEDDETECT="K" to constrain auto-detection to UHC encoding. See Mined configuration for details.

Terminal: mined supports native CJK terminals; make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal encodings support for details on detection and handling of CJK terminal features.

Input method

Mined provides the following built-in input methods for Korean: Hangul, Hanja, and special support for a Radical/Stroke lookup input method. Select the input method of your preference from the Input method menu. ๐Ÿซถ

Han character information display

Mined provides special support for display of Han character information according to the Unihan database. It comprises semantic information and Hangul and Korean pronunciation. ๐ŸŒธ


Vietnamese ๐Ÿ‡ป๐Ÿ‡ณ

Character sets

In addition to Unicode, mined supports VISCII, TCVN and โ†’NEWโ†’ Windows Vietnamese (CP1258) character sets. To view and edit a file in one of these encodings, select it from the Encoding menu (section "Vietnamese"), or use the respective command line parameter -EV or -EN. See Character encoding flags for details.

Auto-detection: VISCII text encoding is also auto-detected when opening a file (with a certain success rate). Set the environment variable MINEDDETECT="V" to constrain auto-detection to VISCII encoding. See Mined configuration for details.

Terminal: If your terminal runs this encoding, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

Mined provides the following built-in input methods for Vietnamese: VNI and VIQR. Select the input method of your preference from the Input method menu.

It may be more convenient, though, to use the extensive accented character input support provided by mined together with a normal Latin-based keyboard (so, without a keyboard-mapping input method) โ€” see Character input support for Vietnamese below. ๐Ÿ‘€

Character input support

Mined provides input support for multiple accented characters as used in Vietnamese, plus convenient accent prefix functions for combinations of two Vietnamese accents. Modified Ctrl-/Alt-/Alt-Ctrl-digit keys are used for Vietnamese accent prefix functions. Alternatively, mnemonic character input can be used. See Accented and mnemonic input support for details, and see below for some introducing comments.

An accent prefix can either be applied to the plain Latin base letter, or to a precomposed Vietnamese letter which already has one of the accents. These are:

  • U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
  • U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
  • U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX
  • U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX
  • U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
  • U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
  • U+0102 LATIN CAPITAL LETTER A WITH BREVE
  • U+0103 LATIN SMALL LETTER A WITH BREVE
  • U+01A0 LATIN CAPITAL LETTER O WITH HORN
  • U+01A1 LATIN SMALL LETTER O WITH HORN
  • U+01AF LATIN CAPITAL LETTER U WITH HORN
  • U+01B0 LATIN SMALL LETTER U WITH HORN

Examples: Suppose your keyboard is mapped to have Vietnamese characters like A with circumflex available. Then:

^V ร‚ ' (Ctrl-V A-circumflex apostrophe)
       enters the composite character U+1EA4 (A with circumflex and
       acute)

^V ร” ~ (Ctrl-V O-circumflex tilde)
       enters the composite character U+1ED6 (O with circumflex and
       tilde)

Ctrl-6 A
       enters U+00C2 (A with circumflex)

Alt-4 A
       enters U+1EAA (A with circumflex and tilde)

Ctrl-Alt-3 A
       enters U+1EB2 (A with breve and hook above)

Ctrl-Alt-3 O
       enters U+1EDE (O with horn and hook above)
Note: Using composite base characters in mined character mnemonics or accent prefix combinations as just described also works in non-UTF-8 text encoding mode (e.g. in VISCII or TCVN encoding). ๐Ÿ’œ

Thai ๐Ÿ‡น๐Ÿ‡ญ

Character sets

In addition to Unicode, mined supports the TIS-620 character set (with CP874 extensions). To view and edit a file in this encoding, select it from the Encoding menu (section "Thai"), or use the respective command line parameter -ET. See Character encoding flags for details.

Terminal: If your terminal runs this encoding, make sure to indicate this properly with an environment variable (LC_* / LANG). See Terminal environment for details.

Input method

Mined provides a built-in Thai input method. Select the input method from the Input method menu. ๐Ÿฆ‹

Accented character input support

Not yet implemented. Tell me if you have a proposal or preference for assignment of accent prefix functions to the keyboard. (yes this is literally what it says, they're asking for real ๐Ÿ™ˆ)


Character handling support

This chapter describes mined features for character manipulation and display of characters and character properties. Unicode and CJK specific features are described in the respective chapters. Character input support is described separately in the subsequent chapter. Let's go ๐Ÿ’…

Script highlighting

It may be desirable to distinguish characters in different script by displaying their glyphs in different colours. (This especially allows to distinguish easier between similar glyphs as they occur in Latin/Greek/Cyrillic scripts.)

Script highlighting is currently pre-configured for Greek and Cyrillic. It uses the terminal's 256-colour mode if available. ๐ŸŒˆ

The scripts to highlight and the colour values to use can be configured at compile-time. See Mined configuration below.

Combining characters

When editing text in Unicode or any encoding that contains combining characters, mined supports display and editing of combining and combined characters.

(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 Quick Options (Mode indication) flags area (right part of the top screen line), or by the menu entry Options - Combined display; separated display mode can also be selected by the command line option -c.

Combined display and editing mode (Combining display flag โ—) Combined characters are displayed as intended (i.e., combined).

  • Micro movement into combined characters:
    • The cursor can be moved into a combined character with Ctrl-cursor-left and Ctrl-cursor-right, or ^V cursor-left and ^V cursor-right.
    • You can determine the exact position of the cursor if permanent character info is switched on (by HOP ESC u or with HOP "Toggle Char info" in the Options menu).
  • Partially editing combined characters:
    • If the cursor is on a combined character, delete next character (e.g. Del on small keypad) will delete the whole combined character, with all combining accents.
    • If the cursor is on a combined character, Ctrl-Del will delete only the base character, leaving combining accents which may then be combined with the previous character.
    • If the cursor is within a combined character, delete next character will delete the current combining accent only.
    • Smart backspacing: Ctrl-Backarrow or F5 Backarrow ("Delete single") behind or within a combined character will only delete the rightmost combining accent (preceding the cursor position) while Backarrow would delete the whole combined character.
Note: โ†’NEWโ†’ Configuration option plain_BS (command line option +Bp) switches the Backarrow key from smart backspacing to plain backspacing, i.e. no auto-undent and only delete one combining character of a combined character. Use Shift-Control-Backarrow to perform smart backspacing then. ๐Ÿ˜ญ
  • You can also position the cursor as described above and use copy-and-paste operations.
Note: Ctrl-cursor-left and Ctrl-cursor-right only work if these keys are configured to emit distinguished escape sequences with the Control key held down. With xterm or mintty, this works by default. With rxvt, use the small keypad cursor keys, or enable Control on the right keypad with the sample configuration file 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. Ctrl-Backarrow can also be configured to work with xterm but doesn't appear to work with rxvt or mlterm, use F5 Backarrow instead.

๐Ÿฆ‹ Separated display and editing mode (Combining display flag `)

Combined characters are separated into base character and combining character(s) for display and editing. Combining characters are indicated with coloured background.

  • In separated display mode, all cursor and text modification operations work on the combining parts as displayed.

Input support: for input of Unicode combining characters, see Combining character input below.

Note: Unicode combining characters (according to the most recent version of Unicode known to mined) that are not handled as combining characters by the terminal (which might implement an older version of Unicode) are always displayed like in separated display mode.
Note: Isolated combining characters, i.e. those appearing at a line beginning or after a TAB character, are always displayed like in separated display mode.

๐Ÿ’– Character information display ๐Ÿ’–

The command ESC u displays character encoding information in the bottom status line (conforming to ISO 14755); it displays the character code in the selected encoding (UTF-8 byte sequence in UTF-8 mode) and the ISO-10646 (Unicode) value of the current character, as well as Unicode script range and character category, width, and combining information. The Unicode value is displayed with 4 hexadecimal digits if the character is in the Unicode BMP (Basic Multilingual Plane, 16 bit), with 6 digits if it is a Unicode character outside of the BMP, and 8 digits if it is an ISO-10646 character outside of the Unicode range. The information displayed also indicates all kinds of encoding irregularities. For the Unicode data version used for character properties see the mined change log.

Permanent display of character information is toggled with HOP ESC u or by selecting "Char info" in the Info menu (or with HOP "Toggle Char info" in the Options menu).

In the Info menu, attributes that are shown with the character information can be selected: Unicode script name, Unicode character name, โ†’NEWโ†’ Unicode named sequence, Unicode character decomposition, list of input mnemonics. Note that Unicode named sequence information only applies to a small number of named sequences, otherwise normal character information is shown instead; also, it is only shown in combined display mode, so normal information can be quickly toggled by switching to separated display mode (middle-click on ๏ฟฝ flag).

Character information display can be selected with the +?c command line parameter (see parameter description for further options). To preselect continuous character information display, append +?c to the environment variable MINEDOPT or enable option "display_charinfo" in the runtime configuration file $HOME/.minedrc.

๐ŸŒธ Han character information display ๐ŸŒธ

CJK-specific character information (semantic and pronunciation hints) is described below in section Han character information display.

โœจ Character conversion features โœจ

๐Ÿ’… Case conversion

The case conversion functions (ESC C, HOP ESC C, F11, HOP F11, Shift-F3) cover the full Unicode range. They also handle special cases like Greek final sigma, optionally Turkish "i", case mapping to multiple characters, and Lithuanian special conditions. Japanese characters are toggled between Hiragana and Katakana by the same functions.

Shift-F3 cycles casing of a word between all small, title case (beginning capital), and all capitals. It handles title casing, using Unicode title case characters for the first character when appropriate. For Japanese script, it toggles the word between Hiragana and Katakana. The case mapping is based on the most recent Unicode version compiled into mined (for the actual version see the mined change log and the Options menu About command). It is applicable in all text encodings.

๐ŸŽ€ Line end type conversion

In the Options menu, a submenu "Lineend type..." offers functions to convert the line end of the current line to LF or CRLF, or to convert the line end type of all lines that do not have a special line end to LF or CRLF.

๐Ÿฆ‹ Numeric conversion

Commands are available to insert characters corresponding to a hexadecimal character code or hexadecimal/octal/decimal Unicode value contained in the text, to insert a respective value corresponding to the current character, or to toggle the preceding character and its hexadecimal Unicode value (Alt-x). For details, see the section Code conversion in the Command reference.

๐ŸŒˆ Numeric entity (HTML/URL) conversion

HTML numeric character entities (e.g. &#x40; or &#64; for @) or URL escape notation (e.g. %20 for space, %C3%86 for ร†) can be converted into unescaped characters. Use one of the Mnemonic character substitution commands (ESC _ or national variants) described below.

๐Ÿ“ Mnemonic conversion

A character mnemonic at the cursor position can be replaced with its associated character. Use one of the Mnemonic character substitution commands (ESC _ or national variants) described below.

๐Ÿ”ฅ Encoding conversion support

A special feature offers interactive conversion to or from Unicode character encoding, see Encoding conversion support in chapter Unicode support below.

๐Ÿ‘‘ Unicode Copy/Paste buffer

The Copy/Paste buffer can be operated in Unicode mode in which case it converts between text edited in different character encodings. See Unicode Copy/Paste buffer conversion below.

๐Ÿ’œ Smart quotes ๐Ÿ’œ

In Smart quotes mode, straight (double or single) quote characters " or ' are automatically substituted with an opening or closing typographic quotation mark, depending on the text context, or an apostrophe where appropriate. Also, an acute accent key enters a typographic apostrophe. โ†’NEWโ†’ Alt-" or Alt-' enter the respective quotation marks of the previous or standby style (see below).

Quote marks style selection:

  • Select the quotation marks style to be applied from the Smart Quotes selection menu (open with ESC Q or Alt-Q or right-click on the smart quotes indication in the flags area in the top screen line).
  • To toggle between the current and the previous smart quotes style, middle-click or double-click the smart quotes flag or select "standby" from the menu.
  • To select the smart quotes style suitable for the current locale, select "by locale" from the menu. This is also achieved with the configuration option smart_quotes or the command line option -q.

Quotation marks style can be preselected by either of the mechanisms described below.

The smart quotes left/right selection algorithm considers both the text context and the state (whether an open quote was inserted before) to automatically support smart quotes also in CJK text, and to try to distinguish an apostrophe from a quote mark. At a line beginning, always a left (opening) quotation mark is chosen, supporting the habit in some languages to repeat opening quote marks for each new paragraph inside a quotation. French quotation marks spacing is automatically applied (using no-break space U+00A0) if French style has been selected from the menu or by locale.

A typographic apostrophe can also be inserted with HOP ' (^G ') or with HOP ยด (acute accent), regardless of smart quotes mode. In smart quotes mode, a typographic apostrophe is also inserted on input of ยด (acute accent).

Straight quotes or accent marks (", ', `, ยด) can be inserted with mnemonic compose pairs (^V ^ ", ^V ^ ', ^V ^ ` , ^V ^ ยด, or ^V"#, ^V'#, ^V`#, ^Vยด# respectively).

Smart quotes are applicable in all text encodings provided the desired quote marks are contained in the selected encoding.

When a file is loaded, mined tries to determine the applicable quotation marks style in two ways: With file position memory (see File info: Memory of file position and editing style parameters above), mined also remembers the last selected smart quotes mode for the file. If that information is not available, mined auto-detects existing quotation marks in the file and adjusts its smart quotes mode accordingly. The option -q overrides this detection.

With command-line option -q alone, quotation marks style is derived from locale information (environment variables LANGUAGE, TEXTLANG, LC_ALL, LC_CTYPE, LANG), or from a locale value given with the option as -q=locale. For some languages, two styles are predefined, using the primary style as active smart quotes style, and the secondary or alternate style as standby style, for quick toggling with a middle mouse click on the Quotes flag (or using the standby entry from the Quote marks menu). The active quote marks style can also be derived explicitly from the locale with the Quotes menu option "by locale". Option +q exchanges primary and alternate quotation marks style, setting the alternate style active. Without an option -q, the primary locale-derived quote marks style is always set as standby style to be quickly available.

Note: Language-dependent quotations marks styles are determined using the compile-time configuration file quotes.cfg. See Quotation Marks Styles on the mined web site for a listing.
Note: Smart quotes style can also be preselected giving the desired quotation marks directly, either as command line option like -q="โ€œโ€" or with the environment variable MINEDQUOTES (see under Environment configuration hints below); this overrides both auto-detection and the preference saved with the cursor position.

๐ŸŒŸ Smart text replacements: apostrophe, smart dashes, arrows and glottal stop

If smart quotes are active, some other smart input text replacements are applied to respective characters being entered. (Replacement of subsequent character input sequences is suppressed during a repeat command entering multiple characters.)

  • -- โ€” if preceded by a Space character: en dash (U+2013); otherwise: em dash (U+2014)

Continuing the smart-replacement list, bestie โ€” these are literal, no cap:

  • - or -TAB โ€” โ†’NEWโ†’ if leading a line (only white space before): en dash (U+2013)
  • - โ€” โ†’NEWโ†’ if embedded in spaces: minus sign (U+2212)
  • - โ€” 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)
  • ๏ฟฝ โ€” apostrophe (U+2019 right single quotation mark)
  • ` โ€” glottal stop (U+02BB modifier letter turned comma)
Note: โ†’NEWโ†’ mined smartly avoids inappropriate placement of smart replacements as well as double spaces by redundant combination of smart spaces and explicitly entered spaces, so you can seamlessly type either "bonjour" or " bonjour " to enter ๏ฟฝ bonjour ๏ฟฝ with French quotes, or a -- b to enter an en dash although a space is initially inserted after it. ๐Ÿ’–

๐ŸŒˆ Character input support ๐ŸŒˆ

Some character input support features support international scripts (especially with Keyboard Mapping and Input Methods), others mainly address composite characters. For the latter, it is useful to explain a few notions:

  • Combining character: A character (usually in Unicode) that is defined to combine with the previous character into a combined character, to be displayed as a single glyph (visual unit).
  • Combined character: The glyph combination of a Unicode character (base character) with one or more Unicode combining characters.
  • Composed character (or composite character): A character that has one or more accents composed into it, or is otherwise composed of components, like the ae ligature, to be displayed as a single glyph. It can be a single Unicode character or a Unicode combined character consisting of a Unicode base character and one or two Unicode combining characters.
  • Accented character (or diacritic character): A special case of a composite character where a letter is composed with one or more accents.
  • Compose key: A number of system and keyboard vendors have equipped their keyboards with a "Compose" or "Combine" key. This key - when configured and interpreted properly by the operating environment - produces a composed character which is then provided as input to the application.

โœจ Accented and mnemonic input support โœจ

Function keys or character mnemonics can be used to enter accented or other composite characters. (This is also known as digraph function with some editors.) These character composition functions also work on the prompt line. (Any composite character configured on your keyboard can of course also be entered directly or using the Compose/Combine key of your keyboard.)

Note that mnemonic input and accent prefix keys can be combined in flexible ways, e.g. ^V ' Ctrl-F6 e or F6 ^V e ^ โ€” which both enter U+1EBF (e with circumflex and acute). ๐Ÿฆ‹

Mnemonic input can be applied recursively to compose a character for further composition, e.g. ^V ' ^V a e enters U+01FD (๏ฟฝ with acute).

Accent prefix keys can use an already precomposed base character for further composition; if this does not match an explicitly known mnemonic, the base character is decomposed first to find a match, e.g. F6 ๏ฟฝ or F5 ๏ฟฝ which both enter U+01D8 (u with diaeresis and acute).

Up to three accent prefix keys can be combined by entering them in sequence in order to compose characters with multiple accents, e.g.

  • F5 F6 u โ€” enters U+01D8 (u with diaeresis and acute)
  • Ctrl-2 Ctrl-7 a โ€” enters U+1EB1 (a with grave and breve)
  • Ctrl-- Ctrl-: u โ€” enters U+1E7B (u with macron and diaeresis)
  • Ctrl-, Ctrl-( e โ€” enters U+1E1D (e with cedilla and breve)
  • Alt-7 Ctrl-, < alpha >
  • Alt-F6 Shift-F6 Ctrl-, < alpha >
  • Ctrl-< Ctrl-` Ctrl-, < alpha >

All of these enter U+1F82 (alpha with psili and varia and ypogegrammeni) where < alpha > indicates the Greek letter alpha, which may e.g. be entered by selecting the Greek input method and typing the "a" key.

๐Ÿ’… Accent prefix keys ๐Ÿ’…

General notes on using keys with Control, Shift, Alt modifiers: Especially for accented character input, mined makes use of key combinations modified with Control, Shift, Alt, or a combination of them. Some of these key combinations may be limited by local environment, especially the window system, or may need extra configuration to be enabled.

  • Hint on input of Alt/Ctrl-modified function keys: These are often intercepted by window systems for special functions.
    • Alt: Alternatively to using the Alt key, the ESC key can be used as a prefix to a function key to achieve the same modified function, e.g. ESC F6 instead of Alt-F6. Note, however, that there is an ESCAPE delay (default 450 ms) during which the subsequent function key should be pressed.
    • Control: Alternatively to using the Control key, Ctrl-V can be used as a prefix to a function key to achieve the same modified function, e.g. Ctrl-V F6 instead of Ctrl-F6.

Specific advice:

  • KDE โ€” suppresses Ctrl-Fn, Ctrl-Shift-Fn, Alt-Fn; remedy: press the "Window key" additionally at the same time, e.g. Window-Alt-F6 or use ESC or Ctrl-V prefixes, e.g. ESC F6 (be fast!), Ctrl-V Shift-F5
  • gnome-wm โ€” suppresses Alt-F5; remedy: Window-Alt-F5 or ESC F5 (be fast!)
  • fvwm2 โ€” suppresses Alt-Fn; remedy: ESC Fn (be fast!)
  • Exceed โ€” suppresses Alt-Fn, Alt-Shift-Fn; remedy: ESC Fn, ESC Shift-Fn (be fast!) or: configure ("Tools - Configuration... - Keyboard Input") "Windows Modifier Behavior - Alt Key:" and select "To X"
  • Modified digit keys (e.g. Alt-2) as well as Ctrl-modified punctuation keys (e.g. Ctrl-;) are used as extended and intuitive accent prefix keys. To enable them, either use a recent version of xterm (216) or configure them with your terminal. Configuration instructions for older versions of xterm and for rxvt can be found in the sample file Xdefaults.mined in the Mined runtime support library.
  • Note: In rxvt, Ctrl-modified and shifted punctuation keys (if enabled by configuration following the hint above) interfere with ISO 14755 input mode of rxvt; if the following key is entered twice, that mode is aborted and the modified punctuation key becomes effective as an accent prefix in mined.
Warning: The Alt-F4 key combination should not accidently be hit as many window managers use it to kill the terminal window! ๐Ÿ’€

The following table lists the accent prefix keys:

  • F5 โ€” (Sun: R4/-) diaeresis (umlaut) / dialytika
  • Shift-F5 โ€” (Sun: R5/๏ฟฝ) tilde / perispomeni
  • Ctrl-F5 โ€” (Sun: R6/๏ฟฝ) ring / cedilla / iota (ypogegrammeni)
  • Alt-F5 โ€” stroke
  • Ctrl-Shift-F5 โ€” ogonek / prosgegrammeni
  • Alt-Shift-F5 โ€” breve / vrachy
  • F6 โ€” (Sun: R3) acute (accent d'aigu) / tonos
  • Shift-F6 โ€” (Sun: R1) grave / varia
  • Ctrl-F6 โ€” (Sun: R2) circumflex / oxia
  • Alt-F6 โ€” caron / psili
  • Ctrl-Shift-F6 โ€” macron / descender
  • Alt-Shift-F6 โ€” dot above / dasia
  • Ctrl-1 โ€” acute
  • Ctrl-2 โ€” grave
  • Ctrl-3 โ€” hook above
  • Ctrl-4 โ€” tilde
  • Ctrl-5 โ€” dot below
  • Ctrl-6 โ€” circumflex
  • Ctrl-7 โ€” breve
  • Ctrl-8 โ€” horn
  • Ctrl-9 โ€” stroke
  • Ctrl-0 โ€” ring / cedilla
  • 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
  • Ctrl-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)
  • Ctrl-Alt-2 โ€” breve/horn and grave
  • Ctrl-Alt-3 โ€” breve/horn and hook above
  • Ctrl-Alt-4 โ€” breve/horn and tilde
  • Ctrl-Alt-5 โ€” breve/horn and dot below
  • Alt-6 โ€” psili and oxia
  • Ctrl-Alt-6 โ€” dasia and oxia
  • Alt-7 โ€” psili and varia
  • Ctrl-Alt-7 โ€” dasia and varia
  • Alt-8 โ€” psili and perispomeni
  • Ctrl-Alt-8 โ€” dasia and perispomeni
  • Ctrl-' โ€” (Ctrl-apostrophe) acute (d'aigu) / tonos
  • Ctrl-๏ฟฝ โ€” (Ctrl-acute) acute (d'aigu) / oxia
  • Ctrl+` โ€” (Ctrl-grave) grave / varia
  • Ctrl-^ โ€” circumflex / oxia
  • Ctrl-~ โ€” tilde / perispomeni / titlo
  • Ctrl-: โ€” diaeresis (umlaut) / dialytika
  • Ctrl-" โ€” diaeresis (umlaut) / dialytika
  • Ctrl-, โ€” cedilla / ring / iota (ypogegrammeni)
  • Ctrl-/ โ€” stroke
  • Ctrl-- โ€” (Ctrl-minus) macron / descender
  • Ctrl-< โ€” caron / psili
  • Ctrl-. โ€” dot above / dasia (with i or j: dotless)
  • Ctrl-( โ€” breve / vrachy
  • Ctrl-; โ€” ogonek / prosgegrammeni / tail / tick / upturn
  • Ctrl-) โ€” inverted breve
  • Ctrl-& โ€” hook
  • Ctrl-- Ctrl-& โ€” middle hook
Note: If your keyboard assignment provides its own accent prefix keys ("dead keys"), pressing the key twice usually delivers the corresponding spacing character which can then be used for the extended accent prefix functionality of mined; e.g. hold Control, then press ๏ฟฝ (acute key) twice, to invoke the acute/oxia prefix function of mined.
Note: For combining multiple accents, in most cases their order does not matter. As an exception, to combine dot above and macron, enter prefix keys in this order, as s macron and dot above will be interpreted as dot below.
  • dot macron โ€” e.g. Ctrl-. Ctrl-- dot above and macron (on A or O)
  • macron dot โ€” e.g. Ctrl-- Ctrl-. dot below
Note: For the sake of accepting Ctrl-- intuitively both as an accent prefix for macron as well as an accent modifier to place an accent below a letter, the macron accent prefix combined with another accent prefix key is also interpreted as applying that accent below. As a workaround to ambiguous cases, it has to be applied twice with diaeris for diaeresis below (U), and three times for line below.
  • macron macron diaeresis โ€” e.g. Ctrl-- Ctrl-- Ctrl-: diaeresis below

okay so like, accent prefix key combos are a whole vibe:

  • macron diaeresis โ€” e.g. Ctrl-- Ctrl-: gives you macron and diaeresis โœจ
  • diaeresis macron โ€” e.g. Ctrl-: Ctrl-- gives diaeresis and macron
  • macron macron macron โ€” e.g. Ctrl-- Ctrl-- Ctrl-- gives line below
Note: Some accent prefix keys, when applied twice in sequence, are mapped to a single accent as follows:
  • acute acute โ€” e.g. F6 F6 = double acute accent
  • grave grave โ€” e.g. Shift-F6 Shift-F6 = double grave accent
  • macron macron โ€” e.g. Ctrl-- Ctrl-- = bar/topbar
  • cedilla cedilla โ€” e.g. Ctrl-, Ctrl-, = psili/comma below

โœจ Combining character input โœจ

Unicode combining characters can be entered by applying accent prefix keys to the Tab key. They'll be visually combined with the previous character by rules of Unicode (and by terminal implementation). Examples:

  • Ctrl-, Tab โ†’ combining cedilla
  • F6 F6 Tab โ†’ combining double acute accent

โœจ Special character input shortcuts โœจ

Typographic quotation marks can be entered by applying accent prefix keys to the space key as follows, or using certain input mnemonics or shifted combinations (see below):

  • (twice) grave space โ€” (double) left quotation mark
  • (twice) acute space โ€” (double) right quotation mark
  • acute space โ€” e.g. F6 space or Ctrl-' space also serves for input of typographic apostrophe (or HOP ')
  • (twice) cedilla space โ€” (double) low-9 quotation mark
  • (twice) dot above space โ€” (double) high-reversed-9 quotation mark
  • ^V < < or ^V > > โ€” double angle quotation marks ๏ฟฝ ๏ฟฝ
  • ^V < space or ^V > space โ€” single angle quotation marks
  • " or ' โ€” outer or inner quotation mark of selected quote marks style
  • Alt-" or Alt-' โ€” โ†’NEWโ†’ outer or inner quotation mark of previous/standby quote marks style

Some characters are specifically mapped to special key combinations or specific applications of accent prefix keys for convenience or for Windows compatibility:

  • Ctrl-Shift-space โ€” no-break space (U+00A0)
  • Ctrl-@ a/A โ€” ๏ฟฝ/๏ฟฝ
  • Ctrl-& a/A โ€” ๏ฟฝ/๏ฟฝ
  • Ctrl-& o/O โ€” oe/OE ligature
  • Ctrl-& s โ€” ๏ฟฝ
  • Ctrl-? โ€” ๏ฟฝ
  • Ctrl-! โ€” ๏ฟฝ

As with modified keys in general, these shortcuts may depend on proper terminal configuration according to the sample files in the Mined runtime support library.

โœจ Line ends โœจ

Key combinations are available to enter specific kinds of line ends (works in xterm and mintty):

  • Ctrl-Alt-Enter โ€” DOS or Unix line end (if editing Unix or DOS file, respectively)
  • Ctrl-Shift-Alt-Enter โ€” Mac line end
  • Ctrl-Enter โ€” Unicode line separator (if editing Unicode text)
  • Shift-Enter or HOP Enter โ€” Unicode paragraph separator (if editing Unicode text)
  • โ†’NEWโ†’ Control-Shift-Enter โ€” ISO 8859 Next Line (if editing Unicode or ISO 8859 text)

Also, the line end type of a line can be changed from a submenu of the Options menu.

โœจ Character input mnemonics โœจ

The enter-control-code prefix (^V by default, ^Q in emacs keyboard mode, ^_ in Windows and pico keyboard modes, ^P in WordStar keyboard mode) can be used for mnemonic character composition. This covers accented characters and other mnemonics. The available mnemonics include RFC1345 mnemonics (extended to provide generic accent mnemonics for Unicode characters), mnemonics known from HTML and TeX, โ†’NEWโ†’ groff glyphs (roff special characters), and useful supplementary mnemonics. See Character Mnemos reference on the mined web site for a listing. Supplementary character mnemonics are consistent with generic RFC1345 mnemonics; scripts covered are Latin, Greek, Cyrillic.

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.

For Greek and Cyrillic accented characters, mnemonics combining accents with Greek or Cyrillic base characters are generated automatically from the UnicodeData.txt database. Greek and Cyrillic accent prefix keys reuse those for Latin accents and are listed in the sections on Greek and Cyrillic script support (see Language support).

  • 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" or 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 or x-- โ€” topbar
  • --x or x-- โ€” bar
  • ,x or x-, โ€” comma below / left hook
  • x# or x!! โ€” double grave
  • x) โ€” inverted breve
  • x& โ€” hook
  • %x โ€” retroflex hook
  • x,, โ€” palatal hook
  • x~~ โ€” middle tilde
  • x} โ€” curl
  • 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

See also the description of the ^V function below for more input options. Two-letter mnemonics can also be entered in reverse order if this is unambiguous. Detection of reverse order mnemomics (two letters or one letter and multiple accents) as well as the generic accent mnemonics " ^ ` ~ ๏ฟฝ ๏ฟฝ ๏ฟฝ ๏ฟฝ ๏ฟฝ works with both short mnemonic entry (two-letter "^Vxy") and full mnemonic entry ("^V xy... ").

Mnemonic character substitution commands (ESC _ and national variants) replace characters at the cursor position with the respective character described by them. The following substitute descriptions are detected:

  • Two-character mnemonic
  • HTML character mnemonic
  • HTML numeric character entity
  • URL escape notation (bytewise hexadecimal with % prefixes)

โœจ Keyboard Mapping and Input Methods โœจ

Mined supports optional keyboard mapping which is especially useful for Unicode or CJK editing. When a keyboard mapping is selected, input characters or sequences are transformed to other characters or sequences, typically of a certain Unicode script range. Keyboard mappings for Greek, Cyrillic, Hebrew, Arabic, and major CJK input methods are preconfigured (they have been ordered in the Input Method menu according to the order of their respective basic ranges in the Unicode character set, or to the order of the letters of the usual abbreviation CJKV for East Asian text processing - Chinese, Japanese, Korean, Vietnamese). The Radical/Stroke input method provides additional functionality as a special case. Mined provides compile-time configuration of additional input methods; for this aim, further mappings can be generated using the mkkbmap script (from tables in various formats as used by other editors or supplied by the m17n multilingualization package) 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.)

โœจ Pick lists โœจ

Some 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, page down/up) 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. If the pick list is too large to fit on the screen, the menu will be scrollable or pageable (using cursor keys). 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.

Okay so the keyboard mapping data is all built on Unicode, which is iconic but has a couple little quirks bestie needs to know about. 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 they cannot be inserted. In a CJK terminal, some characters may not be displayed at all; an empty entry is shown instead. (And in a non-Unicode setup, when you're editing text in a different encoding, there may even be characters that can't be displayed in the selection menu but can be inserted. Messy, ik, but that's the vibe. ๐Ÿซ )

๐ŸŒธ Input method selection ๐ŸŒธ

So mined keeps two input methods (keyboard mappings) alive at once โ€” an active one and a standby one. You can toggle between them super fast for text input, and yes, it works on the prompt line too. The current mapping shows up as the Input Method flag by its two-letter script tag in the flags area, and it shows -- if no mapping is active. Cute little status indicator, love that for us. ๐Ÿ’…

You can pick the active mapping in all these ways:

  • ESC k or Alt-k or Ctrl-Alt-F12 or left click on the Input Method flag โ€” toggles between the current (active) and the previously selected (standby) input method (keyboard mapping). (The Alt- toggle functions also work on the prompt line.)
  • HOP ESC k (or HOP Alt-k) โ€” clears the input method, i.e. resets the keyboard mapping to none (unmapped input). Back to factory settings energy.
  • ESC I or Alt-I or ESC K or Alt-K or Ctrl-F12 โ€” opens the Input Method (Keyboard Mapping) selection menu. (Alt-I or Alt-K or Ctrl-F12 also work on the prompt line.)
  • right click on the Input Method flag โ€” opens the Input Method selection menu. Right-click stays winning fr fr.
  • HOP ESC K or HOP Alt-K โ€” cycles through the available input methods / keyboard mappings. Just scrolling the lineup, no big deal. โœจ

If file position memory is enabled (see File info: Memory of file position and editing style parameters above), mined also remembers the last selected input method for the file. So your fave mapping comes back with your fave file. Obsessed. ๐ŸŽ€

Note: For preselecting the active or standby input method by environment configuration, see about usage of the environment variable MINEDKEYMAP below. ๐Ÿ‘€
Note: Keyboard mapping is implicitly suppressed temporarily where it's not useful: during mnemonic character input, HTML marker input, command letter entry, help selection, and yes/no prompting. Like, it knows when to chill. ๐Ÿ’€

โœจ Character encoding support โœจ

Okay bestie, so mined has to pick a character encoding for interpreting and handling text, and there are literally five ways it can go down:

  • Interactively from the Encoding Menu (one of the flag menus) โ€” you can change the encoding interpretation while editing. To open it, click with the right mouse button on the encoding indication in the flags area of the top line, or type Alt-E. See also Quick Options (Mode indication) flags for an overview. Wanna toggle between the current and the previously selected encoding? Click the Encoding flag with the left mouse button. ๐Ÿ’…
  • Explicitly with a command line option -E... โ€” there are a number of options to specify the desired text encoding (see the encoding command line options above).
  • By auto-detection (heuristic counting of valid character codes). Note: The encodings to be taken into account for auto-detection can be configured with the MINEDDETECT environment variable. Set it to the desired list of single-letter encoding indications to disable auto-detection of other encodings. Recognised encoding indications are mentioned in the list of auto-detected encodings below (they are the same as used with the -E parameter); UTF-8 auto-detection cannot be disabled this way. ๐Ÿซถ
  • By either environment variable LANGUAGE or TEXTLANG (see Locale configuration) โ€” this overrides other locale variable settings for the purpose of text encoding without affecting them otherwise. Iconic.
  • By checking the locale environment (see Locale configuration).

๐ŸŒธ Auto-detected character encodings ๐ŸŒธ

The following encodings are auto-detected unless overridden with a -E command line option (or -l or -u); the preceding one-letter tag can be used for auto-detection configuration with the environment variable MINEDDETECT:

  • - โ€” UTF-8
  • - โ€” UTF-16 encoding (big or little endian) with or without BOM (byte order marker)
  • 8 โ€” any 8 bit encoding; this is auto-detected in a generic way; the actual 8 bit encoding assumed corresponds to the terminal encoding if it is an 8 bit terminal; otherwise, Latin-1 is assumed; using 8 in the environment variable MINEDDETECT excludes all CJK encodings from auto-detection (but not UTF-8), and adds all 8 bit encodings that are not included by default
  • L โ€” Latin-1 (ISO 8859-1)
  • W โ€” Windows Western ("ANSI", CP1252)
  • P โ€” PC Latin-1 (CP850)
  • M โ€” MacRoman
  • - โ€” CJK encoding (with unspecified mapping) is pre-auto-detected in a generic way; usually the actual CJK encoding is determined, too
  • G โ€” GB18030 (including CP936)
  • B โ€” Big5 (including CP950)
  • J โ€” EUC-JP
  • X โ€” โ†’NEWโ†’ EUC-JIS-2004 / EUC-JIS X 0213
  • S โ€” Shift_JIS / CP932
  • x โ€” โ†’NEWโ†’ Shift_JIS-2004 / Shift_JIS X 0213
  • K โ€” UHC / CP949 (including EUC-KR)
  • V โ€” VISCII
Note: For new files, the text encoding is derived from the locale environment. โ†’NEWโ†’ With command line option -E- or -E auto-detection is disabled and text encoding is always derived from the locale environment.

๐ŸŽ€ CJK and mapped 8 bit encoding support ๐ŸŽ€

Mined supports major CJK encodings as well as mapped 8 bit encodings ("character sets"). Mined has built-in support for a large number of 8 bit encodings which appear to be in use or unique for a region. The Encoding menu has been structured with submenus to provide a concise menu selection feature. Slay.

โ†’NEWโ†’ EBCDIC support ๐Ÿฆ‹

Mined supports EBCDIC encoded files (transparently transforming them for internal handling) in the "bracket" codepage CP1047 as used by the UNIX System Services (USS) on IBM z/OS. CP1047 is selected with command line option -E=cp1047 or -E.EBCDIC or -E:47. The character encoding flag indicates EBCDIC with 47.

New files in EBCDIC encoding will by default use Next Line as line separators; add option -r to prefer LF.

New lines can be added selecting LF or NL lineend type explicitly with Ctrl-Enter or Shift-Enter.

โ†’NEWโ†’ Auto-detection of EBCDIC can be enabled by including the letter E in the environment variable MINEDDETECT.

โ†’NEWโ†’ ISO 6937 support ๐ŸŒˆ

Mined supports ISO-6937 encoded files as defined by CCITT/ITU-T for telematic services/Teletex, with Euro extension as used for DVB. ISO 6937 is selected with command line option -E=ISO-6937 or -E:I9. The character encoding flag indicates ISO 6937 with I9.

๐Ÿ’œ Combining characters ๐Ÿ’œ

In all character encodings handled by mined that contain combining characters, mined handles them and provides partial editing and an optional separated display mode as described above in section Combining characters. The whole squad: (CJK encodings EUC-JIS-2004, Shift_JIS-2004 and GB18030, Vietnamese TCVN and Windows Vietnamese (CP1258), Thai TIS-620, ISO Arabic, Mac Arabic, DOS Arabic, ISO Hebrew, Windows Hebrew). Handling of combining text characters is properly coordinated with the set of combining characters supported by the terminal.

For Japanese X 0213 encodings, the character codes that map to two Unicode characters are supported.

The command ESC u displays character encoding information in the bottom status line (conforming to ISO 14755); this includes the character code, the mapped Unicode character value, and optionally script and character category information, character and named sequence name, combining and Unicode decomposition information, and mined mnemonic input information, as configured in the Info menu. For CJK characters, also Han pronunciation and description information is available. See Character information display for details.

With HOP ESC u, permanent display is toggled.

Other commands insert the code of the current character, insert a character taking its character code or Unicode value from the text, or toggle the preceding character and its hexadecimal Unicode value (Alt-x). For details, see Code conversion in the Command reference.

๐Ÿงš Terminal environment for CJK encoding support ๐Ÿงš

Mined supports handling of CJK text encoding in any terminal (see Terminal encoding support below). However, proper display of a wide range of CJK characters can obviously only work in either a Unicode terminal (recommended) or in a native CJK terminal that runs the same encoding as the selected text encoding.

CJK terminals: For terminals that support native CJK encodings (e.g. cxterm, kterm, hanterm), the terminal encoding assumed by mined can be specified with a command line option or by proper locale indication in one of the environment variables LC_ALL, LC_CTYPE or LANG. For available encodings, see Quick Options (Mode indication) flags. For usage of the +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: By default, mined does not display the following CJK character codes in a native CJK terminal, i.e. it displays a substitute indication for them (see CJK character display above):
  • Unknown characters: CJK characters that have no defined mapping to a valid Unicode character. Use the +C option to override this display suppression and enforce transparent display of unknown characters in a CJK terminal.
  • Invalid characters: CJK characters that do not match the encoding scheme (e.g. wrt. to specified byte ranges) of the selected encoding. Use the +CC option to override this display suppression and enforce transparent display of invalid character codes in a CJK terminal.
  • Extended characters: CJK characters encoded with 3 or 4 bytes. Use the +CCC option to override this display suppression and enforce transparent display of extended character codes in a CJK terminal.

Regardless of all these features and options, it may not always be possible to prevent display garbage, especially if the font used by the terminal does not cover the needed character range. To avoid these problems in general, it is recommended to use a Unicode terminal for editing CJK encoded files.

See also Terminal interworking problems for special hints about certain terminals.

โญ VT100 special graphics character set display support โญ

Mined can display and edit files containing codes for VT100 line drawing graphics characters, showing corresponding small letters as their respective graphic symbol. This option can be toggled from the Options menu and will be cleared also on an explicit screen redraw command (ESC .).

๐ŸŒˆ Unicode support ๐ŸŒˆ

Okay bestie, this is the Unicode corner of mined, and it is honestly kind of iconic. Letโ€™s get into it. ๐Ÿ’…

โœจ Introduction: handling Unicode encodings โœจ

So mined interprets UTF-8, which is a multi-byte character encoding of the ISO-10646 character set, part of which is also known as Unicode. When reading a file, it detects UTF-8 encoding automatically (unless overridden by explicitly selecting a text encoding with a command line option -u or -l or -E...). It can also edit UTF-16 encoded Unicode files (UTF-16 can represent the complete 21 bit Unicode subset of ISO-10646). UTF-16 big or little endian with or without BOM (byte order mark U+FEFF) is auto-detected or can be selected with a command-line option (see notes under Locale configuration below).

UTF-16 is maintained transparently, i.e. a UTF-16 encoded file is written back in UTF-16, and if it was beginning with a BOM this is maintained. No explicit UTF-16 entry exists, however, in the Encoding menu since the text is internally handled in UTF-8. However, the character encoding flag indicates UTF-16 file encoding with either "16" (big endian) or "61" (little endian).

๐ŸŒธ UTF-8 internal representation, transparent handling of other text ๐ŸŒธ

mined handles UTF-8 representation internally and also edits and keeps illegal UTF-8 sequences. This way, if you happen to open a Latin-1 or CJK or any other encoded file in UTF-8 mode, or switch encoding while editing, or edit a file with mixed encoding, the text contents can still be edited and you will not loose any file contents information. Obsessed with the damage control honestly. ๐Ÿ’–

๐ŸŽ€ Character encoding indication ๐ŸŽ€

The upper-right flags area has a character encoding indication which shows "U8" if UTF-8 text interpretation is selected. For Latin-1 text interpretation "L1" is shown, for others see Quick Options (Mode indication) flags. You may click on the indication flag to toggle between the current and the previous selected encoding. Cute little toggle moment. โœจ

๐Ÿฆ‹ Character information display ๐Ÿฆ‹

The Character information display command ESC u is described above; character information display can also be preselected by environment configuration. In UTF-8 mode, information shown includes the UTF-8 encoding byte sequence. Ngl thatโ€™s the good diagnostic tea. ๐Ÿซถ

๐Ÿ’œ Character input support ๐Ÿ’œ

With ^V, mined's special character input support is invoked (both while editing text and entering text on the prompt line, e.g. as a search expression). With this feature, (in addition to plain control characters) a composite character can be entered by its accent combination or other mnemonic character description; a more-than-two letter character mnemonics would be embedded in space characters after the ^V. In addition, numeric character codes or values can be entered with leading ^V#, octal/decimal with ^V##/^V#=, Unicode with optional u/U/+. (For examples, see description of the ^V function below.) With numeric character input, mined supports successive multiple character entry according to ISO 14755; if the numeric code is terminated by a Space key, another numeric character can be entered subsequently; an Enter key terminates numeric character input.

See also the generic section Character input support above for input support for accented characters and keyboard mapping.

โœจ Encoding conversion support โœจ

Two functions support interactive character encoding conversion (Latin-1 to UTF-8 or UTF-8 to current encoding) to partially fix files with mixed encoding. In either text encoding mode, the search function looks for characters encoded in UTF-8 (when not editing in UTF-8 mode) or not (when editing in UTF-8 mode); the command is HOP ESC ( or Alt-F11. Then, convert the character with ESC _ or its national variant (see mnemonic character substitution commands in the Command reference). For repeated interactive conversion, both functions can be combined into Alt-Shift-F11 (convert current character, then search next). Thatโ€™s the little mixed-encoding cleanup combo bestie. ๐ŸŽ€

๐Ÿ’… Unicode Copy/Paste buffer conversion ๐Ÿ’…

For the Copy/Paste buffer, Unicode mode can be selected which maintains its contents always in Unicode, so that Copy/Paste of text works between differently encoded files (or sections of a file, if encoding is switched while editing) with automatic character code conversion. This mode is only effective while editing with non-Unicode encoded text interpretation.

Select this mode with the command line option -Eu or in the Paste buffer menu (righ-click on the Buffer mode flag "=" or "+") and select "Unicode".

Unicode buffer mode is indicated by cyan background of the Paste buffer flag (then "=" or "+"), except in Unicode text mode. Cyan flag moment, we love a visual cue. ๐Ÿ’–

๐ŸŒธ Smart quotes and dashes ๐ŸŒธ

If smart quotes mode is enabled (see the Quotes style menu under the Quotes flag left to the Encoding flag and menu), quote mark keys will enter typographic smart quotes instead. Smart dashes also apply. See Smart quotes above for more details. Fancy punctuation behavior, no cap. โœจ

๐Ÿงš Bidirectional terminal support ๐Ÿงš

A bidirectional terminal (such as mintty, mlterm) will probably also apply Arabic LAM/ALEF ligature joining. mined auto-detects this feature and enables bidi terminal handling automatically. Otherwise, bidi terminal handling can be configured with the option +UU.

In this mode, when displaying a menu, underlying text lines that contain right-to-left characters are cleared first in order to prevent display confusion between the terminal's bidi algorithm and the menu position. Also, with bidi terminal handling enabled, mined assumes that the terminal applies Arabic LAM/ALEF ligature joining and properly accounts for this feature in display position handling. In separated display mode, the joining part of the ligature is indicated similar to the handling of combining characters.

๐Ÿ’ซ Input support for right-to-left scripts ("poor man's bidi" mode) ๐Ÿ’ซ

This support feature for input of right-to-left text pieces is enabled by default unless the terminal is detected to be in bidi mode itself (e.g. mlterm).

"Poor man's bidi" mode is suitable to insert small pieces of right-to-left text (words, phrases) within left-to-right text, it stores right-to-left text in visual order (see below) and works as follows:

After entering a right-to-left Unicode character, the cursor position is moved left of it, so subsequent characters will be appended left and the text shifted right. Characters are stored in visual order while input support is implicit, based on the characters being typed. Entering a left-to-right character will automatically skip behind the previously entered right-to-left text on the line and switch to left-to-right direction; this behaviour optimizes inserting small pieces of right-to-left text into basically left-to-right text; this priority is justified by the assumption that this mode (with visual storing order) is only useful for inserting small right-to-left quotations into left-to-right text and not for editing right-to-left documents (which should be stored in logical order).

Newline, Space, Tab, and combining characters attempt to behave well according to what was entered before; however, intermediate cursor movement is not considered.

Note: For proper support of right-to-left text editing stored in logical order, please use mined in a right-to-left terminal (mintty, mlterm). Adding a feature for advanced bidi support in all terminals is being considered.

Note: Poor man's bidi mode also works in non-Unicode text encodings.

Note: Poor man's bidi mode is similar to the "revins" (reverse insert) option of vim. Iykyk. ๐Ÿ‘‘

โญ Unicode line ends โญ

mined detects and handles Unicode line separators and paragraph separators (unless disabled with +u-u). They are displayed as shown above. Interpretation of these characters as line ends is disabled if a file is explicitly opened in non-Unicode encoding (but not if non-Unicode encoding is just auto-detected).

If editing Unicode text, HOP Enter will insert a Unicode paragraph separator, Enter in a line that already has a Unicode line end will insert a Unicode line separator. Also, the keys Shift+Enter or Ctrl+Enter insert a paragraph separator or line separator respectively.

Configuration: In order to enable shift and control with the Enter keys, xterm or rxvt must be configured as shown in the example configuration file Xdefaults.mined in the Mined runtime support library. Little terminal setup homework, bestie. ๐ŸŽ€

๐ŸŒˆ Unicode display ๐ŸŒˆ

In UTF-8 terminal mode, mined displays all Unicode characters if they are contained in the font used by the terminal. Fonts usually have a substitute glyph to indicate characters not contained in the font. Wide characters (double-width glyphs) are displayed in a double-width character cell of the terminal. Combining characters are displayed either combined or separated (see Combining characters below).

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)

Illegal or non-Unicode characters are indicated with the following replacements:

  • ๏ฟฝ (or ? or []) โ€” a character code ending with FFFE or FFFF (override substitution for transparent display with +C)
  • ๏ฟฝ (or ? or []) โ€” a surrogate code point (override substitution for transparent display with +CC)
  • ๏ฟฝ (or ? or []) โ€” a code point outside the defined Unicode range (override substitution for transparent display with +CCC)

๐Ÿ“ Character substitution display ๐Ÿ“

Legal characters (in the effective text encoding) that cannot be displayed in a non-Unicode terminal are indicated with the following replacements:

  • ๏ฟฝ or ๏ฟฝ (if wide) โ€” a non-combining Unicode character that cannot be displayed
  • % or % (if wide) (if the terminal cannot display ๏ฟฝ) โ€” a non-combining Unicode character that cannot be displayed
  • ` (or wide) โ€” a Unicode combining character that cannot be displayed
  • " or ' (or wide) โ€” a double or single quotation mark character (typographic quote mark)
  • - or ~ or = (or wide) โ€” a dash or hyphen character
  • e, ๏ฟฝ, etc โ€” a combined or other character that cannot be displayed which is based on the displayed character by its Unicode decomposition
  • E โ€” the Euro sign โ‚ฌ U+20AC
  • V, X, Z โ€” the check mark โœ“ U+2713, ballot X โœ— U+2717 , zigzag arrow โ†ฏ U+21AF
  • ' โ€” glottal stop 'okina สป U+02BB
  • 0 ..9 , A ..Z etc โ€” a corresponding fullwidth ASCII character

โš™๏ธ Configuration: Display colour of special or illegal UTF-8 indications

okay so the colour of those little "special or illegal UTF-8" markers is fully customisable, bestie โ€” it lives in the environment variable MINEDUNI. The value should be the numeric part of an ANSI terminal control sequence (yes, just the number, the terminal already knows the rest ๐Ÿ’…); optionally, the value can be preceded by a character to be used for Unicode character indication in non-Unicode terminal mode. Slay.

The default configuration value is "๏ฟฝ 46" โœจ

๐Ÿ’ซ Combining and joining characters

Mined supports handling of combining characters, featuring optional separate display and partial editing, as described above in section Combining characters. (Yes queen, it's up there. Scroll. ๐Ÿซถ)

๐Ÿค Joining characters

If mined assumes that the terminal applies LAM/ALEF ligature joining (either configured with the +UU right-to-left display option or auto-detected; correct native support is known of mlterm), the joined character width will be handled correctly in cooperation with the terminal. In all other terminals mined will apply LAM/ALEF joining itself. Teamwork, or solo effort โ€” either way it eats ๐Ÿ”ฅ

Mined supports ligature joining in both combining character display modes:

  • In combined display mode, the screen position is accounted properly. Also, when deleting a character, a joined ligature is deleted together with the base character, just like combining characters. (They go down together, no broken leftovers ๐Ÿ’€)
  • In separated display mode, the joining part of the ligature is indicated using the appropriate isolated form, highlighted with Unicode special indication background colour (similar to the handling of combining characters).

๐Ÿ” Search expression limitations

Unicode search ranges can not be very large, ngl โ€” because all the included characters are listed in an internal buffer which is limited to ca. 1 KB. That's the whole vibe check, no cap. Keep your ranges cute and small ๐Ÿ’–


๐Ÿงฌ UTF-8 preservation and byte-transparent editing

When splitting lines that are too long for internal handling, consistency of UTF-8 sequences is preserved (they are not split); combining characters may get split off their base characters, however, they will join seamlessly as lines are joined again (e.g. when saving the file). It's giving "temporary long-distance relationship" ๐Ÿ˜ญ they always find each other again. Note that isolated combining characters, e.g. at the beginning of a line, are always displayed as if in separated display mode.


๐Ÿ–ฅ๏ธ Terminal environment

Iconic behaviour: Unicode text can be edited in any terminal encoding (UTF-8, 8 bit, CJK), however, a UTF-8 terminal is preferable. (It's the main character, obviously ๐Ÿ‘‘.) UTF-8 terminal operation can be configured in either of these ways:

  • Auto-detection: If the terminal emits cursor position reports, mined can uniquely recognise UTF-8 terminal encoding and further UTF-8 features (see Terminal encoding support below).
  • Environment: By proper environment variable settings. For more details, see Locale configuration.
    • Note: In general, it is advisable to start a terminal window using a wrapper script that sets a suitable locale environment at the same time, in order to support all kinds of applications that are more dependent on proper environment setting than mined is. The mined installation also provides the script 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.) โ€” bestie, set your env properly, future you will thank you ๐Ÿ™
  • Parameter: +EU selects UTF-8 terminal mode. One flag. That's it. Slay.
See also Terminal interworking problems for special hints about certain terminals ๐ŸŒธ

๐Ÿ€„ CJK support (Chinese/Japanese/Korean Han character features)

Mined provides CJK support features uniformly in Unicode and in major CJK encodings. For information relating to CJK character encoding see Character encoding support below. ๐Ÿ’œ

โŒจ๏ธ CJK input method support

Input methods for CJK characters are supported with the keyboard mapping feature. A number of popular input methods for CJK text input are pre-configured, others can be added at compile-time with the mkkbmap script. DIY era ๐Ÿ› ๏ธโœจ

๐Ÿ–Œ๏ธ Radical/Stroke input method

Mined provides a Radical/Stroke input method for CJK characters with specific functionality in addition to keyboard mapping; it works at two levels, selecting a radical first, then a character from a list sorted by stroke count. Two levels, one iconic workflow ๐Ÿ’…

If this input method is active, a selection menu for the 214 CJK radicals is displayed (without prior keyboard input โ€” it just shows up, main character energy ๐ŸŽ€). The menu displays all variations of each radical. After selecting a radical from this menu, a second-level menu is displayed, showing all CJK characters based on the selected radical, sorted by the number of strokes. Many of these menus will not fit on the screen and can be scrolled. Pressing Escape here would return to the radical menu; pressing Escape there would disable the input method. To enter a non-mapped character (e.g. a line end), you need to disable Radical/Stroke input method temporarily; just toggle it back on with Alt+k (or Esc k) or Ctrl+Alt+F12 and the radical menu will be displayed again for continued input. iykyk ๐Ÿ˜Œ

For the Unicode version used as the character data source, see the Options - About information or the mined change log.

๐Ÿˆถ CJK character display

Combining characters (in both JIS X 0213 encodings and GB18030) are handled and the combined characters are displayed properly in either combined or separated display mode in a UTF-8 terminal (like for UTF-8 encoded text). The following special CJK character indications apply โ€” learn these, they're your cheat sheet ๐Ÿ“:

  • ๏ฟฝ or ๏ฟฝ โ€” CJK character that cannot be displayed in the terminal
  • % or % (if the terminal cannot display ๏ฟฝ) โ€” CJK character that cannot be displayed in the terminal
  • </hotpink> or <hotpink> โ€” CJK combining character that cannot be displayed in the 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

๐Ÿˆท๏ธ Han character information display

When the cursor is on a Han character and either descriptive or pronunciation information about this character is available in the Unihan database (from unicode.org), mined can optionally display this information, with a selection of display details which may include semantic information and various pronunciations. Basically: lore for your kanji ๐Ÿฆ‹

To enable Han info, select it in the Info menu. To open the Info menu, type Alt+F10 or right-click the "?" flag. The information can optionally be shown on the status line (where it may be truncated if too long) or in a pop-up menu next to the character.

Pronunciation information to be displayed can be selected in the Info menu. While selecting multiple pronunciation options, the menu stays open. (Yes, it's poly-friendly, pick them all ๐Ÿ’–)

The same information is always shown while you are browsing an input method pick list (then on the status line).

Han character information display can be selected with the +?h command line parameter (or +?x for short display on the status line). To preselect continuous Han character information display, append this parameter to the environment variable MINEDOPT.

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.

(For the Unicode version used for the Unihan data source, see the Options - About information or the mined change log.)


๐ŸŒ Terminal encoding support

Mined supports UTF-8 terminals, CJK terminals, Latin-1 and other 8-bit encoded terminals. Inclusive queen ๐ŸŒˆ

๐Ÿ›ฐ๏ธ Terminal feature detection

Mined performs auto-detection of a number of terminal features:

  • For UTF-8 terminals, mined performs auto-detection of terminal features (detection of UTF-8 terminal, different width data and combining data versions, handling of double-width, combining and joining characters).
  • For CJK terminals, mined performs some auto-detection of specific CJK terminal features (handling of non-EUC code points, handling of extended code range, GB18030, 3-byte and 4-byte encodings, detection of kterm JIS encoding, detection of rxvt emulating CJK encoded terminal, special CJK width properties, and terminal support of combining characters).
  • For mapped 8-bit terminals, mined performs auto-detection of terminal support of combining characters.
  • For the Unicode version used for width and combining character properties, see the Options - About information or the mined change log.
  • CJK terminals cannot always be distinguished from 8-bit terminals by auto-detection. Neither can the encoding of either CJK or 8-bit terminals be auto-detected. It is thus advisable to setup proper settings of locale environment variables (LC_ALL, LC_CTYPE, LANG). Alternatively, the effective terminal encoding can be indicated to mined with a command line option (+EX). For configuration details, see Locale configuration below.
โš ๏ธ Read that last one again, bestie โ€” auto-detection can't read every terminal's mind. Setting LC_ALL, LC_CTYPE and LANG is the move, fr fr.

๐Ÿ”ง Specific terminal properties

For more specific configuration hints (especially for PC-based terminals), see the Terminal environment configuration hints below. For interworking issues with specific terminals see also the listing of Terminal interworking problems. ๐Ÿ’€๐Ÿ”ง

๐ŸŽ€ Mined Command reference (command and key function assignments) ๐ŸŽ€

๐Ÿ’… General note on using keys with Control, Shift, Alt modifiers ๐Ÿ’…

Okay so bestie, listen: Mined uses so many key combos modified with Control, Shift, Alt, or a combo of them. Itโ€™s literally a whole resource for invoking a larger number of specific functions, giving you modified functionality plus accented character input support. Some of these key combinations may be limited by your local environment โ€” especially the window system โ€” or may need extra configuration to be enabled.

Especially modified function keys are often intercepted by window systems for special functions. Rude, but true.

In general, mined interprets an ESC prefix as an alternative for an Alt-key combination. For further advice and window-system-specific hints on further remedies, as well as configuration hints to enable modified key input, see the hint box under Accent prefix keys above.


๐ŸŒ€ Generic command modifiers (esp. HOP key) ๐ŸŒ€

  • ^Q or ^G or "5" (on keypad) or Menu (in Linux) or * (on keypad) or Shift-TAB โ€” HOP key. Except ^G followed by a digit, bestie.
  • ESC โ€” Prefix for subsequent โ€œletter commands.โ€ Also: generic prefix for an Alt-modified command, to apply to a subsequent command for which the terminal does not support the Alt key.
  • ^V โ€” (Prefix for control character input, but also:) generic prefix for a Control-modified command, to apply to a subsequent command for which the terminal does not support the Control key.
  • Ctrl-< punctuation key > โ€” Set of accent prefix keys to enter composed characters.
In order to enable the "5" key to invoke the HOP function, or assign the HOP function to another key (e.g. on laptops which lack the numeric keypad), some configuration may be necessary; see Keypad configuration below. ๐Ÿ’…

๐Ÿฆ‹ Cursor and screen motion ๐Ÿฆ‹

  • ^E or cursor-up โ€” Move cursor 1 line up.
    • ... with HOP: Go to top of page.
  • ^X or cursor-down โ€” Move cursor 1 line down.
    • ... with HOP: Go to bottom of page.
  • ^S or cursor-left โ€” Move cursor 1 character left.
    • ... with HOP or Ctrl-Home: Go to beginning of line.
  • ^D or cursor-right โ€” Move cursor 1 character right.
    • ... with HOP or Ctrl-End: Go to end of line.
  • ^A or Shift-cursor-left (on small keypad) โ€” Move word left (to preceding beginning of a word).
    • ... with HOP: Go to beginning of sentence.
  • ^F or Shift-cursor-right (on small keypad) โ€” Move word right (to beginning of next word).
    • ... with HOP: Go to end of sentence.
  • Ctrl-Shift-cursor-up โ€” Move backward to previous beginning of paragraph.
  • Ctrl-Shift-cursor-down โ€” Move forward to next beginning of paragraph.
  • Shift-cursor-up (on small keypad) โ€” Go to top of page.
  • Shift-cursor-down (on small keypad) โ€” Go to bottom of page.
  • ^R or PgUp or PrevScreen (VT100) โ€” Scroll backward 1 page (Top line becomes bottom line).
    • ... with HOP: Go to beginning of text.
  • ^C or PgDn or NextScreen (VT100) โ€” Scroll forward 1 page (Bottom line becomes top line).
    • ... with HOP: Go to end of text.
  • Home (on small keypad) โ€” Move to beginning of line. If already there, move to beginning of previous line. Only if keyboard is configured to emit different control sequences for the two keypads, see Keypad configuration hints below.
  • Ctrl-Home (on small keypad) โ€” Move to beginning of line.
  • End (on small keypad) โ€” Move to end of line. If already there, move to end of next line. Only if keyboard is configured to emit different control sequences for the two keypads, see Keypad configuration hints below.
  • Ctrl-End (on small keypad) โ€” Move to end of line.
  • โ†’NEWโ†’ HOP ESC . โ€” Center current position vertically on screen.

Enabling partial editing of base character and combining characters (accents) in combined display mode. Yes, weโ€™re getting fancy.

  • Ctrl-cursor-right or ^V cursor-right โ€” Micro movement: Move partial character right into Unicode combined character.
  • Ctrl-cursor-left or ^V cursor-left โ€” Micro movement: Move partial character left over Unicode combining character.
  • ^W or Ctrl-PgUp or keypad-Minus (if supported by terminal) โ€” Scroll screen backward 1 line.
    • ... with HOP: Scroll backward half a screen.
  • ^Z or Ctrl-PgDn or keypad-Plus (if supported by terminal) or โ†’NEWโ†’ keypad-Comma (DEC) โ€” Scroll screen forward 1 line.
    • ... with HOP: Scroll forward half a screen.
  • ^G nn Enter or ESC g nn Enter โ€” Move to a line (prompts for line number). (Terminate command with Enter or Space.)
  • ^G nn % or ESC g nn % โ€” Move to position in text determined by percentage.
  • ^G nn p or ESC g nn p โ€” Move to page in text (set page length with ESC P).
  • ^G < command > or ESC g < command > โ€” If not immediately followed by a digit, the positioning command works as an alternative HOP key.

โญ Text marker navigation โญ

  • ^G N , or ESC g N , โ€” (N=0..15) Set marker N. (Final "m" or "," may be used.)
  • ^G N . or ESC g N . โ€” (N=0..15) Go to marker N. (Final "'" or "g" or "." may be used.)
  • ESC m N โ€” (N=0..9/a..f) Set marker N.
  • ESC ' N (deprecated) โ€” (N=0..9/a..f) Go to marker N. Deprecated, so maybe donโ€™t build your whole workflow on it, bestie.
  • HOP Home or ^G ^@ or ^G ^] or HOP ESC ^ โ€” Move to the position previously marked by Home/^@/^]/ESC ^
  • ESC Enter or Alt-Enter (Alt-Return) * โ€” Return backward to the previous position marked in the position stack.
  • HOP ESC Enter or HOP Alt-Enter (HOP Alt-Return) * โ€” Return forward to the next position marked in the position stack.
  • left mouse button โ€” Move cursor to position.
* Note that depending on Window system or terminal, Alt-Enter may be captured as a function to maximize the window. So if that key combo ghosts you, itโ€™s probably the window manager being extra.

๐ŸŒธ Entering text ๐ŸŒธ

To enable combinations of Control and Shift with the Enter key, terminal configuration may be needed (see Unicode line ends).

  • < printable char > โ€” Insert the character at cursor position.
  • < Enter > or < LF Linefeed char > or < CR Return char > โ€” Insert a newline at cursor position, clone line end type. Apply auto-indentation if enabled.
  • Ctrl-Enter (if editing Unicode text) โ€” Make a new line by inserting a Unicode line separator at cursor position (unless disabled with +u-u).
  • Shift-Enter (if editing Unicode text) โ€” Make a new line by inserting a Unicode paragraph separator at cursor position (unless disabled with +u-u).
  • โ†’NEWโ†’ Control-Shift-Enter (if editing Unicode or ISO 8859 text) โ€” Make a new line by inserting a Next Line character (U+0085).
  • Ctrl-Alt-Enter โ€” Make a new line by inserting a DOS or Unix line end at cursor position (if editing Unix or DOS file, respectively).
  • Ctrl-Shift-Alt-Enter โ€” Make a new line by inserting a Mac line end at cursor position.
  • < Tab char > โ€” Insert a Tab character at cursor position. with option -+8 or -+4 or -+2: Tab expansion; insert as many space characters as needed to fill line up to the next Tab position.
  • ^V < Tab char > โ€” Insert a Tab character (even in Tab expansion mode).
  • HOP {, HOP (, HOP [, HOP < โ€” Enter indented pair of matching parentheses.
  • HOP / โ€” Enter an indented Javadoc comment frame.
  • HOP ' or HOP ๏ฟฝ (acute accent) โ€” Enter an apostrophe (U+2019). Note: In smart quotes mode, ๏ฟฝ alone also enters an apostrophe.
  • HOP ` (grave accent) โ€” Enter a glottal stop / 'okina (U+02BB). Note: In smart quotes mode, ` alone also enters a glottal stop.
  • HOP - โ€” Underline the line that starts before the cursor position.
  • ^O โ€” Make new line at current position. If the current line is terminated by a Unicode paragraph separator, a line separator is inserted. Auto-indentation is not applied.
  • HOP ^O โ€” Split a line in two binary-transparently, i.e. enter a "NONE" virtual line end.

๐ŸŽ€ Accented character input support by accent prefix keys ๐ŸŽ€

Mined defines a number of function keys, modified function keys, modified digit keys, and modified punctuation keys for single and multiple accent composition with a subsequently entered character; for a detailed listing and description, see Accent prefix function keys above. Up to three accent prefix keys can be combined by entering them in sequence in order to compose characters with multiple accents. These functions also work on the prompt line (e.g. to enter search expressions).

  • F5 < character > โ€” Compose character with diaeresis (umlaut accent), e.g. a ๏ฟฝ ๏ฟฝ
  • Shift-F5 < character > โ€” Compose character with tilde, e.g. a ๏ฟฝ ๏ฟฝ
  • Ctrl-F5 < character > โ€” Compose character with ring or with cedilla, e.g. a ๏ฟฝ ๏ฟฝ , c ๏ฟฝ ๏ฟฝ
  • Ctrl-Shift-F5 < character > โ€” Compose character with ogonek.
  • Alt-Shift-F5 < character > โ€” Compose character with breve.
  • F6 < character > โ€” Compose character with acute accent (accent d'aigu), e.g. a ๏ฟฝ ๏ฟฝ
  • Shift-F6 < character > โ€” Compose character with grave accent, e.g. a ๏ฟฝ ๏ฟฝ
  • Ctrl-F6 < character > โ€” Compose character with circumflex accent, e.g. a ๏ฟฝ ๏ฟฝ
  • Ctrl-Shift-F6 < character > โ€” Compose character with macron.
  • Alt-Shift-F6 < character > โ€” Compose character with dot above.
  • Ctrl-0 ... Ctrl-9 โ€” Compose character with accent, esp. for Vietnamese accented characters.
  • (Ctrl-)Alt-1 ... (Ctrl-)Alt-5 โ€” Compose character with two accents, esp. for Vietnamese double accented characters.
  • (Ctrl-)Alt-6 ... (Ctrl-)Alt-8 โ€” Compose character with two accents for Greek multiple accented characters.
  • Ctrl-< punctuation key > โ€” Compose character with accent (looking similar to the modified punctuation character, e.g. Ctrl-, composes with cedilla, Ctrl-: with diaeresis, Ctrl-minus with macron, Ctrl-( with breve, Ctrl-< with caron, Ctrl-/ with stroke, Ctrl-; with ogonek, etc; see Accent prefix function keys above for details).

๐Ÿ’œ Input support commands ๐Ÿ’œ

๐Ÿ›Ÿ Ctrl-V special input support

These functions also work on the prompt line (e.g. to enter search expressions).

  • ^V < control character > โ€” Enter control character.
  • ^V [ or ^V \ or ^V ] โ€” enter one of the control characters ^[, ^\, ^].
  • ^V ^ ^ or ^V _ _ โ€” enter one of the control characters ^^, ^_.
  • ^V ^ ' or ^V ^ " โ€” โ†’NEWโ†’ or ^V ^ + </kbd> or **^V ^ ๏ฟฝ** โ€” enter one of the straight quote marks 'or"` or plain accents (needed in smart quotes mode).
  • ^V < accent > < character > โ€” compose accented character.
  • ^V # xxxx < Space or Enter > โ€” enter character defined by a hexadecimal number being input (depending on applicable encoding, byte value, Unicode value, or valid CJK code is required).
  • ^V # # xxxxxx < Space or Enter > โ€” like ^V # but using an octal number.
  • ^V # = xxxxx < Space or Enter > โ€” like ^V # but using a decimal number.
  • ^V # u or U or + โ€” (followed by a numeric input as described above, with optional # or = for octal or decimal input) interprets the input as a numeric Unicode value which is converted into the current text encoding.
  • ^V # ... Space ... โ€” with numeric character input, mined supports successive multiple character entry according to ISO 14755 if the numeric code is terminated by a Space key.
  • ^V < function key > โ€” this is not an input support function but rather the function key is invoked as if pressed together with the control key.

Mnemonic character input support ๐Ÿง โœจ

Mnemonics recognised include the following, bestie:

  • RFC 1345 mnemos (except mappings to Unicode private use areas); in ambiguous cases, the RFC 1345 mnemos must be entered in long mnemonic input mode, e.g. with "^V pi " rather than "^Vpi".
  • HTML mnemos as listed in HTML living standard, prepended with a "&".
  • TeX mnemos (macros) and substitutes, leaving out any "\".
  • โ†’NEWโ†’ groff glyphs (roff special characters), mnemonics beginning with "(".
  • Supplementary mnemos as listed on the mined character mnemos page.

Unless there is an ambiguous mapping, all two-letter mnemonics can also be entered in reverse order. Slay.

  • ^V < Space > < name > < Space or Enter > โ€” lookup character mnemonic and enter character. RFC 1345 mnemonics take precedence in ambiguous cases.
  • ^V < character > < character > โ€” compose two characters. Non-RFC 1345 mnemonics take precedence in ambiguous cases.
Note: a number of mnemonics are defined with already precomposed base characters (especially for Vietnamese input) which can be used for further composition. ^V can be applied recursively to compose a character for further composition. See examples with ๏ฟฝ below for both cases.

Examples, because this is where it gets iconic:

  • ^V^A โ€” enter Ctrl-A.
  • ^V^[ or ^V[ โ€” enter the escape character.
  • ^V__ โ€” enter Ctrl-_.
  • ^V'e โ€” enter ๏ฟฝ (e with accent d'aigu).
  • ^Vae โ€” enter ๏ฟฝ (the ae ligature).
  • ^V ae' (terminated by Space or Enter) โ€” enter U+01FD (๏ฟฝ with acute).
  • ^V๏ฟฝ' โ€” enter U+01FD (๏ฟฝ with acute).
  • ^V ^Vae' (terminated by Space or Enter) โ€” enter U+01FD (๏ฟฝ with acute).
  • ^V'^Vae โ€” enter U+01FD (๏ฟฝ with acute).
  • ^VOK or ^Vcm โ€” enter the check mark โœ“ (U+2713).
  • ^Vzz or ^V zigzag (terminated by Space or Enter) โ€” enter the downwards zigzag arrow โ†ฏ (U+21AF).
  • ^V-, โ€” enter ๏ฟฝ (the negation symbol).
  • ^V neg (terminated by Space or Enter) โ€” enter ๏ฟฝ (the negation symbol).
  • ^Va* or ^V a* (terminated by Space or Enter) โ€” enter the Greek small letter alpha.
  • ^V ae' (terminated by Space or Enter) โ€” enter the Latin ligature ae with acute accent.
  • ^V euro (terminated by Space or Enter) โ€” enter the Euro character.
  • ^V#20ac (terminated by Space or Enter) โ€” enter the character with hexadecimal value 20AC (which is the Euro character in UTF-8 encoding).
  • ^V#U20ac (terminated by Space or Enter) โ€” enter the Euro character (which has the hexadecimal Unicode value 20AC) encoded in the currently selected text encoding.
  • ^V#+20ac < Space > +20ac < Enter > โ€” enter two Euro characters in successive multiple character entry mode (ISO 14755).

Input method (Keyboard mapping) selection ๐ŸŽน๐Ÿ’…

  • ESC k or Ctrl-Alt-F12 or middle-click on Input Method flag โ€” toggle between current and previously selected input method (or initially the configured standby input method). Note: Alt-k or Ctrl-Alt-F12 also works on prompt line.
  • HOP ESC k โ€” clear input method, i.e. resets keyboard mapping to none (unmapped input).
  • ESC I or ESC K or Ctrl-F12 or right click on Input Method flag (mapping indication in flags area) โ€” open the Input Method selection menu. Note: (Alt-I or Alt-K or Ctrl-F12 also works on prompt line)
  • HOP ESC K โ€” cycle through available keyboard mappings / input methods.

Modifying text ๐Ÿ› ๏ธโœจ

Note on the Home and End keys ๐Ÿ ๐Ÿ”š

Sometimes people expect the "Home" and "End" keys to move the cursor to the beginning or end of line, respectively. In the keyboard usage approach of mined, these functions can easily and quite intuitively be invoked with "HOP left" and "HOP right", i.e. by pressing the keypad keys "5 4" or "5 6" in sequence. So there is enough room left for mapping the most frequent paste-buffer functions to the keypad as described above which is considered much more useful. Use Ctrl-Home and Ctrl-End for the line positioning functions, depending on terminal support and configuration; or use the -k option if preferred to switch keypad key function assignments for the Home and End keys. See Keypad layout above for a motivating overview of the mined keypad assignment features and options.

  • Backarrow or ^H โ€” dual-mode function:
    • If a visual selection is active: cut selected area to paste buffer.
    • Otherwise: delete character left.
    • Smart backspacing: if there is only blank space before the current position in the current line and the line above and auto-indentation is enabled, the auto-undent function (Back-Tab) is performed instead, deleting multiple spaces back to the previous level of indentation.
    • Note: mined tries to map this function to the Backarrow key on the keyboard whether it is assigned to the Backspace or DEL control characters, by inspecting the setting of the terminal interface, see Automatic backspace mode adaptation.
    • Note: โ†’NEWโ†’ Configuration option plain_BS (command line option +Bp) switches the Backarrow key from smart backspacing to plain backspacing, i.e. no auto-undent and only delete one combining character of a combined character. Use Shift-Control-Backarrow to perform smart backspacing then.
  • Ctrl-Backarrow (if key properly configured) or F5 Backarrow โ€” "Delete single": delete only right-most combining accent of combined character left of cursor position. If not next to a combined character: delete character left, avoiding auto-undent function.
  • โ†’NEWโ†’ Shift-Ctrl-Backarrow (if key properly configured) or Shift-F5 Backarrow โ€” "Delete smart": smart backspacing function as described above as default behaviour of the Backarrow key.
  • Del (on keypad) โ€” dual-mode function:
    • If a visual selection is active: cut selected area to paste buffer.
    • Otherwise: delete next character right, including any combining characters.
  • Ctrl-Del (on keypads, if key properly configured) โ€” delete character right, excluding any combining characters.
  • Shift-Del (on small keypad, if key properly configured) โ€” cut selected area to paste buffer.
  • DEL (ASCII character) โ€” if detected to be attached to the keyboard Backarrow key: delete left. (Or delete visual selection, see above.) (Enforce with option -B.) Otherwise: delete right.
  • HOP Backarrow โ€” delete beginning of line (left of current position).
  • ^B โ€” delete character right (next character).
  • ^T โ€” delete next word.
  • ^^ (overridden when used as accent prefix, e.g. with newer xterm) โ€” delete previous word.
  • ^K โ€” delete tail of line (from current position to line-end); if at end of line, delete line end (joining lines).
  • HOP ^K โ€” delete whole line.

Code conversion ๐Ÿ”ข๐Ÿฆ‹

  • ESC X โ€” insert hexadecimal representation of current character code. (In UTF-8 mode, this is the UTF-8 byte sequence of the character in hexadecimal notation.)
  • ... with HOP โ€” insert character with hexadecimal code scanned from text at current position.
  • ESC U โ€” insert (hexadecimal) Unicode value of current character (with either 4/6/8 hexadecimal digits, depending on the value); in CJK or mapped 8 bit encoding mode, the value is transformed from the current text encoding into Unicode.
  • ... with HOP or Ctrl-Shift-F11 โ€” insert character with hexadecimal Unicode value scanned from text at current position; in CJK or mapped 8 bit encoding mode, the value is transformed from Unicode into the current text encoding.
  • ESC A โ€” like ESC U but inserting an octal Unicode value.
  • ... with HOP โ€” like HOP ESC U but scanning an octal Unicode value.
  • ESC D โ€” like ESC U but inserting a decimal Unicode value.
  • ... with HOP โ€” like HOP ESC U but scanning a decimal Unicode value.
  • Alt-x โ€” toggle the preceding character and its hexadecimal Unicode value. The command detects a 2 to 6 hex digit character code with a valid Unicode value, or a non-digit Unicode character, respectively.

Case conversion ๐Ÿ” ๐Ÿ‘‘

  • ESC C or F11 โ€” exchange case (low/capital) of character under cursor. Case mapping is based on Unicode (but applicable in all text encodings). Special handling is applied for:
    • Greek final s
    • Turkish "i" if the effective locale value (environment variables LANGUAGE, TEXTLANG, LC_ALL, LC_CTYPE, LANG) begins with "tr" or "az" โ†’NEWโ†’ or "crh" or "tt" or "ba"
    • case mappings to multiple characters
    • Lithuanian special conditions (locale value begins with "lt")
    • Dutch "IJsselmeer" title casing with Shift-F3 (if the locale value begins with "nl")
    • Japanese characters are toggled between Hiragana and Katakana.
  • โ€ฆwith HOP or Shift+F11 โ€” applies case conversion to the word from the cursor onward.
  • Shift+F3 โ€” cycles the casing of a word between all small, title case, and all capitals (title case = first letter is either a capital or actually a Unicode title case, and the following letters are small). For Japanese script it toggles the word between Hiragana and Katakana. Obsessed, honestly. ๐ŸŽ€

Mnemonic and special conversion

  • ESC _ or Ctrl+F11 โ€” mnemonic character substitution: replaces the two characters sitting at the cursor with a suitable composite character (e.g. an accented one) if it can. With Ctrl+F11, transformations are the same as with the ^V two-letter character input mnemonics. With ESC _, language-dependent preferences may take precedence (see the variations below) according to the current locale environment. Example: ae โ†’ ๏ฟฝ

Special conversion features

  • If the text at the cursor position contains an HTML character tag (starting with "&" and optionally ending with ";"), it's replaced with the actual character it represents. Example: &not; โ†’ ๏ฟฝ
  • If the text at the cursor position contains an HTML numeric character entity (starting with "&#" and optionally ending with ";"), it's replaced with the respective character it denotes. Example: &#x40; โ†’ @ &#64; โ†’ @
  • If the text at the cursor position contains a URL numeric escape notation (starting with "%") it's replaced with the actual character it represents. Example: %40 โ†’ @ %C3%86 โ†’ ๏ฟฝ (while in UTF-8 text encoding)
  • The command also transforms between Latin-1 and UTF-8 encoded characters if an accordingly encoded character is found at the current position; the current character encoding mode is used to determine the target character set. Example: ๏ฟฝ (Latin-1 encoding) โ†’ ๏ฟฝ (current UTF-8 encoding), or ๏ฟฝ (UTF-8 encoding) โ†’ ๏ฟฝ (current encoding)

As variations of ESC _, there are some commands ESC LETTER using national letters that occur on the respective national keyboards. They apply basically the same transformations but with some national preferences taking precedence:

  • ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ โ€” similar to ESC _, but with German transformation preferences. example: ae โ†’ ๏ฟฝ, oe โ†’ ๏ฟฝ
  • ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ โ€” similar to ESC _, but with French transformation preferences. example: oe โ†’ ล“ (oe ligature U+0153)
  • ESC ๏ฟฝ or ESC ๏ฟฝ or ESC ๏ฟฝ โ€” similar to ESC _, but with Danish transformation preferences. example: ae โ†’ ๏ฟฝ, oe โ†’ ๏ฟฝ
  • โœจNEWโœจ ESC ๏ฟฝ or ESC ๏ฟฝ โ€” similar to ESC _, but with Italian accent preferences (๏ฟฝ rather than ๏ฟฝ).
  • โœจNEWโœจ ESC < accented letter typical on East European keyboard > (like l with stroke, u with ring, o with double acute, s with caron, etc) โ€” similar to ESC _, but with East European accent preferences: ogonek rather than cedilla, -d becomes d with stroke.
  • โœจNEWโœจ ESC < special key typical on South European keyboard > (like n with tilde, g with breve, dotless i) โ€” like ESC _.

Encoding conversion

  • HOP ESC ( or Alt+F11 โ€” searches for a character encoded in the "wrong encoding", i.e. a UTF-8 character in non-UTF-8 text mode, or a Latin-1 character in UTF-8 text mode. ๐Ÿ’…
  • ESC _ or ESC ๏ฟฝ etc. โ€” if invoked on a non-ASCII character, UTF-8 / non-UTF-8 character encoding conversion is applied: if the character isn't encoded in the current text encoding, it gets converted into the current text encoding (from UTF-8 or from Latin-1).
  • Alt+Shift+F11 โ€” convert Latin-1 / UTF-8, then search for the next "wrong encoded" character.

Paragraph formatting

  • ESC j ("Clever Justify") โ€” formats the paragraph by word-wrapping according to the currently set right margin value; left margins are derived from the contents of the paragraph and line. Heuristic detection of numbered items automatically triggers appropriate indentation. End-of-paragraph is a line without trailing blank space. โœจ iconic behaviour
  • โ€ฆwith HOP: โ€” same, but end-of-paragraph is considered to be a blank line.
  • ESC J ("Normal Justify") โ€” formats the paragraph by word-wrapping according to the currently set left and right margin values. End-of-paragraph is a line without trailing blank space.
  • โ€ฆwith HOP: โ€” same, but end-of-paragraph is a blank line.
  • ESC < โ€” set left margin for justification.
  • ESC ; โ€” set left margin of the first line of the paragraph only.
  • ESC : โ€” set left margin of the next lines of the paragraph only.
  • ESC > โ€” set right margin for justification.

HTML support

  • ESC H (every first time) โ€” enter an HTML tag (and remember it for subsequent ESC H). (Note that Alt+Shift+H will do the same thing if your terminal is configured appropriately โ€” see the example configuration file Xdefaults.mined in the Mined runtime support library.) The tag can be entered with attributes and values; these will not be repeated in the closing tag (see the next entry on ESC H).
  • ESC H (every second time) โ€” enter the closing HTML tag. Any tag attributes and values entered with the tag (see the previous entry on ESC H) will be left out.
  • HOP ESC H โ€” put text between mark and current position in HTML tags. The "A" tag gets special treatment. ๐Ÿซถ

Text block and buffer operations

Note on the Home and End keys

Sometimes people expect the "Home" and "End" keys to move the cursor to the beginning or end of line, respectively. In the keyboard usage approach of mined, these functions can easily and quite intuitively be invoked with "HOP left" and "HOP right", i.e. by pressing the keypad keys "5 4" or "5 6" in sequence. So there's enough room left for mapping the most frequent paste-buffer functions to the keypad as described above, which is considered much more useful. Use Ctrl+Home and Ctrl+End for the line positioning functions, depending on terminal support and configuration; or use the -k option if preferred, to switch keypad key function assignments for the Home and End keys. See Keypad layout above for a motivating overview of the mined keypad assignment features and options. ๐Ÿ’–

  • ^@ (Ctrl+Space) โ€” or Home (on right keypad) or Shift+Home or ^] or ESC @ or ESC ^ or Stop (sun) or Select (VT100) โ€” set mark (to remember the current location).
  • โ€ฆwith HOP: โ€” go to mark, or (if already on the marked position) toggle rectangular selection.
  • ^Y โ€” or End (on right keypad) or Shift+End or Copy (sun) or Do (VT100) โ€” copy selected text (between mark and current position) to the paste buffer. If rectangular copy/paste mode is selected: copy the rectangular area spanned by mark and current position to the paste buffer.
  • โ€ฆwith HOP: โ€” append to buffer.
  • ^U โ€” or Del (with visual selection) or Shift+Del (small keypad) or Cut (sun) or Remove (VT100) โ€” cut selected text (between mark and current position) to the paste buffer. If rectangular copy/paste mode is selected: cut the rectangular area spanned by mark and current position to the paste buffer.
  • โ€ฆwith HOP: โ€” append to buffer.
  • ^P or Ins or Ctrl+Ins โ€” or Paste (sun) or InsertHere (VT100) โ€” paste contents of the paste buffer to the current position. If rectangular copy/paste mode is selected: paste contents of the paste buffer as a rectangular area to the current position and corresponding positions of subsequent lines. With ^P or Ctrl+Ins, the cursor is placed before the pasted region. With Ins, the cursor is placed behind the pasted region unless the option -V was used. In rxvt, with Ins on the left keypad, the cursor is placed before (left of) the pasted region.
  • โ€ฆwith HOP: (e.g. HOP Ins or ^G^P) โ€” paste from the inter-window buffer. So you can quickly copy text from one invocation of mined to another. ๐ŸŒˆ
  • Shift+Ins (Windows/cygwin version) โ€” insert text from the Windows clipboard, adapting lineend types. With Ctrl+Shift+Ins, the cursor is also placed before the pasted region.
  • Alt+Ins or Ctrl+F4 โ€” replace the text just pasted with the preceding paste buffer. This command uses a ring of paste buffers (like emacs "yank ring").
  • ESC b or Shift+F4 โ€” copy contents of the paste buffer into a file.
  • โ€ฆwith HOP: โ€” append to file.
  • ESC i or F4 โ€” insert file at current position.
  • Print from File menu โ€” print the text being edited (to the default printer).
  • HOP ESC ! or (deprecated) ESC c โ€” invoke an operating system command (prompted for) with the paste buffer as input.
Heads up bestie: ESC c is deprecated โ€” it still works but like, it's giving legacy. Use HOP ESC !. ๐Ÿ’€

Note on case-insensitive searching

Mined applies case-insensitive search pattern matching where the search pattern contains small characters, unless when searching for an identifier (current identifier occurrence, HOP F8, or identifier definition, Alt+t). For a case-sensitive search for a small letter, use a single-letter range expression like [x] or a backslash escape like \x (note, however, that \n and \r have special meaning). ๐Ÿฆ‹

  • ESC / or Find or F7 or F8 or / (on keypad) โ€” search forward (prompts for a regular expression).
  • โ€ฆwith HOP: โ€” search for current identifier.
  • ESC \ or Alt+F7 or Alt+F8 or Alt+/ (on keypad) โ€” search backward (prompts for a regular expression).
  • HOP F8 or Shift+F9 โ€” search for current identifier.
  • HOP Alt+F8 or Alt+Shift+F9 โ€” search for current identifier backward.
  • HOP Shift+F8 or ESC t or Alt+t โ€” search for the definition of the current identifier (using a tags file), or open the file referred to. See ESC t below for further description.
  • HOP Ctrl+Shift+F8 โ€” search for identifier definition (prompts for identifier).
  • HOP Ctrl+F8 or Ctrl+Shift+F9 โ€” search for current character.
  • ^N or F9 โ€” search for the next occurrence (using the previous search expression and direction).
  • โ€ฆwith HOP: โ€” repeat the last but one search; two alternating search expressions can be used with this command. โญ
  • Alt-F9 โ€” Search again (for the last expression), but in the opposite direction. ๐Ÿ”
  • ESC , or Shift-F8 โ€” Global Substitute (prompts for search and replacement strings). ๐Ÿ’…
  • ESC r or Ctrl-F8 โ€” Global Replace with confirmation prompting (first prompts for strings). โœจ
  • ESC R or Ctrl-Shift-F8 โ€” Line Replace: substitute on the current line (prompts for strings). ๐ŸŽ€
  • ESC ( or ESC ) or ESC { or ESC } โ€” Performs one of these matching searches, depending on the text:
    • Search for the corresponding bracket matching the bracket at the current position in one of the pairs (), [], {}, <>, ๏ฟฝ๏ฟฝ. (Nested matching bracket pairs are skipped.) ๐Ÿงš
    • In an HTML or XML file: search for the matching tag (nesting considered).
    • Search for the matching /* */ comment delimiter.
    • Search for matching #if #else/#elif #endif structures (nesting considered).
    • On an #else or #elif directive, the search direction depends on the command character: ESC ( searches backward, ESC ) searches forward. โฌ…๏ธโžก๏ธ
    • In a mailbox file, on any mail header line: search for the next or previous mail message, depending on the command character: ESC ( searches backward, ESC ) searches forward.
    • In a mailbox file or saved mail message, on a MIME separator: search for the next or previous MIME separator, depending on the command character: ESC ( searches backward, ESC ) searches forward.
  • ESC t or Alt-t or HOP Shift-F8 โ€” Search for and move to the location of the definition of the identifier at the current cursor position. This command uses the tags file that can be generated with the ctags command (Unix). It opens another file if necessary and automatically saves the current file then. ๐Ÿ”ฅ
    • On an include statement (line beginning with "include" or "#include"), the command opens the included file.
    • Like with a number of positioning commands, ESC t places the current position on the position marker stack before going to the location of the identifier definition. The command ESC Enter (Alt-Enter) can move back to that position, even if edited files were changed with the command.
  • HOP ESC t or HOP Ctrl-Shift-F8 โ€” Similar, but prompts for the identifier. ๐Ÿซถ
  • HOP ESC ( or Alt-F11 โ€” Search for a character encoded in the "wrong encoding", i.e. a UTF-8 character in Latin-1 mode, or a Latin-1 character in UTF-8 mode. ๐Ÿ‘‘

๐Ÿ” Search expressions: Special functions

  • . โ€” matches any character.
  • ^ (at begin of pattern) โ€” restricts match to the begin of a line.
  • $ (at end of pattern) โ€” restricts match to the end of a line.
  • [< character set >] โ€” matches any one of a set of characters; the set may be given by listing elements, denoting a range < c1 >...< c2 >, or negating the whole set [^< character set >].
  • \< character > โ€” matches the character literally (except n or r).
  • < pattern >* โ€” a star appended to a plain character of any of the patterns above matches a repetition of this pattern (zero or more times); not applicable to line end patterns.
  • ^V^J (a literal linefeed character, entered with ^V prefix) โ€” searches for any real newline (to be used embedded in the search pattern, does not match on last line).
  • \n โ€” searches for a Unix newline (LF) (to be used embedded in the search pattern, does not match on last line).
  • \r โ€” searches for DOS/Windows newline (CRLF) (to be used embedded in the search pattern, does not match on last line).
  • \R โ€” searches for Mac newline (CR) (to be used embedded in the search pattern, does not match on last line).
  • \0 โ€” searches for NUL character, represented as a pseudo line end.
  • ^V^M โ€” searches for CR (carriage return) character embedded in a line.

๐ŸŽ Replacement strings: Special functions

  • & โ€” is replaced by the matched pattern to be replaced.
  • ^V^J or \n โ€” (a linefeed character) embeds a newline (LF character) in the replacement string.
  • \r โ€” (a carriage return character) embeds a CR character in the replacement string.

To change the line end type of a line or all lines, use "Lineend type..." from the Options menu. ๐ŸŒธ

๐Ÿ“‚ File operations

  • ESC w or F2 โ€” Save (write back) current text to file (only if modified). Save file information (editing position etc), create file info file if needed. ๐Ÿ’พ
    • ... with HOP: Save current file position and other editing information in file info file, so that subsequent editing sessions will start at the current position and remember formatting parameters.
  • ESC W or Shift-F2 โ€” Save (write back) current text to file (unconditionally). Also enable memory for file positions in current directory (creates file info file).
  • Alt-F2 โ€” Save As; save current text to file with different name; file permissions (access modes) are preserved and cloned. ๐Ÿฆ‹
  • Ctrl-Shift-F2 or HOP Shift-F2 โ€” Save to file, and enable memory for file positions in current directory (creates file info file).
  • F3 โ€” Edit another file (prompt for save if current text changed).
  • Ctrl-F3 or ESC v โ€” View another file (prompt for save if current text changed).
  • ESC V โ€” Toggle between edit mode and view only mode.
  • ESC q โ€” Quit the editor (prompt for save if current text changed).
  • ESC ESC or Ctrl-F2 โ€” Exit editing current text (save first if changed), continue with the next file (from the File switcher list); exit mined if there is no subsequent file to edit. Note: If a file name occurs on the command line multiple times (explicitly or by wildcard expansion), file list navigation is not linear. Note: There is a small delay after typing ESC ESC. (This is in order to enable recognition of Alt-function key combinations which are implemented by some terminals or terminal modes by prefixing ESC to the function key escape sequence.) This delay can be avoided by using Ctrl-F2.
  • ESC + โ€” Edit the next file (from the File switcher list) Note: If a file name occurs on the command line multiple times (explicitly or by wildcard expansion), file list navigation is not linear.
    • ... with HOP: Edit the last file.
  • ESC - โ€” Edit the previous file (from the File switcher list).
    • ... with HOP: Edit the first file.
  • ESC # โ€” Ask for index into the list of files and edit that file.
  • ^G N # or ESC g N # โ€” Edit Nth file. (^G N f also works.)
  • ESC # # โ€” Reload file currently being edited. ๐Ÿ”„
  • ESC Space or Alt-Space or Shift-F10 โ€” Open Popup menu.
  • ESC F10 or Alt-F10 or Ctrl-F10 โ€” Open first flag menu (Info menu).
  • ESC f or Alt-f or F10 โ€” Open File menu.
  • ESC < letter > or Alt-< letter > โ€” Open menu.
  • ESC I or Alt-I or ESC K or Alt-K or Ctrl-F12 โ€” Open the Input Method selection menu. (Alt-I/Alt-K/Ctrl-F12 also works on prompt line.)
  • ESC Q or Alt-Q โ€” Open the Smart Quotes selection menu.
  • ESC E or Alt-E โ€” Open the Encoding selection menu. ๐ŸŒˆ

โœจ Miscellaneous

  • ESC = < count > โ€” Repeat a command < count > times (prompts for count). Example: ESC=7< cursor down > moves the cursor 7 lines down. Note: If the function to be repeated is a character to be inserted and the input is keyboard mapped to a multi-character sequence, only the first character of the sequence is inserted repeatedly.
  • ESC < count > โ€” Repeat a command < count > times (prompts for rest of count); this short form is only accepted, however, if the repeat count consists of at least two digits (this is to avoid confusion with function key escape sequences of certain terminals). Example: ESC77. enters a line of 77 dots, ESC07x enters "xxxxxxx". ๐Ÿ’€
  • ^V < function key > โ€” Invoke function as if pressed together with the control key. E.g. ^V < cursor-left > moves left into the parts of a combined character just like Ctrl-cursor-left would do (the latter may depend on proper terminal setup).
  • ^\ โ€” Abort current command, e.g. while on prompt line. ๐Ÿ™ˆ
  • ESC ? โ€” Show the current status of the file (name, whether modified, current line, number of lines, characters, and bytes).
    • ... with HOP: Toggle permanent display of text status line. Note that when editing a file that does not fit completely in memory (e.g. large file on old system), this option may cause considerable swapping. In that case, do not use the feature. โš ๏ธ
  • ESC u โ€” Display the character code of the current character in the bottom status line. (In UTF-8 encoded text mode, both the UTF-8 byte sequence and the Unicode value are displayed; in CJK or mapped 8 bit encoded text mode, Han or 8 bit character values and corresponding Unicode values are displayed when applicable.) In non-Latin-1 encoded text mode, additional Unicode information is included, indicating the script, character category, width, combining, and surrogate properties of the character. ๐Ÿ”
    • ... with HOP: Toggle permanent character code display.
  • ESC T โ€” Toggle Tab width. Alternates the width interpretation of Tab characters between 2-4-8.
    • ... with HOP: Toggle Tab expansion (input substitution with spaces).
  • ESC P โ€” Set page length (number of lines that mined assumes to be on a page). (Useful for status display.)
  • ESC a โ€” Toggle append mode (append to text buffer/file instead of overwriting).
  • ESC d โ€” Show current directory / change to another one (also change drive in MSDOS version). The assumed (relative) file path name as well as file permissions (access modes) are preserved.
  • ESC n or Set Name... from File menu โ€” Change the file name associated with the text being edited; the file is not actually saved yet but only the new file name is used for saving the next time. The text is detached from the file previously loaded which is not affected. All current text editing properties (assumed encoding, smart quotes style, margins, ...) as well as file permissions (access modes) are preserved. ๐ŸŽ€
  • ESC . โ€” Redraw the screen.
  • Alt-F12 โ€” (In terminals that support an alternate screen view:) Switch to normal screen (to view command line history and possibly mouse-copy/paste) until next input.
  • ESC l โ€” Make screen lower (decrease number of screen lines).
  • ESC L โ€” Make screen higher (increase number of screen lines). ๐Ÿ’œ
  • ESC % โ€” makes the screen smaller (decrease screen size). Tiny-screen era, but make it fashion ๐Ÿ’…
  • ESC & โ€” makes the screen bigger (increase screen size). Go big or go home, bestie โœจ
  • Shift-keypad-Minus โ€” makes the font smaller. (Works in mintty and natively in xterm.) Lowkey obsessed with how tidy this is ๐ŸŽ€
  • Shift-keypad-Plus โ€” makes the font bigger. (Works in mintty and natively in xterm.) Big font energy, no cap ๐Ÿ”ฅ
  • ESC z โ€” suspends the editor process; first writes back the file if itโ€™s modified (no write if HOPped or if you gave an empty file name when prompted). Mined checks (by looking at process and group IDs and terminals) whether itโ€™s safe to suspend and rejects it otherwise, e.g. if itโ€™s run embedded within a terminal, without an underlying shell, or from a shell script. Safety first, always ๐Ÿซถ
  • ESC ! โ€” forks off a shell and waits for it to finish.
    • ... with HOP: invokes an operating system command (prompted for) with the paste buffer as input.
  • F1 or Help or Alt-h or ESC h โ€” interactive help function. You get offered and prompted for help topics; after entering the initial letter, the respective help section is shown. If another (modified) F1 key, a modified digit key, or a Ctrl-modified punctuation key is entered, a corresponding key assignment help bar is displayed (see F1 F1 etc. below). The help file mined.hlp is installed with the Mined runtime support library. If itโ€™s not installed in one of the standard locations, the environment variable MINEDDIR should be set to point to the directory so mined can find its help file. Help is literally main character energy ๐Ÿ‘‘
  • F1 F1 or Shift-F1 or Ctrl-F1 or Alt-F1 or Ctrl-Shift-F1 or Alt-Shift-F1 โ€” displays a help bar (in the bottom status line) with short indications of the functions assigned to the function keys F2... in the corresponding modified mode (i.e. with Control, Shift, and Alt as requested for the help bar). So iconic for remembering things ๐ŸŒˆ
    • ... with HOP: toggles permanent help bar display.
  • F1 Ctrl-1 or F1 Alt-1 or F1 Alt-Ctrl-1 โ€” displays a help bar (in the bottom status line) with short indications of the accent prefix functions assigned to the digit keys 1..9, 0 in the corresponding modified mode (i.e. with Control and Alt as requested for the help bar). Accent prefix lore, iykyk ๐Ÿงš
    • ... with HOP: toggles permanent help bar display.
  • F1 Ctrl-< punctuation key > e.g. F1 Ctrl-, โ€” displays a help bar (in the bottom status line) with short indications of the accent prefix functions assigned to the Ctrl-modified punctuation keys. Punctuation girlies rise ๐ŸŽ€
    • ... with HOP: toggles permanent help bar display.
  • ESC โ€” while a command is active and prompting (e.g. for a search expression), ESC aborts the current command. Nope out of there respectfully ๐Ÿ’…
  • ESC Space โ€” does nothing, so the Space key aborts the ESC command. The void does nothing, slay ๐Ÿ•ณ๏ธ

๐Ÿ’ป MSDOS keyboard functions ๐Ÿ’ป

  • Ctrl-Alt-Space โ€” set mark (to remember the current location). Little bookmark moment ๐Ÿ“Œ
  • Alt-TAB (not in Windows) โ€” HOP / Go to.
  • Ctrl-* (on keypad) โ€” HOP / Go to.
  • Ctrl-/ (on keypad) โ€” search forward.
  • Alt-/ (on keypad) โ€” search backward.

๐Ÿ“บ Screen size change functions ๐Ÿ“บ

MSDOS screen size changes depend on a table of common VGA video modes (dosvideo.t). In the presence of a TSR driver which can change fonts and screen modes while running a program (e.g. the excellent VGAMAX), the actual change effective may occasionally be unexpected. Mined recognises such changes after the next character input and adjusts to them. Chaotic but self-aware ๐Ÿ˜ญ

  • Alt-- (on keypad) โ€” change video lines mode to the mode with the next smaller number of lines but same number of columns. (The number of lines is first tried to be decreased within the current video mode. If itโ€™s already the lowest, the next video mode is chosen.)
  • Alt-+ (on keypad) โ€” change video lines mode to the mode with the next higher number of lines but same number of columns.
  • Ctrl-- (on keypad) โ€” change video mode to the mode with the next smaller total resolution (lines * columns).
  • Ctrl-+ (on keypad) โ€” change video mode to the mode with the next higher total resolution.
  • HOP Ctrl-/Alt- +/- (on keypad) โ€” several other video mode settings are prompted for (experimental). Experiment era, bestie ๐Ÿงช

๐ŸŒธ Emacs mode ๐ŸŒธ

Mined emulates emacs keyboard layout and some specific functions if invoked with the option -e or with the command name alias minmacs. In emacs mode, emacs command key assignments to control keys, ESC (Meta commands) and ^X (C-X commands) are configured. In addition, the following emacs-compatible changes apply:

  • The mined ESC commands can be reached via M-x. (Function keys remain unaffected.)
  • The Del key (on the small keypad) is configured to delete the previous character.
  • The control key insertion prefix is ^Q.
  • The quit character (e.g. for the prompt line) is ^G.
  • The emacs multiple buffer ring is fully enabled.
  • Paragraph justification mode is set to consider an empty line as paragraph separation by default.
  • Mined ESC commands can be reached via M-x (Alt-X).
  • ^\ (Ctrl-\) is interpreted as an additional HOP key.
  • Keyboard mapping (input method) can be toggled with Ctrl-Alt-F12.

๐ŸŽฎ Command overview

  • ^A, ^B, ^E, ^F, ^N, ^P, ^V, M-v, M-b, M-f, M-a, M-e, M-< , M->, ^X[, ^X] โ€” cursor and screen movement
  • ^D โ€” delete character
  • ^O โ€” insert new line
  • ^Q โ€” insert literal character
  • ^@ โ€” mark position
  • ^W / M-w โ€” cut / copy to buffer
  • ^K โ€” delete to end of line / delete line end, and append to buffer
  • M-d / M-k โ€” delete word / delete end of sentence, and append to buffer
  • ^Y โ€” paste buffer
  • M-y โ€” paste previous buffer, replacing text just pasted
  • M-u โ€” transform word upper-case
  • M-l โ€” transform word lower-case
  • M-c โ€” transform word capitalised (initial upper-case)
  • ^S, ^R โ€” search forward / reverse
  • M-% โ€” replace with confirmation
  • M-. โ€” search for identifier definition (using tags file)
  • ^X^S, ^Xs โ€” save file
  • ^X^W โ€” save file as (using different name)
  • ^X^F โ€” edit other file (prompts for name)
  • ^X^B โ€” edit previous file (among those listed on command line)
  • ^X^C โ€” quit editor, prompt for saving text first
  • ^Xk โ€” discard current edit buffer (after confirmation), open new one
  • ^Xi โ€” insert file
  • ^X= โ€” display file statistics
  • ^L โ€” refresh display
  • ^U, ^X^[ โ€” repeat (not as generic numeric command parameter)
  • ^H โ€” help
  • ^Z, M-z, ^X^Z โ€” suspend editor
  • ^\ (mined add-on) โ€” HOP (generic function amplifier / expander)
  • M-x (Deprecated mined add-on) โ€” invoke mined ESC command
  • ESC ESC (mined add-on) โ€” invoke mined ESC command

๐ŸชŸ Windows keyboard mode ๐ŸชŸ

Mined emulates typical Windows control key functions if invoked with the option +ew; this is enabled automatically when invoking mined via the wined.bat script or from the Windows explorer context menu of a text file. The usual Escape commands and function key assignments of mined also apply in Windows keyboard mode. Also, ^@ and ^_ are included to provide the respective functionality.

  • ^@ โ€” mark position
  • ^C โ€” copy selected text area (between marked and current position)
  • ^F โ€” search
  • ^G โ€” goto
  • ^H โ€” replace (with confirm)
  • ^O โ€” open other file
  • ^P โ€” print
  • ^Q โ€” quit
  • ^S โ€” save file
  • ^V โ€” paste
  • ^W โ€” close file
  • ^X โ€” cut selected text area (between mark and current position)
  • ^_ โ€” insert control character

๐ŸŒŸ WordStar mode ๐ŸŒŸ

Mined emulates WordStar keyboard layout and some specific functions if invoked with the option -W or with the command name alias mstar. The usual Escape commands and function key assignments of mined also apply in WordStar mode. In prefixed two-key commands, the control state and case of the second key does not matter, e.g. ^K^B, ^KB and ^Kb are identical. Case? Never heard of her ๐Ÿ’…

  • ^S, ^D, ^E, ^X, ^A, ^F, ^R, ^C, ^W, ^Z, ^H โ€” cursor and screen movement
  • ^G โ€” delete character
  • ^T โ€” delete word
  • ^Y โ€” delete line
  • ^Q^Y โ€” delete to end of line
  • ^N โ€” insert new line
  • ^P โ€” insert control character
  • ^Q^W, ^Q^Z โ€” scroll multiple screen lines
  • ^Q^F โ€” find
  • ^Q^A โ€” find and replace (with HOP: with confirm)
  • ^L โ€” repeat last search
  • ^Q โ€” HOP key
  • ^Q, ^K, ^O โ€” two-key command prefixes
  • ^Q^Q โ€” repeat following command
  • ^B โ€” paragraph justification (word wrap)
  • ^OL โ€” set left margins
  • ^OG โ€” set left margin for first line of paragraph
  • ^OR โ€” set right margin
  • ^KB โ€” set marker
  • ^QB โ€” goto marker
  • ^Kn โ€” (n=0..9) set marker n
  • ^Qn โ€” (n=0..9) goto marker n
  • ^KK โ€” copy between here and marker (not exactly WS function)
  • ^KC โ€” copy (paste) saved text here (not exactly WS function)
  • ^KY โ€” delete between here and marker (not exactly WS function)
  • ^KV โ€” copy (paste) saved text here (not exactly WS function)
  • ^KW โ€” write paste buffer to file
  • ^KR โ€” read (insert) file here
  • ^KS โ€” write (save) edited text to file
  • ^KD โ€” write (save) edited text to file, edit next file
  • ^KX โ€” exit (and save)
  • ^KQ โ€” quit (don't save)
  • ^KL โ€” change current directory

๐Ÿ’– Configuration of user preferences ๐Ÿ’–

User preferences can be configured in a runtime configuration file $HOME/.minedrc. (On Windows systems, if the environment variable %HOME% is not set, %USERPROFILE%\.minedrc will be used.) It is possible to configure conditional preferences based on file type (filename pattern) or terminal type.

A documented sample file is included in the Mined runtime support library as conf_user/minedrc or in the web documentation.

Volatile preferences when editing multiple files: note that options relating to editing features (such as tabwidth) will be re-established on each file opened, while options relating to interactive behaviour or display features (such as file_chooser sorting options) will remain changed after they are toggled interactively (e.g. from the Options menu), so the preference selected here is volatile for them. Not me learning which preferences are permanent and which are just passing through ๐Ÿ˜ญโœจ

๐ŸŒฑ Environment interworking and configuration hints ๐ŸŒฑ

A number of configuration options have already been addressed throughout the manual page. A few more configuration features are mentioned here. For more details, examples, and other display settings see the example script conf_user/profile.mined in the Mined runtime support library.

๐ŸŒธ Mined runtime support library ๐ŸŒธ

okay so bestie, the mined distribution ships with a whole little ecosystem of runtime support files (they live in the subdirectory usrshare). If mined gets installed into standard locations, those files are copied to one of these directories โ€” depends on your operating system and your installation options, no cap:

/usr/share/mined, /usr/share/lib/mined, /usr/local/share/mined, /opt/mined/share, $HOME/opt/mined/share

Mined runtime support includes, and I'm listing everything because she's thorough:

  • Package documentation
    • package_doc/* โ€” mined package overview, introduction, change log, license
  • Web documentation
    • doc_user/* โ€” a copy of the homepage / web documentation, including the HTML version of the mined manual page โœจ
  • Interactive help
    • help/mined.hlp โ€” the help file (for F1 commands)
  • Configuration example files
    • conf_user/minedrc โ€” user preferences configuration sample file; copy it to $HOME/.minedrc (on Windows systems, if the environment variable %HOME% is not used, copy the sample file to %USERPROFILE%\.minedrc)
    • conf_user/profile.mined โ€” shell commands to set environment variables for mined, a template for inclusion in $HOME/.profile
    • conf_user/Xdefaults.mined โ€” xterm configuration entries suitable for mined, a template for inclusion in $HOME/.Xdefaults or $HOME/.Xresources
    • conf_user/xinitrc.mined โ€” shell commands to activate Xdefaults.mined, a template for inclusion in $HOME/.profile
    • conf_user/kp5 โ€” shell script to assign the X key symbol Menu to the middle keypad key ("5") as a remedy to the inability of the KDE konsole terminal to recognise that key (due to a deficieny in the QT framework), thus enabling the HOP key in konsole
    • conf_user/mlterm/main โ€” mlterm configuration to enable Alt-key detection, for inclusion in $HOME/.mlterm/main
    • conf_user/mlterm/key โ€” mlterm configuration for modified (shifted etc) function keys, for inclusion in $HOME/.mlterm/key
    • conf_user/konsole/xterm-modified.keytab โ€” KDE konsole keyboard configuration providing a terminal (called "xterm with key modifiers" in the konsole menu) with modified (shifted etc) function keys
    • conf_user/terminator/options โ€” option to be added for the Terminator Java terminal to enable Alt-letter functions
    • conf_user/MINED-VMS.COM โ€” commands to define mined commands and set up help for DCL on VMS
  • Scripts to be used at runtime
    • bin/uprint โ€” script for printing a Unicode file, using either paps or uniprint for formatting; under Windows, it can also use notepad /p for printing
  • Scripts to start mined
    • bin/uterm โ€” script to invoke xterm in UTF-8 mode; it should also be installed into the system binary path and has its own manual page
    • bin/mterm โ€” script to invoke mlterm with suitable options (for bidi support)
    • bin/umined โ€” script to start mined in a separate xterm window, using UTF-8 mode with the most recent version of Unicode width data (specifying wide and combining characters) as built-in to xterm
    • bin/xmined โ€” script to start mined in a separate xterm window, using the same encoding mode as currently set
    • bin/wined โ€” (on Windows) cygwin script to start mined in a window (using the mintty terminal, applying Windows look-and-feel)
    • bin/wined.bat โ€” (on Windows) command script to start a mined window in Windows keyboard emulation mode
  • Files to setup a mined installation
    • setup_install/mined.desktop โ€” KDE desktop entry to start mined in an xterm from a menu entry, using the uterm script
    • setup_install/mined.ico โ€” Cygwin/X desktop icon for adding mined to the Cygwin-X Editors section in the Windows Start menu
  • Scripts to configure an environment for mined
    • setup_install/bin/configure-xterm โ€” sample configuration script to build xterm with recommended configuration options
    • setup_install/bin/makeprint โ€” script to search for or retrieve and build the uniprint program from the yudit package
    • setup_install/bin/installfonts โ€” script for downloading the Unicode-enhanced X screen fonts and installing them with your X server
    • setup_install/bin/bdf18to20 โ€” script to transform an 18x18 pixel double-width screen font into a corresponding 20x20 pixel font matching the 10x20 single-width font (which is much nicer than the 9x18, fr fr)
    • setup_install/cyg/* โ€” optional postinstallation (not in use) for cygwin to install mined with the Windows desktop and the Cygwin/X menu
    • setup_install/win/* โ€” installation of the Windows stand-alone version

๐Ÿ–ฅ๏ธ PC versions ๐Ÿ–ฅ๏ธ

For Windows with a cygwin system (http://cygwin.com/), mined is available as a cygwin package.

Two other versions are available for DOS/Windows systems, and yes, both of them:

  • Stand-alone Windows version, compiled with cygwin. It runs in a Windows console, Windows terminal (e.g. mintty), or X terminal. It is packaged together with mintty. Its installation registers its invocation (in mintty) from the Windows context menu for text files.
  • DOS version, compiled with djgpp. It runs on plain DOS (with some special support of FreeDOS codepage configuration) or in a Windows console window (DOS command window) but not in a typical terminal application like mintty or xterm. It supports long file names in Windows 98/2000/XP/... (not NT4.0).

See the mined web site https://mined.github.io for download ๐Ÿ’–

For hints on PC-specific terminal configuration issues, see PC terminals below.


๐Ÿ’œ VMS version ๐Ÿ’œ

Mined runs on OpenVMS, with a number of specific adaptations, especially in file handling. Buckle up:

  • Options containing capital letters need to be quoted, e.g. MINED "-Qa" [-]*.com. Mined options can also be passed in the symbol MINED$OPT.
  • Filename wildcard expansion is applied, accepting both Unix-like and VMS-native subdirectory notations.
  • File versions can optionally be specified and are handled properly; for example, an explicit version opened for editing can be saved and will be the most recent version as expected.
Note: to combine wildcards with version specifications, use VMS-native pathname notation (and do not use a final ; without version specification), e.g.: []x*;* to edit all versions of all files x*; [.cmd]x*;1 to edit version 1 of all files cmd/x*
  • The file chooser accepts Unix-like or VMS-style directory notations for navigation. Switching to the current directory (TAB or Enter) which is the first entry of the file chooser list, displayed in VMS style, turns the file list into a VMS-style listing of all file versions. Logical names can be used for direct navigation if a final ":" is included (like SYS$LOGIN:).
  • Note that opening the file chooser may be slow on large directories. ๐ŸŒ
  • If the terminal window is resized while mined is running, mined will notice and adjust after an explicit refresh (ESC .). The system, however, is not notified of the changed window size in this case. Please resize (again) when back on the command line.
  • The capability to accept terminal copy-paste is limited by the VMS 80 character input buffer (not limited on emulated VMS, e.g. on "Personal Alpha"). For some remote terminals (mintty, rxvt), full Unicode data version detection is disabled to reduce start-up delay.
  • The file info memory files are called .$mined instead of .@mined, recovery files are called $name$ instead of #name#.
  • In the VAX version, CJK character encodings, Han character information, and Unicode character information tables are not included by default. Alpha and IA64 versions include all Unicode and character encoding features.
  • For hints related to the DECterm window, see below.

See the template script MINED-VMS.COM in the conf_user subdirectory of the Mined runtime support library or the file README.vms (MINED.README in the VMS binary package) for installation hints.


๐Ÿ“ฑ Android version ๐Ÿ“ฑ

There are a number of deviations from typical Linux systems; mined provides workarounds where necessary. Mined runs on Android with these Apps installed:

  • C4droid (needed as container for gcc)
  • GCC for C4droid (to compile mined)
  • Better Terminal (recommended, for shell and terminal)
  • UniversalAndroot (to access gcc from terminal shell) for Android < 4

๐Ÿ–ค Terminal environment ๐Ÿ–ค

For terminal-specific hints, see Terminal interworking problems below.

On Unix, the terminal type is determined from the environment variable TERM. The termcap/terminfo mechanism is used to derive the actual properties of the terminal; for some terminals (cygwin, xterm, rxvt, vt*), this information is also built-in as a fallback in case terminal information is not available on a system (this is especially useful for the cygwin stand-alone version). iconic behaviour, honestly ๐Ÿซถ

Okay so terminal feature recognition? It's lowkey tied to TERM being set to one of these: xterm, linux, vt100, sun*, cygwin, rxvt, *ansi*, 9780*, hp*, xterm-hp, superbee*, sb*, microb*, scoansi*, xterm-sco, cons*, att605-pc, ti_ansi, mgterm. Non-trivial screen features (like scroll reverse, add/delete line, erase multiple characters) are used if their support is indicated in the termcap/terminfo description of the terminal unless other information is available (e.g. after terminal version detection, an older xterm is supposed not to support erase characters). Since colour support is often not configured within terminfo but modern terminals do support it, mined always tries to apply colour attributes (if the terminal at least supports ANSI control sequences). A number of other "best practice" approaches are taken to optimize the usage of terminal capabilities, esp. covering different methods of graphics display support (for menu borders).

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 alone (which it considers however since mined 2000.14); 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. Cute, right? ๐ŸŽ€

๐ŸŒ Locale configuration ๐ŸŒ

The locale mechanism as implemented on modern systems has a number of design problems, one being 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 extends the locale environment variable mechanism with the variable TEXTLANG which is only considered for assumed text encoding (with precedence over the standard locale variables), and also considers LANGUAGE with precedence. If one of these additional locale variables (LANGUAGE or TEXTLANG) is used, mined also implicitly enables smart quotes. Also mined provides command line parameters to explicitly override either text or terminal encoding (UTF-8 terminal encoding, however, is always auto-detected if the terminal provides the information).

  • For text encoding, mined checks the variables LANGUAGE, TEXTLANG, LC_ALL, LC_CTYPE, LANG in this order.
  • For terminal encoding, mined checks the variables LC_ALL, LC_CTYPE, LANG in this order.
  • Explicit command line parameters are available to specify either terminal encoding (+E) or text encoding (-E). They override environment variable settings.
  • UTF-8 terminal auto-detection overrides other terminal encoding settings.
  • Text encoding auto-detection overrides environment settings but not command line settings.
  • Assumed text encoding can be switched while editing.

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 character encoding suffixes ("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. For encoding recognition from command-line parameters, mined provides the following options:

  • -EX or +EX โ€” 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 (as reported by the locale charmap command).
  • -E.suffix or +E.suffix โ€” with a character encoding suffix ("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.
  • โ†’NEWโ†’ -E- or -E โ€” disables text encoding auto-detection which is then derived from the locale environment.

In these options, -E specifies text encoding while +E would specify terminal encoding to be assumed.

The following table lists encodings and major codepages that are recognised by a generic locale suffix or country code; in addition (as mentioned above), a large number of locale names without encoding suffix as found on various systems is 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 (includes CP950) โ€” suffixes: .BIG5* / .Big5* / .big5* / _HK / _TW (_TW ambiguous, following encoding overrides)
  • Simplified Chinese: GB18030 (includes CP936, 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: EUC-JP โ€” suffixes: .EUC-JP / .eucjp / .eucJP / .ujis / _JP.EUC / _JP / .euc (.euc ambiguous, more specific string overrides)
  • Japanese: Shift_JIS / CP932 โ€” suffixes: .Shift_JIS / .shiftjis / .sjis / .SJIS
  • Korean Unified Hangul: UHC / CP949 (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, Byelorussian 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
  • Armenian: ARMSCII โ€” suffixes: .ARMSCII-8
  • 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 LANGUAGE=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

Selecting UTF-16 text mode: To tell mined to interpret a file (or make a new file) in UTF-16 encoding, use the following command line options (first two little endian, then big endian):

mined -E:61
mined -E=UTF-16LE
mined -E:16
mined -E=UTF-16BE
mined -E=UTF-16

Selecting ASCII terminal mode: To tell mined to assume that a terminal cannot display anything but ASCII characters, use the command line option +E:AS. mined implicitly assumes this setting if the environment variable TERM indicates a VT52 terminal. ๐Ÿ’…

๐Ÿ–ฅ๏ธ PC terminals ๐Ÿ–ฅ๏ธ

Character encoding of PC terminals is an even greater mess than on Unix systems. mined provides heuristic best-guess assumptions about terminal encoding, supporting both local invocation as well as remote login from a PC (e.g. to a Unix machine).

The following assumptions are made based on environment variables or command-line parameters:

  • CP850 (PC mapping of Latin-1 character set) โ€” environment: TERM=ansi, ansi-nt, pcansi*, hpansi*, interix* or TERM=cygwin and CYGWIN contains "codepage:oem" or LC_*/LANG indicates ".CP850"; option: +EP.
    • Windows console (DOS prompt) window
    • Windows console mode telnet (even if called from cygwin console, sets TERM=ansi)
  • CP437 (IBM PC VGA encoding) โ€” environment: TERM=nansi*, ansi.*, opennt*, *-emx* or LC_*/LANG indicates ".CP437"; option: +Ep.
    • plain DOS
  • CP1252 (Windows ANSI extension of Latin-1) โ€” environment: TERM=cygwin (unless LC_*/LANG or CYGWIN indicates other encoding); option: +EW.
    • cygwin 1.5 console or application
    • older Windows GUI telnet (sets TERM=ansi)
  • UTF-8 โ€” environment: LC_*/LANG indicates ".UTF-8" or (for cygwin 1.7 beta) TERM=cygwin and CYGWIN contains "codepage:utf8"; option: +U.
    • cygwin 1.7 console or application configured for UTF-8 mode
    • Note: Windows console in UTF-8 mode provides extended Unicode font support if you select "Lucida Console" TrueType font from its Properties menu.
  • other codepages โ€” environment: LC_*/LANG indicates codepage, e.g. ".CP1250" or ".CP858" or triggered by DOS codepage information (djgpp version, see note); option: +E=CP1250 or other codepage, or respective shortcut.
    • cygwin 1.7 console or application configured for respective codepage

Note: okay bestie, here's the tea: the terminal-encoding guess mined makes might not match your actual terminal encoding. Example: mined literally cannot figure it out from the ambiguous setting TERM=ansi. And the environment variables that would tell it the character encoding are, unfortunately, not maintained through telnet or remote login. Setting TERM explicitly to a suitable value after remote login may help, but it may not always work โ€” e.g. pcansi is not a known terminal on SunOS. Explicitly setting locale variables, e.g. LC_CTYPE, may indicate the encoding to mined but may cause trouble otherwise; some systems like SunOS are dogmatic about interpreting locale variables and strictly ask corresponding locale data to be installed, or they will flood you with bogus error messages. Also, not all encodings, especially PC "codepages", are known as a "locale charmap" on other systems. In these cases, you can 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: the encoding emulated by cygwin (as configured, or by default typically CP1252 for cygwin 1.5, UTF-8 for cygwin 1.7) is not the encoding natively applied by the Windows console window (by default typically the DOS codepage CP850). This means the effective encoding may be different if you invoke the cygwin-compiled mined version and the djgpp-compiled mined version alternatingly; you may notice this by a different range of characters that can be displayed when opening the same file with the two mined versions. Some Windows Latin characters are poorly displayed by the Windows console in default configuration; cygwin 1.7 can display all characters properly if the Windows console font is configured to "Lucida Console" rather than "Raster Fonts". In a cygwin console on a non-cygwin system (after remote login), mined assumes ASCII as the terminal encoding by default unless properly indicated by environment variables.

Note: the following DOS codepages are supported; they are mainly provided as terminal codepages, and they do not appear in the Encoding menu. But if you need, you can ask mined to use them as either the assumed terminal encoding (e.g. +E=CP1250 or +E:WE) or even text encoding (e.g. -E=CP1250 or -E:WE) using the names or shortcuts from this list:

  • โ†’NEWโ†’ VGA / VG โ€” VGA (CP437 plus graphics in control character range)
  • CP437 / PC โ€” DOS US
  • CP720 / DA โ€” โ†’NEWโ†’ DOS Arabic
  • CP737 / 37 โ€” DOS Greek
  • CP775 / 75 โ€” DOS Baltic
  • CP850 / PL โ€” DOS Western European
  • CP852 / 52 โ€” DOS Central European
  • CP853 / 53 โ€” South European, Esperanto
  • CP855 / 55 โ€” DOS Cyrillic
  • CP857 / 57 โ€” DOS Turkish
  • CP858 / 58 โ€” DOS Western, CP850 with Euro symbol
  • CP860 / 60 โ€” DOS Portuguese
  • CP861 / 61 โ€” DOS Icelandic
  • CP862 / 62 โ€” DOS Hebrew
  • CP863 / 63 โ€” DOS French Canadian
  • CP864E / 64 โ€” DOS Arabic (CP864E, variant of AR864 (superset of CP864))
  • CP865 / 65 โ€” DOS Nordic
  • CP866 / 66 โ€” DOS Russian
  • CP869 / 69 โ€” DOS Modern Greek
  • CP874 / TI โ€” Windows Thai, superset of ISO-8859-11/TIS-620
  • CP1125 / 25 โ€” DOS Ukraine
  • CP1131 / 31 โ€” โ†’NEWโ†’ DOS Byelorussian/Ukrainian
  • CP1250 / WE โ€” Windows Central European
  • CP1251 / WC โ€” Windows Cyrillic
  • CP1252 / WL โ€” Windows Western European
  • CP1253 / WG โ€” Windows Greek
  • CP1254 / WT โ€” Windows Turkish
  • CP1255 / He โ€” Windows Hebrew
  • CP1256 / WA โ€” Windows Arabic
  • CP1257 / WB โ€” Windows Baltic
  • CP1258 / WV โ€” โ†’NEWโ†’ Windows Vietnamese

Note: for the djgpp version of mined, even the font chosen for the Windows console window may affect the effective display encoding. Configure "Raster Fonts" (except of size "10 x 20"!), not "Lucida Console", in order to make sure the effective visual codepage is the same as the one selected with the respective DOS tools (e.g. chcp) and assumed by mined.

Note: mined (djgpp) tries to determine the DOS/Windows codepage using the DOS API; this can only work if the codepage was properly configured with DOS means (e.g. with CP858 using CHCP 858 or MODE CON CP SELECT=858, maybe enabled by DEVICE=...\DISPLAY.SYS CON=(EGA,858) on old DOS, or MODE CON CP PREP=((codepage list) ...\ega.cpi)); if only the font is switched to a differently encoded one, there is no way to detect this โ€” in this case you can still use environment setting or the +E option as described above to indicate the terminal encoding.

Note: to enable mouse operation in a Windows console window, deactivate "QuickEdit mode" in the properties menu.

Note: if the DOS screen size is changed by a TSR (e.g. VGAMAX using a hotkey), mined does not notice this immediately; in that case, mined adjusts its screen display only after the next key is typed.

Note: running mined (djgpp) 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.

โœจ Terminal setup and configuration โœจ

The Mined runtime support library includes a number of configuration files providing settings that should be applied to various terminals for proper operation of several features as described throughout this manual:

  • Xdefaults.mined for major X Windows terminals: xterm, rxvt, some CJK xterm derivates (cxterm, kterm). The script xinitrc.mined (and optionally kp5) can be used to establish the suggested settings.
  • konsole/xterm-modified.keytab for KDE konsole keyboard definitions
  • mlterm/key and mlterm/main for mlterm keyboard definitions
  • terminator/options for terminator keyboard definitions

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 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.

๐Ÿ’€ Terminal interworking problems ๐Ÿ’€

With some terminals, problems are known due to missing terminal features or terminal bugs:

any terminal: menu border display

  • If the borders of mined menus appear as letters rather than graphic borders, the terminal can unexpectedly not handle VT100 graphics. Use the option -Qa to switch to ASCII borders, or -fff to limit font assumptions. In a UTF-8 terminal, mined uses Unicode Box Drawing characters by default. If they don't display they are missing in the font used by the terminal. Use the option -Qv to switch to VT100 graphics or -Qa to switch to ASCII graphics. If borders are visible but without corners, use -Qs to switch to simple rectangular borders.

any terminal: slow terminal feature auto-detection

  • On a slow remote terminal connection, escape sequences from the terminal (sent for function keys or requested terminal responses) may get delayed and split up. Mined tries to handle delayed parts of escape sequences graciously; however, this is limited as the explicit ESC key shall also be recognised. If messages like "Late screen mode response - ..." (after startup), "...awaiting slow terminal response" (esp. after startup), "...awaiting slow key code sequence" or "...absorbing delayed terminal..." occur, escape sequence detection may be adjusted by setting the environment variable ESCDELAY to a value of 2000 or 3000. (Delay during startup may apparently also be caused by on-demand font loading of rxvt or mlterm, however, mined applies special handling for this case.)
  • If proper terminal detection fails for delay reasons, mined may especially not be aware of the terminal encoding (and display line markers as blocks). In this case, exiting and restarting mined should resolve the issue.

xterm

  • To enable proper Alt-letter command input (for opening and navigating menus), set the xterm resource metaSendsEscape to true (or with older versions of xterm, set eightBitInput to false) in your X configuration (usually $HOME/.Xdefaults or $HOME/.Xresources) as suggested in the example file Xdefaults.mined in the Mined runtime support library.
  • okay so real talk about keypads ๐Ÿ’… โ€” it is literally a waste of keyboard resources to have two indistinguishable sets of keypad keys, and most terminals provide no means of distinguishing them towards the applications, at least not by default. For a text editor this is highkey tragic, because being able to tell them apart gives you a rich intuitive function key mapping at disposition, which is exactly what mined tries to achieve. One approach to improve mapping of useful key functions would be actual keyboard remapping (applicable on some terminals); bestie, thatโ€™s a delicate approach though, because it may create incompatibilities with other programs that rely strictly on installed terminfo information. Mined provides remapping recommendations for shifted keypad keys (with Shift, Control, Alt and combinations of them) in the configuration sample files Xdefaults.mined (for xterm), konsole/xterm-modified.keytab (for KDE konsole), and mlterm/key (for mlterm), in the Mined runtime support library. Due to the compatibility limitations mentioned above, however, the two Ins keys remain indistinguishable, and the two Del keys are only distinguishable if the xterm configuration resource *VT100*deleteIsDEL is set. Also, keypad and function key modification with Alt is ensured with the xterm resource *VT100*metaSendsEscape. Both resources are set to true in the configuration sample file just mentioned. These two resources can also be set dynamically with xterm. Mined can be told to do so with the command line option +D. (Unfortunately this handling cannot be enabled by default as it cannot be undone because the previous state cannot be detected.) ๐Ÿ˜ญ
  • version detective era ๐Ÿ” โ€” Mined determines the xterm version in order to apply certain workarounds conditionally.
  • If you run xterm in VT220 keyboard mode (using xterm option -kt vt220 or setting the configuration resource *keyboardType: vt220) you should make sure to also set the environment variable TERM=vt220 (e.g. using the xterm option -tn vt220 or setting the configuration resource *termName: vt220) so mined can properly set up the keypad functions.
  • If you run xterm with the resource modifyCursorKeys or modifyFunctionKeys set to value 1, mined will recognise the according keyboard sequences with the environment variable setting TERM=xterm-sco.

๐Ÿฆ‹ xterm on cygwin

  • On cygwin, as on other systems, the script uterm is recommended to invoke an xterm that is properly configured to run UTF-8, and also to use a best choice of fonts for optimal Unicode coverage. See README.cygwin for more detailed advice. ๐Ÿซถ

๐Ÿฆ‹ xterm legacy CJK width mode

  • Mined auto-detects and supports xterm legacy CJK width compatibility mode (xterm -cjk_width); character width and menu border layout are properly adjusted, stylish menu borders (-QQ) and fine-grained scroll bar display are disabled by default. (Note: In this mode, combining characters could unexpectedly change the width of a character by being substituted with its wide precomposed form (e.g. 'a' combined with U+0300) โ€” which an application can hardly handle; this bug was fixed in xterm 224 with a patch contributed by the mined author.) โญ

๐Ÿฆ‹ rxvt

  • When starting mined in a fresh rxvt terminal, and maybe even after starting your X server, some display (font?) initialization may take extremely long. If this results in an error message, restart mined to ensure proper terminal properties auto-detection. ๐Ÿ˜ฎโ€๐Ÿ’จ
  • Rxvt does not distinguish between Shift-F1 and F11 / Shift-F2 and F12 / Ctrl-Shift-F1 and Ctrl-F11 / Ctrl-Shift-F2 and Ctrl-F12, so that the F1 and F2 keys modified with Shift cannot be recognised in rxvt by default. They can however be enabled with the keysym definitions in the file Xdefaults.mined in the Mined runtime support library.
  • In rxvt, the two keypad Del keys (small keypad, numeric keypad) are automatically distinguished from each other and invoke the Delete character (small keypad) and Cut (numeric keypad) functions, respectively (Ctrl-/Shift-/Alt- alternatives are supported as described in this manual). This works, however, only if mined can recognise rxvt; it is generally a bad idea to set TERM=xterm in rxvt, see also hint below. ๐Ÿ™ˆ
  • Also in rxvt, the two keypad Ins keys (small keypad left, numeric keypad right) are distinguished. The left Ins key positions the cursor left of the pasted region, the right Ins key positions it right. ๐ŸŽ€
  • By setting rxvt in the mode that enables distinction between the two keypads, it can unfortunately not distinguish the right keypad modified with Ctrl- anymore, so Ctrl-Home/End/Del cannot work as desired. ๐Ÿ’€
  • Ctrl-modified punctuation keys can be enabled by following the configuration samples of the file Xdefaults.mined in the Mined runtime support library. Note: Ctrl-modified and shifted punctuation keys interfere with ISO 14755 input mode of rxvt; if the following key is entered twice, that mode is aborted and the modified punctuation key becomes effective as an accent prefix in mined.
  • To enable proper Alt-letter command input (for opening and navigating menus), set the rxvt resource meta8 to false in your X configuration (usually $HOME/.Xdefaults or $HOME/.Xresources) as suggested in the example file Xdefaults.mined in the Mined runtime support library.
  • Later rxvt-unicode provides a CJK terminal emulation. CJK display is buggy for characters that rxvt thinks cannot be displayed, especially for GB18030 (LC_CTYPE=zh_CN.gb18030 rxvt) but also e.g. for EUC-JP (LC_CTYPE=ja_JP.eucjp rxvt); single bytes are then interpreted instead which amounts to an unpredictable screen width and cannot be correctly handled. (This applies mainly to character codes that are not mapped to Unicode but also to many that are mapped.) Moreover, CJK width handling is inconsistent for many characters in rxvt CJK mode (rxvt claims to adhere to the locale mechanism in this respect but that's not the case here โ€” character widths are inconsistent with the locale, too). Remedy: Don't use rxvt in CJK-encoded mode; mined CJK terminal support is tailored to native CJK terminals (such as cxterm, kterm, hanterm) where it works fine โ€” if you use a UTF-8-capable terminal, use it in UTF-8 mode! Mined can edit CJK-encoded files well in a UTF-8-encoded terminal. ๐ŸŒˆ
  • In rxvt, Unicode characters that are Not Assigned are always displayed as a single-width replacement character. This is not consistent with xterm behaviour which would display them as a double-width replacement if they are located within a double-width Unicode range (which sounds reasonable). This would cause display positioning inconsistencies. Mined has a workaround for some of these cases (assuming that rxvt runs the most recent Unicode width data version available; or actually the same as mined assumes โ€” handling of multiple auto-detected terminal Unicode versions does not cover this special case). ๐Ÿงš
  • If the X windows server has duplicate fonts installed under a common name (e.g. if it comes with a 10x20 non-Unicode font and you install a 10x20 Unicode font in addition), rxvt seems to use the wrong (i.e., non-Unicode) version of the font and does not find special characters like the default marker used in the flags menus (this was observed since rxvt 7.5, rxvt 5.8 was finding the proper font). Use the mined option -F to adapt mined to limited font usage, or fix the X server installation. Or use the script uterm to start rxvt-unicode. To start rxvt-unicode from an xterm, use uterm -rx. ๐Ÿ”ฅ
  • Due to the scrollbar display workaround for hanterm (see above), the scrollbar position may be shown as blank space instead of coloured (only in rxvt CJK mode with Korean encoding and if you explicitly set TERM=xterm which you shouldn't anyway in rxvt). In this case, coloured scrollbar foreground can be enabled with the environment variable MINEDSCROLLFG="44;36" or MINEDSCROLLFG="38;5;45". ๐Ÿ“
  • As a workaround for an xterm bug on cygwin, mined applies terminal size re-adjustment. This may confuse rxvt (being resized to an unexpectedly large window) if it pretends to be xterm. Remedy: in rxvt, make sure that the environment variable TERM=rxvt (or rxvt-unicode); the according X resource (Rxvt.termName: rxvt) is also listed in the file Xdefaults.mined in the Mined runtime support library.
  • rxvt version check besties โ€” Mined determines the rxvt version in order to use certain features conditionally.
  • CJK-mode rxvt: rxvt has some character width bugs when running in CJK encoding; e.g. when running rxvt in Big5 terminal encoding (locale zh_TW), U+FA18 is displayed with wrong screen width while in older version U+FFED was display with wrong screen width; when running rxvt in Shift_JIS terminal encoding, a number of character width bugs occur. Mined does not implement workarounds for those; in general UTF-8 terminal encoding is advisable to be on the safe side. ๐Ÿ’œ

๐Ÿฆ‹ urxvt

  • This is rxvt-unicode as packaged for cygwin. Invoke it with a proper locale environment variable set to enable UTF-8. See also README.cygwin for more detailed hints. ๐ŸŒธ

๐Ÿฆ‹ mlterm

  • Bidirectional display handling of mlterm is based on the final display, not regarding any context (such as positioning control, that's why mined implements a workaround for menu display on mlterm). Since version 3.0.7, mlterm supports logical order mouse positioning over right-to-left lines.
  • For Shift selection, use the small keypad. ๐Ÿ‘‘
  • Recent mlterm before version 3.1.3 has a problem with colour control that may render text unreadable. ๐Ÿ’…
  • In recent mlterm versions, Control-function keys cannot be used in mined since they are captured as mlterm hotkeys. Use a Control-V prefix as a workaround. โœจ
  • (Not essential anymore with recent mlterm versions) The Mined runtime support library includes a configuration file mlterm/key which defines enhanced escape sequences for function keys and other modified keys so the functionality described in this manual can actually work. It also enables the keypad on systems lacking its configuration for mlterm. It is essential to use this configuration especially for the HOP key (keypad "5"), which is oppressed by mlterm by default, and also for Control-punctuation accent prefix functions, and some others. ๐ŸŽ€
  • In old versions of mlterm, mouse wheel scroll navigation in menus did not work seamlessly due to incorrect escape sequences. ๐Ÿ˜ญ
  • Do not use mlterm option -n! It may produce display garbage on unknown and other characters. ๐Ÿ’€

cxterm

  • Proper configuration is needed to ensure cxterm uses a non-CJK font of appropriate size to avoid ragged display: parameter -fn "-misc-fixed-medium-r-normal--18-*-*-*-*-*-*-*" or X resource cxterm*font: -misc-fixed-medium-r-normal--18-*-*-*-*-*-*-*. โœจ
  • EUC-JP half-width characters (8EA1-8EDF) are not properly displayed by cxterm in EUC-JP mode (cxterm -JIS, not available in "classic" cxterm). ๐Ÿซ 
  • Due to the scrollbar display workaround for hanterm (see above), the scrollbar position may be shown as blank space instead of coloured โ€” only in Korean encoding mode, which is probably rarely used with cxterm anyway. In this case, coloured scrollbar foreground can be enabled with the environment variable MINEDSCROLLFG="44;36" or MINEDSCROLLFG="38;5;45". ๐ŸŒˆ
  • Note: The configuration sample file Xefaults.mined in the Mined runtime support library includes a section to fix some missing keypad assignments, especially the HOP key (keypad "5") which is ignored by cxterm by default, and the Home and End keys of the numeric keypad. ๐ŸŽฏ

kterm

  • Auto-detection of kterm as a CJK terminal works if the environment variable TERM indicates "kterm"; otherwise mined has to be told that it runs in a CJK terminal and which encoding to use:
    • For kterm -km sjis, set LC_CTYPE=ja_JP.sjis (or invoke mined +ES).
    • For kterm -km euc, set LC_CTYPE=ja_JP.eucjp (or invoke mined +EJ).
  • Note: The configuration sample file Xefaults.mined in the Mined runtime support library includes a section to fix some missing keypad assignments, especially the HOP key (keypad "5") which is ignored by kterm by default, and the Home and End keys of both keypads. ๐Ÿ’–
  • Note: Mouse wheel scroll navigation in menus does not work seamlessly in kterm because kterm sends incorrect escape sequences on mouse wheel scrolling. ๐Ÿ™ˆ
  • Note: By default (i.e., without explicit -km option or corresponding *vt100.kanjiMode resource configured), kterm runs in ISO 2022 mode โ€” yes, it does indeed โ€” which is not supported by mined. ๐Ÿ’€

hanterm

  • CJK display is buggy at the line beginning or after a Tab: often only the second byte of the character code is displayed as an ASCII character instead of displaying the complete CJK character. ๐Ÿ˜ญ
  • Character attributes in hanterm used to be all mapped to reverse, so there was a workaround to enable a visible position in the scrollbar which is displayed as blank space. The criteria for this workaround to apply are: CJK terminal (detected or configured), TERM=xterm, Korean encoding (UHC or Johab) configured with parameter or locale. Replaced to enable nicer colours in the scrollbar. To reactivate the workaround for older hanterm, set environment variable MINEDSCROLLFG="0". ๐ŸŽจ

KDE konsole

  • Due to the lack of decent Unicode font support in the default configuration of the KDE konsole terminal, menu appearance options -QQ and -Qr should not be used; rounded borders are disabled by default. ๐Ÿšซ
  • The Mined runtime support library includes a configuration file konsole/xterm-modified.keytab which defines enhanced escape sequences for function keys and other modified keys in order to enable the functionality described in this manual. Unfortunately, the qt framework used by konsole inhibits the use of some keys and many key combinations. ๐Ÿ˜ค
  • It is especially irritating that konsole disregards the middle keypad key ("5" in application mode) completely; so the mined HOP function has to be invoked by alternative means. As a remedy, the HOP function is also assigned to the "Menu" key (next to the "Windows" key on PC keyboards) by the configuration sample file konsole/xterm-modified.keytab; follow the installation instruction in that file and select the keyboard type it defines ("xterm with key modifiers") in konsole, "Settings" - "Keyboard" menu. Another remedy is to reassign the middle keypad key to the X key symbol Menu (using xmodmap); the script kp5 in the Mined runtime support library does this. ๐Ÿ› ๏ธ

gnome-terminal

  • The gnome-terminal uses right mouse click for its own terminal menu. To open a mined menu, use Ctrl+right-mouse-click. ๐Ÿ–ฑ๏ธ
  • The gnome-terminal does not support modified keys (e.g. shifted keypad keys). ๐Ÿ˜”
  • The gnome-terminal captures a number of Alt-letter key combinations for its own menu access (which can however also be controlled with the mouse). To disable this unpleasant capturing, so e.g. mined can open its own menus with Alt-letter, configure gnome-terminal as follows: Open menu "Edit" - "Keyboard Shortcuts..." and check "Disable all menu access keys". Even then, however, F1 and Ctrl+F1 are suppressed by this quirky terminal. ๐Ÿ™„
  • Mined implicitly assumes its -f option (for limited font usage with respect to graphic characters) when detecting gnome-terminal. ๐Ÿ”

Mac OS X Terminal and others

  • The Mac OS X Terminal app does not support mouse escape sequences. Preferably, use xterm or iTerm 2. ๐ŸŽ
  • In iTerm 2, enable mouse reporting in the settings menu Preferences - Profile - Terminal. ๐Ÿญ
  • If any Mac terminal (Terminal, xterm, iTerm 2) does not respond to the ESC key, it is likely to be captured by Speech Recognition. Disable Speech Recognition or try Ctrl+ESC. ๐ŸŽค

Linux console

  • Mined detects F11, F12, Shift-F1...Shift-F8 properly (handling the shift of 2 applied by the Linux console to shifted function key codes compared with other terminals); further modified function keys are apparently not supported in the Linux console. ๐Ÿง

screen

Screen, like luit (see below), is a middle layer between the actual terminal and the user terminal environment. Running screen in a cygwin console produces initial garbage input in mined. ๐Ÿ˜ตโ€๐Ÿ’ซ

[Applies to older screen before version 4: Unfortunately, screen does not pass character width handling of its host terminal transparently to the application but apparently it maintains cursor position information with reference to the system-installed locale data. Which, however, does not always reflect the terminal properties! Yet mined detects the proper width properties of the host terminal (by using pass-through escape sequences of "screen") but only if the environment variable is set to "screen" (the default of "screen").]

Worse, however, screen apparently transforms cursor positioning commands from the application into relative cursor positioning towards the host terminal, which results in grossly incorrect display positioning if e.g. screen runs in a UTF-8 terminal but assumes an 8 bit terminal. Also, it interprets certain UTF-8 continuation bytes as control characters, so even using a workaround it is not possible to fix display for all cases. ๐Ÿ˜ญ

Mined applies a workaround to fix text positioning and menu display problems with screen. Another workaround fixes many cases of UTF-8 character display but cannot fix all (since screen captures the output of the 0x9C byte). It is recommended to invoke screen only with properly configured locale environment variables to match the actual terminal encoding. ๐ŸŒธ

mintty ("Cygwin Terminal")

Mintty is a Windows-based (non-X) terminal running with cygwin. Mined auto-detects mintty and adjusts certain properties and features accordingly. ๐ŸชŸ

  • Mintty supports all kinds of special keyboard features. ๐ŸŽน
  • Mined detects font changes that change the CJK ambiguous character width properties of the terminal when notified by mintty if running in UTF-8 mode. ๐Ÿ”ค
  • For good coverage of Unicode characters, recommended fonts for use with mintty are DejaVu Sans Mono, Lucida Console, Courier New, Andale Mono, Everson Mono, SimSun. Discouraged are Lucida Sans Typewriter, Letter Gothic, Courier, Monaco, and older MS CJK fonts, at least for their lack of (proper) graphic characters (for menu borders). Mined uses the glyph detection feature of mintty (since 0.9.9) to configure a nice set of useful line markers and menu graphics. ๐ŸŒŸ
  • If break interruption (Control-\ key) does not work on international keyboards (if AltGr is involved), use the special Control-Break keyboard function instead. โŒจ๏ธ
  • Note: For right-to-left text editing, the bidi feature of mintty interferes with the scrollbar of mined; you may disable the scrollbar with -o to reduce visual confusion. (Context-dependent scrollbar display is planned for a later version.) ๐Ÿ”„
  • Note: With the command scripts wined or wined.bat, mined is invoked in a separate Windows terminal session, using mintty if available. ๐Ÿ’ป
  • Note: On some systems, mouse wheel scrolling does not work in mintty if the mintty scrollbar is enabled. It can be disabled in the mintty "Options..." menu, section "Window". ๐Ÿ–ฑ๏ธ
  • Note ๐Ÿ’… โ€” Mined temporarily disables mintty shortcut keys for Windows functions (like Alt-function keys, Alt-space, Alt-Enter) so it can use them itself, periodt. To toggle mintty full-screen mode, open the mintty menu with Shift+right mouse button, item "Fullscreen". (With mintty versions before 0.5.1, for proper usage of Unix-like keyboard functions, the following settings are recommended: In Options - Keys, disable the Shortcuts "Window commands" and "Copy and paste". In Options - Text, disable "Show bold as bright".)

Cygwin console ๐Ÿง

  • The cygwin console terminal emulation does not support Shift-F1, Shift-F2 (which cannot be distinguished from F11, F12), Shift-F11, Shift-F12 ๐Ÿ˜ญ; Control or Alt modified function keys are supported beginning cygwin 1.7.2.
  • Mined detects UTF-8 mode of cygwin 1.7 console (by LC_*/LANG setting or for cygwin 1.7 beta by CYGWIN containing "codepage:utf8").
Note: After rlogin from this console, UTF-8 indication has to be ensured explicitly, e.g. by environment setting, or by mined option +U. ๐Ÿ™ˆ
  • Note: Cygwin console in UTF-8 mode provides extended Unicode font support if you select "Lucida Console" or another TrueType font from its Properties menu. โœจ
  • If the Windows program chcp.com is used within cygwin, and the console window is set up to use "Raster Fonts", non-ASCII characters may be mangled. ๐Ÿ’€
  • Mouse coordinates are not properly reported with wheel scrolling in the cygwin console; for that reason, opening a menu with mouse scrolling does not work. ๐Ÿซ 
  • See also README.cygwin for more detailed hints on weird details about the Windows console in different modes.
  • See also PC terminals above. ๐Ÿ‘†

Windows console window (DOS command prompt) ๐ŸชŸ

  • The Windows console window is normally configured to run in CP850 encoding or other legacy encodings (depending on localized Windows configuration), it may also turn out to be using CP437. Non-displayable characters are replaced as usual. The configured font may also affect the effective display character set. ๐ŸŒˆ
  • However, if running a cygwin application (like the cygwin version of mined) from a Windows console, the cygwin emulated terminal encoding applies instead, e.g. UTF-8. ๐Ÿ’–
  • Note: The (djgpp-compiled) DOS version of mined automatically adjusts to the selected console codepage (e.g. using the chcp command), it is advisable to set up the console windows to use "Raster Fonts" if this is used. With the cygwin-compiled version, on the other hand, using a TrueType font is more stable with respect to character set problems. ๐ŸŽ€
  • With the djgpp-compiled version apparently there is a Ctrl-C problem on older Windows versions. Every first Ctrl-C will display ^C on the screen at the current position without mined noticing it, while every second Ctrl-C will be passed to mined. This problem does not occur on Windows XP. It does occur on Windows ME in a Windows console window. It does not occur with the cygwin-compiled version. ๐Ÿ˜ตโ€๐Ÿ’ซ
  • See also PC terminals above. ๐Ÿ‘†

Windows PowerShell ๐Ÿ’™

  • Mined detects a Windows PowerShell window and adjusts to its limitations. lowkey adaptive queen ๐Ÿ‘‘

Poderosa ๐ŸŒธ

  • This Windows terminal emulator can be used for UTF-8 editing. To ensure proper function, do not use Terminal Type "kterm" or Encoding "euc-jp" or "shift-jis".
  • Mined auto-detection and terminal initialization can cause Poderosa to display warning popups. To avoid them, Select Tools - Options... - Terminal; for "Behavior in case of unexpected chars", disable "Display a message box". If you get a notice "Failed to decode characters by the current encoding utf-8.", click "Do not display this message from next time". ๐Ÿ”•
  • Poderosa does not provide mouse support for applications. ๐Ÿ–ฑ๏ธโŒ

Terminator ๐Ÿ–ฅ๏ธ

  • In Edit - Preferences, enable "Use alt key as meta key".
  • Terminator does not provide mouse support for applications. bestie, no mouse for you ๐Ÿญ๐Ÿ’”

PuTTY ๐Ÿข

  • This Windows terminal emulation for remote login provides various keyboard (esp. keypad and function key) assignment emulations. In SCO mode, shifted function keys are different from those of xterm SCO function key emulation; both are supported. โœจ

Better Terminal and Terminal Emulator (Android) ๐Ÿ“ฑ

  • There are lots of deficiencies in screen control; mined adapts to Better Terminal.
  • There are lots of deficiencies in using a real keyboard. ๐Ÿ˜ญ
  • To use a real keyboard, in the terminal settings, map Control to Left Alt key. ๐Ÿซถ

luit ๐ŸŒ

  • The locale support add-on for text terminals luit which applies encoding transformations (e.g. with LC_ALL=zh_CN.gb18030) often maps characters incorrectly, including using the wrong cell width. it's giving chaos ngl ๐Ÿ’€

DECterm ๐Ÿ–ค

On a VMS system, a DECterm window should be started with:

CREATE /TERMINAL /DETACH
  • Mined cannot disable flow control option (terminal using ^S and ^Q characters) despite its handling of the TTSYNC and HOSTSYNC terminal driver options. To make them usable, DECterm needs to be configured manually: Options menu - Keyboard... - disable Ctrl-Q, Ctrl-S = Hold; then Options - Save Options. ๐Ÿ“
  • On a remote DECterm, numeric keypad and function keys may not work properly without additional X configuration (xmodmap). Also the AltGr key does not work, making some characters unreachable on international keyboards. ๐Ÿ˜ค
  • For VT100 graphics characters (used for menu borders), the DECtech fonts (X fonts with -DEC-DECtech encoding) need to be installed on the X server. If the Cygwin/X server is used, the font-bitstream-dpi* packages should be installed to this aim. ๐Ÿ”ฅ

dtterm ๐Ÿฆ‹

  • With the SCO default font, dtterm does not display non-ASCII characters and even worse, they corrupt further display. Mined does not, however, set its screen encoding assumption to ASCII as dtterm behaves properly with all other fonts (e.g. 10x20, lucidasanstypewriter, courier). iconic behaviour honestly โœจ
  • Home/End, PgUp/PgDn, and HOP keys need to be used with Shift. ๐Ÿ’…

SCO Caldera Linux (konsole and xterm) ๐Ÿš

  • Window size change signals don't seem to be supported. ๐Ÿ’€

Haiku Terminal ๐ŸŒธ

For a number of deficiencies of the Haiku Terminal application, it is preferable to use xterm instead. Most notable are display problems with the VT Gothic font; use DejaVu Sans Mono instead.

  • No wide characters and combining characters. ๐Ÿ˜ญ
  • No Alt-letter escape sequences.
  • No modified function and cursor keys.
  • Ignorance of middle keypad key. rude fr ๐Ÿ™„
  • Cursor visibility problems (cursor colour vs. reverse mode).
  • Wrong Control-space key (sends Control-C). not the Ctrl-C jumpscare ๐Ÿ’€
  • No mouse controls for wheel scrolling.
  • Unconforming mouse mode handling.

Work-around support to enable 8-bit character set on weird terminals ๐Ÿงš

There exist some exceptionally weird 7 bit terminals that have an alternative character set containing composed characters which can be displayed simultaneously with the default character set. For those there is optional output translation which embeds non-ASCII characters into the respective code switching sequences. To enable output character transformation, set the environment variable MINEDOUT to contain the upper half (with respect to an 8 bit character set) of the translation table into the terminal's alternate character set. (Character set switching will be done as specified in the termcap (as/ae) or terminfo (smacs/rmacs) entry.) An example setting of MINEDOUT is included in the environment sample file profile.mined in the Mined runtime support library for Siemens 9780x terminals. ๐ŸŽ€

Concerning some especially stupid terminal drivers ๐Ÿ˜ค

There used to be terminal drivers which make use of the soft handshake mechanism by exchange of ^S and ^Q characters but yet pass them through to application programs โ€” which is quite stupid, no cap. If it is necessary to ignore such hazardous ^S and ^Q keys, the environment variable NoCtrlSQ or NoControlSQ must be set. Mined will then not disable the tty channel soft handshake setting either. ๐Ÿ’…


Keyboard mapping / Input method preselection โŒจ๏ธโœจ

With the environment variable MINEDKEYMAP the active or standby mapping or both 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, or a combination. ๐Ÿซถ

Example:

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. ๐Ÿ”ฅ

The respective tags attached to the keyboard mappings can be looked up in the Input Method flag menu; the HOP function toggles between display of the full input method name and its tag. iykyk ๐Ÿ‘‘

Smart Quotes style configuration ๐ŸŽ€๐Ÿ’ฌ

Smart quotes style can also be preselected with the environment variable MINEDQUOTES (in addition to command line option -q=..., standard locale environment variables, or additional locale environment variables LANGUAGE or TEXTLANG which also implicitly set smart quotes mode). The value of MINEDQUOTES should contain the opening/closing quote pair (or just the opening quote mark, double or single quotes) and must be UTF-8 encoded. It can optionally append a space and an inner quotation mark (as used for nested quotations) for more specific selection. It can also indicate French spacing as shown in the example. ๐ŸŒธ

Examples (for values of -q parameter or MINEDQUOTES variable):

  • ๏ฟฝ sets ๏ฟฝDanish๏ฟฝ quotes style and corresponding single smart quotes.
  • ๏ฟฝ๏ฟฝ sets ๏ฟฝFinnish๏ฟฝ quotes style and corresponding single smart quotes.
  • ๏ฟฝ๏ฟฝ '' (where '' denotes a left double quotation mark U+201C) sets ๏ฟฝSpanish๏ฟฝ quotes style with English style inner quotation marks.
  • ๏ฟฝ ๏ฟฝ sets ๏ฟฝ French ๏ฟฝ quotes style with embedded spacing.

See Smart Quotes for more options. ๐Ÿ‘€

Han info configuration ๐Ÿ€„โœจ

With the environment variable MINEDHANINFO, the information shown for Han characters can be preselected. If the variable is defined, Han info mode is enabled. It may contain letters to select description, pronunciation information, and display mode to be used:

  • M โ€” show Mandarin pronunciation
  • C โ€” show Cantonese pronunciation
  • J โ€” show Japanese pronunciation
  • S โ€” show Sino-Japanese pronunciation
  • H โ€” show Hangul pronunciation
  • K โ€” show Korean pronunciation ๐Ÿ’ฌ
  • V โ€” show Vietnamese pronunciation ๐ŸŒธ
  • P โ€” show Hanyu Pinlu pronunciation โœจ
  • Y โ€” show H<|place_holder_mm_span_0442|> Pinyin pronunciation ๐ŸŽ€
  • X โ€” show XHC Hanyu Pinyin 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 ๐Ÿ˜ญ

๐Ÿ’พ Common paste buffer configuration ๐Ÿ’พ

okay so the paste buffers โ€” the ones used for cut/copy/paste operations, plus the inter-window paste buffer โ€” live in a temporary directory, and by default they follow system conventions. but to keep the inter-window paste functionality working even remotely, mined uses the environment variables MINEDTMP and MINEDUSER which, in combination, point to a user-defined temporary directory and file name pattern to be used for buffer files:

  • Set MINEDTMP to refer to a common mounted network directory on all machines, which means that the value of $MINEDTMP may have to be different to reflect different mount points across the network. (On VMS, use SYS$MINEDTMP). ๐ŸŒ
  • Set MINEDUSER to the same name within the network even if using different user name accounts. ๐Ÿ‘‘

For details, see also the FILES section below. iykyk ๐Ÿ’…

โŒจ๏ธ Keypad configuration โŒจ๏ธ

Some X configuration may have to be applied to enable keyboard input features as used by mined:

  • Alt key modifier for quicker entry of "ESC" commands. โšก
  • Assignment of the HOP function to the middle keypad key ("5"). ๐Ÿ–๏ธ
  • Assignment of the HOP function to other keys (especially for convenience on laptops which do not have the numeric keypad), e.g. the Pause or Scroll Lock key. ๐Ÿ’ป
  • Distinguish "Home" and "End" keys of the two keypads in order to make use of this redundancy of typical keyboard layout (which is actually a waste of physical resources, causing unnecessary wrist strain because it increases the distance to be moved over for reaching to the mouse). ๐Ÿ˜ญ
  • Enable control and shift modifiers for keypad and function keys. ๐ŸŽ›๏ธ
  • Enable control and shift modifiers for digit keys (for use as accent prefix). ๐Ÿ”ข
  • Enable control modifier for punctuation keys (for use as accent prefix). โœจ

See the example file Xdefaults.mined in the Mined runtime support library for suggestions. ๐Ÿซถ

๐Ÿ–จ๏ธ Printing configuration ๐Ÿ–จ๏ธ

Mined uses the script 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). ๐Ÿ“„

If the support library is not installed in one of its standard locations (system-dependent), it should be made available in the usual command search path. ๐Ÿ”

The script offers a choice of configured printers to select one (using either Windows registry or โ†’NEWโ†’ CUPS lpstat). ๐Ÿ–จ๏ธ

The script uses either paps or uniprint for actual formatting (print preprocessing). Under Windows (cygwin/stand-alone/djgpp versions), mined also considers printing with notepad /p. ๐ŸชŸ

paps is available at https://github.com/dov/paps 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. ๐ŸŒˆ

The font to be used with uprint can be configured with the environment variables FONT, FONTPATH, FONTSIZE. It is recommended to put a sufficient font in the directories of $FONTPATH, e.g. DroidSansMono, LucidaTypewriterRegular, Bitstream Cyberbit. ๐Ÿ”ค

The preferred printer can be configured as usual with the environment variable PRINTER. In addition, uprint checks an environment variable LPR for an alternative for the system printing command (lpr/lp) if that is needed. ๐Ÿ–จ๏ธ

Note: If printing with 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. ๐Ÿ˜ฌ

See Environment variables to configure Printing for further details. ๐Ÿ’œ

๐ŸŽจ Display layout ๐ŸŽจ

Some of the special indication characters (that substitute non-displayable contents) and some of the colours used by mined for special indications and interactive elements may be configured to the user's preference. ๐Ÿ–Œ๏ธ

Note: For the configurable character indications, two environment variables exist each, to configure an 8 bit value (Latin-1 encoded) and to configure a Unicode value (UTF-8 encoded). The UTF-8 encoded values (e.g. MINEDUTFRET) take precedence in a UTF-8 terminal. In an 8 bit terminal, or if the respective UTF-8 variable is not configured, the Latin-1 encoded value applies. See the example script 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). ๐ŸŒŸ
Note: For the Latin-1 encoded configured indication markers (variables MINEDRET etc, not MINEDUTFRET etc), if the configured character is in the small letters range (actually ''...DEL) the alternate character set is used for display. This works also in a UTF-8 terminal, provided that the corresponding UTF-8-encoded indication configuration variable is not set, e.g. MINEDRET=j MINEDUTFRET= (or not defined) would indicate line-ends by displaying a graphic lower right corner, MINEDTAB='' MINEDUTFTAB=` (or not defined) would indicate Tab characters with VT100 graphics lozenge rhombs. ๐Ÿ’ 
Note: For the UTF-8-encoded configured indication markers (variables MINEDUTFRET etc), if the marker is a double-width character, a replacement will be displayed instead. ๐Ÿ™ˆ
Note: Mined reduces its assumptions about available graphic and special characters for display purposes with the options -f or -F. The -F option also suppresses the interpretation of the MINEDUTF* environment variables. ๐Ÿ›‘

โœจ Line ends โœจ

Line ends are usually marked by a ๏ฟฝ double left angle character. This visual indication can be changed with the environment variable MINEDRET (8 bit terminals) or MINEDUTFRET (UTF-8 terminals). The default or configured marker is used as an indicator at the end of every text line on screen (so you can see how many blank spaces there are). ๐Ÿ‘€

Multi-character markers: If a second character is configured, it is used to fill the rest of the screen line, a third configured character would terminate the indication at the end of the screen line. (๏ฟฝ๏ฟฝ๏ฟฝ is a nice setting for people who used to work at Siemens terminals.) Pattern:

MINEDRET=123  # line end displays as 122222223

Suggestion for a nice line end on UTF-8 mode terminals (check if character is included in your font, however!):

MINEDUTFRET=โŽ # U+23CE

The indication of DOS line ends (CRLF) and Mac line ends (CR) may be configured with the variables MINEDDOSRET or MINEDUTFDOSRET, and MINEDMACRET or MINEDUTFMACRET, respectively. They are also distinguished by different colours. ๐ŸŒˆ

๐Ÿ“„ Paragraph ends ๐Ÿ“„

With the option -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. ๐ŸŽ€

๐Ÿ”˜ Tab characters ๐Ÿ”˜

Tab characters are usually indicated by a sequence of ๏ฟฝ (middle dot) characters. This can be changed with the environment variable MINEDTAB (8 bit terminal) or MINEDUTFTAB (UTF-8 terminals). โœจ

Multi-character markers: If two characters are configured, the second is used to mark the middle of the Tab span. If three characters are configured, the first and last are used to mark the beginning and end of the Tab span. Pattern:

MINEDTAB=123  # Tab displays as 12222223
MINEDTAB=12   # Tab displays as 11112111

โžก๏ธ Long lines โฌ…๏ธ

Lines which are too long for the screen are usually indicated by a ๏ฟฝ double right angle (guillemot) character. If the current position is behind the screen margin, the line is shifted out left which is indicated by a ๏ฟฝ double left angle. These markers can be changed with the environment variable MINEDSHIFT or MINEDUTFSHIFT. The first character is used to indicate a line continued to the left of the screen, the second character is used to indicate a line continued to the right of the screen. ๐Ÿซถ

๐Ÿฆ‹ Unicode characters ๐Ÿฆ‹

For a description of special display indications in UTF-8 text editing mode see "Unicode display" above. The indication and highlighting mode of a non-displayable Unicode character (typically a UTF-8 character in a Latin-1 terminal), as well as the highlighting mode (colour) of the indication of illegal UTF-8 sequences, can be configured with the variable MINEDUNI. ๐Ÿ’œ

๐Ÿ’… Display mode of indicators ๐Ÿ’…

It is recommended to display these indicator characters in a dim display mode to prevent distraction from the text contents. The default is a red colour which is a moderate dark red in xterm. The display mode can be used by placing the code part of an ANSI display control sequence in the environment variable MINEDDIM. E.g., MINEDDIM=31 would select the default mode, red foreground; in xterm only, MINEDDIM="38;5;83;38;5;245" gives a moderate gray in either 88 or 256 color mode; in rxvt only, MINEDDIM="38;5;83" gives a moderate gray. MINEDDIM can also be set to an integer percentage value (e.g. MINEDIM="50%") to have mined apply dim colour to the indications; the colour value is computed from the current foreground and background colours (works in xterm, or mintty from version 404). The ANSI colour 7 (white) is temporarily redefined for this purpose and restored when mined exits. ๐ŸŽจ

๐ŸŽจ Display mode of menu borders

okay so bestie, the display colour of menu borders and menu headers can be configured with the environment variable MINEDBORDER. Suitable values are "35" (magenta), "34" (blue), and "31" (default). slay.

๐Ÿ’ฌ Status line highlighting

The highlighted parts of status line messages (e.g. initial letters for help selection after F1) can be configured with the environment variable MINEDEMPH, using foreground ANSI modes. The default is "31" (effectively red background). cute.

๐ŸŒˆ Scrollbar colour

The foreground and background colours of the scrollbar can be configured with MINEDSCROLLFG and MINEDSCROLLBG, respectively, using ANSI modes; if only the background is configured, the foreground is the reverse of it. In general, to support fine-grained scrollbar display in UTF-8 terminals, the foreground and background colour settings should be the reverse of each other. The default for the background is "46;34;48;5;45" if use of 256 colour mode is enabled, or "46;34" if it is disabled. The default for the foreground is "", meaning that the reverse background is used, with a workaround for hanterm (see above). no cap.

The highlighting background colour of the selected menu item can be configured with MINEDSEL, using reverse ANSI modes (i.e. using foreground parameters for the background), and MINEDSELFG for the foreground, using reverse ANSI modes. The default values are MINEDSELFG="43" and MINEDSEL="34", giving yellow on blue. If selected menu items appear too dark (which mined tries to avoid, depending on the terminal), try one of the workarounds MINEDSEL="34;1" or MINEDSELFG="43;1".

Menu border styles can be selected with the option -Q. For a nice selection bar that extends from left to right menu border, the setting -QQ is recommended (this is the default unless the terminal is assumed not to provide sufficient font configuration for this option; it depends on certain graphic Unicode characters being included in the terminal font and can be disabled with -Qq). iconic.

๐Ÿฆ‹ Combining character display

The highlighting background colour of combining characters displayed in separated mode can be configured with MINEDCOMBINING, using ANSI background modes. The default value is MINEDCOMBINING=46; to change colour e.g. to yellow background, use MINEDCOMBINING=43. ๐Ÿ’›


๐Ÿ’ฌ Interactive Help access

Mined looks for its help file in a number of typical directories for installation of the Mined runtime support library. If it is placed in a non-standard location, the environment variable MINEDDIR should point to the directory. (Mined also tries to find the help file in the directory where it was started from; this is especially useful for the DOS/Windows version.) ๐Ÿซถ

๐Ÿ› ๏ธ Mined compile-time configuration

๐ŸŽจ Script highlighting

The mined distribution contains a file 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.) Edit colours.cfg before building mined to adapt coloured script display to your preferences. โœจ

๐Ÿ”ค Encodings and Encoding menu

The mined distribution contains a file 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).

The configuration file allows the definition of submenus in the Encoding menu.

Each character encoding entry charmap-name must correspond to an existing character mapping file charmaps/charmap-name.map. Additional character mappings can be generated with the script mkchrmap. ๐Ÿ’…

๐ŸŒ Encodings recognised by locale names

The mined distribution contains a file 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. ๐Ÿฆ‹

โŒจ๏ธ Keyboard mapping (Input method)

The mined distribution contains a file 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:

  • path.../name.mim โ€” a keyboard mapping file of the m17n-db multilingualization package
  • path.../name.kmap โ€” a keyboard mapping file of the yudit text editor
  • path.../name.vim โ€” a keyboard mapping file of the vim text editor
  • path.../name.cit โ€” an input method mapping file of the cxterm terminal, binary form; only works if the cxterm binary/text conversion utility cit2tit is accessible
  • path.../name.tit โ€” an input method mapping file of the cxterm terminal, text form; only works if the character set conversion utility iconv is accessible and works on the mapping file
  • path.../name.utf โ€” an input method mapping file of the cxterm terminal, already converted to UTF-8 encoding (e.g. with iconv)
  • Cangjie [ < HKSCS Changjie table file name > ] โ€” with this tag, a keyboard mapping for the Cangjie input method will be generated, taking information from the Unihan database (unicode.org); with a second parameter, a Big5-encoded table of HKSCS Changjie input codes will be merged in, the parameter is either the file name or a + 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/
  • MainlandTelegraph , TaiwanTelegraph โ€” with one of these tags, a keyboard mapping will be generated using one of these telegraph codes as an input method, taking information from the Unihan database (unicode.org)
  • Cantonese , HanyuPinlu , Mandarin , Tang โ€” with one of these tags, a keyboard mapping will be generated using the according Chinese pronunciation as an input method, taking information from the Unihan database (unicode.org)
  • JapaneseKun , JapaneseOn โ€” with one of these tags, a keyboard mapping will be generated using Japanese or Sino-Japanese pronunciation as an input method, taking information from the Unihan database (unicode.org)
  • Korean , Vietnamese โ€” with one of these tags, a keyboard mapping will be generated using Korean or Vietnamese pronunciation as an input method, taking information from the Unihan database (unicode.org)
  • VIQR , VNI , Vtelex โ€” with one of these tags, a keyboard mapping will be generated for the respective Vietnamese input methods, taking character information from the Unicode database (unicode.org)
  • script tag โ€” for many scripts listed in the UnicodeData.txt database, character names listed there can build a useful keyboard mapping; mkkbmap will then generate an according keyboard mapping file, e.g. for Bopomofo

Each successful generation of a mapping table adds an entry to the configuration file 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.

For the Unicode data version used for included keyboard mappings, see the mined change log.

For the keyboard mappings generated from Unihan data, characters are sorted according to the priorities of their Unicode ranges (assigning lower priority to "Supplement" and "Extension" and "Compatibility" ranges). So for some input mnemos, the "pick list" for the Cangjie input method is displayed more in order of relevance.

For keyboard mappings for CJK encodings, mkkbmap will add appropriate punctuation mapping entries for Chinese, Japanese, Korean, respectively, in addition to the entries derived from the respective data source. ๐Ÿ’…

๐ŸŒธ ENVIRONMENT VARIABLES ๐ŸŒธ

Okay bestie, so the env vars that configure mined are listed in the script file profile.mined inside the Mined runtime support library, together with explanations and suggested values. Cute, organized, iconic. ๐Ÿ’…

Further variables used by mined in the usual meaning are:

  • HOME โ€” usual meaning, bestie.
  • USER โ€” usual meaning.
  • SHELL โ€” usual meaning.
  • MINEDOPT โ€” usual meaning.
  • LC_ALL, LC_CTYPE, LANG โ€” locale variables; they affect assumed terminal encoding, default text encoding, and language-related features (such as quote style).
  • LANGUAGE โ€” affects language-related features. It affects assumed text encoding only if it has an explicit encoding suffix (like .UTF-8). It does not affect assumed terminal encoding.
  • TEXTLANG โ€” ๐Ÿšจ deprecated: like LANGUAGE.
  • CYGWIN โ€” usual meaning.
  • TMPDIR โ€” usual meaning.
  • TMP โ€” usual meaning.
  • TEMP (MSDOS) โ€” usual meaning.
  • SYS$SCRATCH (VMS) โ€” usual meaning.
  • TERM โ€” terminal type to be assumed.
  • ESCDELAY โ€” delay after an ESCAPE character that mined waits for recognition of a function key control sequence. Default is 450 ms.
  • MAPDELAY (non-standard) โ€” similar delay that mined applies to wait for subsequent input characters when applying keyboard mapping for an input method. Default is 900 ms.
  • LINES, COLUMNS (MSDOS ANSI mode only) โ€” line / column count of terminal to be assumed.
  • windir โ€” used to determine if it runs under MS Windows and set some defaults (screen output delay) accordingly.

๐Ÿ–จ๏ธ Environment variables to configure Printing ๐Ÿ–จ๏ธ

  • MINEDPRINT โ€” print command to use instead of uprint; the value must contain the string '%s' (quoting recommended) to insert the file name.
  • FONT โ€” name of a font file, e.g. LucidaBrightRegular or bodoni.ttf for use with uprint/uniprint (the file must reside in the configured font path), or name of a font as specified with fontconfig (in $HOME/.fonts.conf or /etc/fonts/fonts.conf) for use with uprint/paps.
  • FONTPATH โ€” directory search path (separate directory names with ":") for use with uprint/uniprint which uses Truetype fonts.
  • FONTSIZE โ€” font size to be used with uprint (paps or uniprint).
  • LPR โ€” print spooling command to be used by uprint (or mined itself if uprint does not work) instead of the system-specific print spooling command (e.g. lpr).
  • PRINTER โ€” name of printer to spool to.

๐Ÿ“ FILES ๐Ÿ“

๐Ÿง Unix ๐Ÿง

  • $MINEDDIR โ€” directory in which the Mined runtime support library is installed, including the help file mined.hlp and the printing script uprint.
  • mined.hlp โ€” help file for interactive hints (F1 commands); mined looks for the file in $MINEDDIR/help, $0, and a number of other typical directories where program support files are installed on various systems.
  • $MINEDTMP โ€” directory for auxiliary files, first attempt. Using this variable and $MINEDUSER (see below), you can establish copy and paste among machines that share network directories but are normally configured to use separate (usually local) temporary directories.
  • $TMPDIR โ€” directory for auxiliary files, next attempt.
  • $TMP โ€” directory for auxiliary files, next attempt.
  • $TEMP โ€” directory for auxiliary files, next attempt.
  • /usr/tmp โ€” directory for auxiliary files, next attempt.
  • /tmp โ€” directory for auxiliary files, next attempt.
Note: $MINEDUSER โ€” user name assumed instead of $USER for building auxiliary file names; using this, common copy-and-paste buffers can be used on a network file system from different machines where the user possibly has different user names.
  • $HOME/.fonts.conf โ€” fonts configuration file for use with uprint/paps; for description, see http://fontconfig.org/fontconfig-user.html or man fonts.conf.
  • minedbuf.< USER >.< PID >.< NN > โ€” temporary file for paste buffer; USER is either $MINEDUSER or $USER.
  • minedbuf.< USER > โ€” file for inter-window paste buffer; USER is either $MINEDUSER or $USER; see descriptions of $MINEDTMP and $MINEDUSER above for how to set up a common inter-window paste buffer in a heterogeneous network.
  • minedrecover.< USER >.< PID > โ€” panic file to rescue text in case of crash or external signal caught.

๐Ÿ–ฅ๏ธ VMS ๐Ÿ–ฅ๏ธ

  • SYS$MINEDTMP:$MINED$user_BUF.pid_nn โ€” paste buffer.
  • SYS$MINEDTMP:$MINEDBUF$user โ€” inter-window paste buffer.
  • SYS$SCRATCH:$MINEDRECOVER$user$pid โ€” panic file.
  • SYS$SCRATCH:$MINEDPRINT$user$pid$n.lis โ€” print spool file.
  • MINED$HELP โ€” help file (may be configured as a logical name).
  • If SYS$MINEDTMP is not available, SYS$SCRATCH is used instead. If SYS$SCRATCH is not available, SYS$LOGIN is used instead.

๐ŸชŸ MSDOS / Windows ๐ŸชŸ

  • %MINEDDIR%\help\mined.hlp โ€” help file, first attempt (to find it).
  • mined.hlp (in mined program directory) โ€” help file, next attempt.
  • %MINEDTMP%\minedbuf.nn โ€” paste buffer.
  • %MINEDTMP%\minedbuf โ€” inter-window paste buffer.
  • %MINEDTMP%\minedbuf.%MINEDUSER% โ€” inter-window paste buffer, as configured to use the same file as other mined versions in a heterogeneous network; note, however, that %MINEDUSER% will be shortened to 3 characters in pure DOS.
  • %MINEDTMP%\minedsv_.* โ€” panic file.
  • If %MINEDTMP% is not available, %TEMP% or %TMP% or \ are used.

๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

In all cases where it is considered sensible, the appropriate message of a system error occurred is displayed โ€” instead of printing numerical hieroglyphs or indistinguished commonplace messages as many other UNIX tools do. Itโ€™s giving actual useful error energy. โœจ


๐Ÿ’€ BUGS ๐Ÿ’€

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. Tiny window chaos, ngl.

(MSDOS, Windows:) With non-cygwin versions (djgpp), piped editing from standard input does not work for unknown reason.

(Windows:) Non-cygwin versions (djgpp) do not work in xterm, rxvt, or mintty.


๐Ÿ‘‘ AUTHOR AND ACKNOWLEDGEMENTS ๐Ÿ‘‘

Long ago, the initial version of mined was written for the Minix educational operating system by Michiel Huisjes. It was adapted to Unix by Achim Mรผller who added termcap support. Mined was later debugged, partly rewritten and enhanced and is now maintained by Thomas Wolff. Main character maintenance arc, honestly. ๐Ÿซถ

๐Ÿ  Homepage ๐Ÿ 

Mined information is provided on mined.github.io. Download links and issue reporting can be found from there. Mined also used to be hosted as a sourceforge project (sf.net/projects/mined).

๐Ÿซถ Acknowledgements ๐Ÿซถ

  • Thanks to Nadim Shaikli < shaikli @ yahoo.com > for discussion of right-to-left issues and interworking with mlterm.
  • Thanks to Mike Fabian < mfabian @ suse.de > for making the RPM package included in the SuSE distribution.
  • Thanks to Ziying Sherwin < sherwin @ nlm.nih.gov > and R. P. Channing Rodgers < rodgers @ nlm.nih.gov > for suggestions and information about CJK input method support and multiple choice handling (pick lists).
  • Thanks to Tobias Ernst < tobias_ernst @ eml.cc > for providing a Mac OS X makefile and suggestion and information to implement Emacs command mode.
  • Thanks to ๅดๅ’็‚œ (Wu Yongwei) < yongwei @ eastday.com > for suggestions and information about Pinyin input methods, for discussion about keyboard mappings for CJK punctuation, and for further maintaining the Pinyin input method.
  • Thanks to Ramakrishnan Muthukrishnan < rkrishnan @ debian.org > for making the Debian package.
  • Thanks to Thierry Thomas < thierry @ FreeBSD.org > for making the FreeBSD package.
  • Thanks to Tobias Nygren < tnn @ NetBSD.org > for making the NetBSD package.
  • Thanks to Jim Breen for suggesting better overview of input methods and more language-specific advice for non-techy persons which led to the new chapter on Language support.

๐Ÿ’– Thatโ€™s the whole page, bestie โ€” this one is from mined 2022.27, dated December 2022. Periodt. ๐ŸŽ€

๐Ÿ“ฆ where this page comes from