A text editor in the Emacs family: small, light. Its screen is in a terminal (or emulator - eg Gnome, Xterm), not a GUI, so performs well over ssh. Handles Unicode characters, UTF-8 encoding, eg: £ € ∞ Ω γ チ → ä ½ é ש ب ک ࿋ ✔ 𝅘𝅥𝅮 * Edit multiple files simultaneously * Split the Emacs screen horizontally and vertically into Emacs windows each showing different buffers/files. * Good documentation, help subsystem: keyword search, topic hyperlinks * Tutorial for new users * Search: a space can match multiple space, tab, newlines * Search/replace intelligently handles capitalisation & line breaks in replaced strings. Easy to have several different replacements * Window options to display: tabs in colour, line endings, line numbers, cursor position (column/line number) * window-menu command that makes window operations easy: split, join together, move the 4 edges, kill/close, change buffer in window, move cursor to different window * UTF-8 characters displayed properly (including double width; zero width shown as a position) * Can insert Unicode points as hex/decimal/octal if the keyboard cannot generate it. * Can track cursor between windows: same up/down in tracked windows * Auto indenting for C and PHP, region indent/unindent, region un/comment * Handles binary files, arbitrary line lengths. * Hexadecimal edit mode. At the same time in another Emacs window buffer can be viewed as text when editing hex (or view hex when edit text) * Editing of prompts for command & file names. Can insert current filename/word-under-cursor/... Tab does file name expansion. * Each window has its own "." and mark, distinct from other windows showing the same buffer * User can place alphabetic marks, shared by all windows showing the buffer. * Emacs places numeric marks with some buffer position jumps - distinct for each window * Position of mark shown in red, in non current window "." in green * Meta (top bit set, non UTF-8) & control characters shown as one underline/standout character, option for old behaviour (eg M-^C) This preserves alignment of columns. * Last char of a over long line shown in yellow; move the cursor to it & whole screen scrolls left/right not just one line * Can change foreground/background colours. * list-buffers also shows much Emacs info: variables, window attributes, statistics * DOS buffer mode - auto handle MS Windows line endings * RENEW buffer mode - like: tail -f * Macro/programmable - scriptable. Arrays & hashes are supported. Procedures (functions) can take arguments & return values * Macros can be bound to keystrokes - like other Emacs commands * Keystroke sequences can be remembered & replayed * Histories of: File names, search/replace, commands, C tags, ... kept so can easily be reused * Bindings of keystrokes to Emacs commands can be changed Emacs has a help system, get there by pressing Escape ? A hacked version of MicroEmacs 3.7 to 3.9. Ideas from MicroEmacs 5. It comes with some own key bindings, many bugs fixed. Version %{version} This should work on a variety of operating systems. This fork has only, recently, been tested on: Linux; FreeBSD; Minix http://en.wikipedia.org/wiki/MicroEMACS Written by: Dave Conroy and Daniel Lawrence - so original copyright belongs to them. Many hacks by Alain Williams - released under the GPL version 2 or later. SCCS: @(#)README.intro 1.13 10/06/20 12:15:09 The above text is also in phcl-MicroEmacs.spec.template *************************** Micro-Emacs for Emacs Users *************************** This is a brief introduction to MicroEmacs for users of other versions of Emacs - mainly GNU. It shows differences from what might be expected. This talks about the PHCL version derived from Microemacs 3.7 - 3.9, written by Daniel M. Lawrence (based on code by Dave Conroy). General ******* * Character interface - no GUI ability. Mouse is not used. * Usually run in a terminal emulator, eg: xterm, gnome/mate terminal, putty * Understands Unicode UTF-8 encoding Command keys described below: C- is control; S- is shift; M- is left hand Alt or ESC prefix (more on this later) Prompts and Cycling through choices *********************************** Some commands will prompt you, eg for: file name, buffer, mode ... In addition to editing (default bindings only) you have: * cycle: you can *cycle* through the choices by pressing space, use C-r to cycle backwards. Type some characters, then cycle: will limit choices that start with those characters. * file name completion: With file names to get shell auto-completion press press TAB and then cycle. Directories are shown with a trailing / - to recurse into it enter * then TAB. * insert useful strings using: C-x f the name of the current file C-x b the name of the current buffer C-x l the line containing "." in the current window. C-x w the word under "." in the current window C-x i the identifier under "." in the current window C-x . line number of "." C-x $ number of lines in the buffer * histories: Prompted results often go to prompt specific histories, eg: File, Command, Search, Replace. Move through history with: down-arrow, up-arrow, C-n, C-p Information & error messages are appended to the hidden buffer: [Message History] The histories are kept in hidden buffers that may be edited. To find such a buffer press C-x b then '[', Cycle until you find it. These buffer names are surrounded by '[' .. ']', not '*'. Buffer modes and Window options ******************************* C-x m Set buffer mode C-x C-m Unset buffer mode M-o Set window option M-C-o Unset window option In each case a prompt is shown. Cycle through the modes or options (see above). Interesting window options (different windows on the same buffer can have different options): NUMBER show line numbers COLOUR-TAB make difference between tabs and spaces obvious SHOW-LINE-END useful to find trailing spaces HEX show/edit buffer in hexadecimal. You should also view the buffer in another window, the cursors will be synched to the same character. OVER mode is also a good idea. POSITION-SHOW Display current: column line-number/lines-in-buffer in mode line Interesting buffer modes: UTF-8 Show/support Unicode characters Default if $LANG ends in .utf-8 or .utf8 OVER Overtype (not insert) new characters. Toggle with insert key. VIEW Changes not allowed DOS MS-DOS/Windows line endings (this is auto set) RENEW File auto re-read when it changes. Like: tail -f CMODE & PHP Help when programming INDENT Auto indent new lines entered WRAP Auto new line when the line gets too long Buffer modes & window options are shown by C-x C-b Useful key bindings and commands ******************************** (Do not type spaces shown. Eg type 'C-x=' not 'C-x =' ) FN1 Forwards incremental search. Also: C-x / and C-s FN2 Backwards incremental search. Also: C-r FN3 Scroll window's view onto the buffer down, also C-x C-n FN4 Scroll window's view onto the buffer up, also C-x C-p FN5 Scroll window's view onto the buffer right FN6 Scroll window's view onto the buffer left FN7 Change (cycle) to next buffer in the window, also C-x x FN8 Read a file into a buffer, also C-x C-f FN9 Save buffer to file, also C-x s FN10 Exit emacs, also C-x C-c C-x b Select buffer to be shown in the current window M-a keyword search for Emacs commands, show bindings C-x ? prompts for key/key-sequence and says what it does M-x emacs-cmd Runs an (unbound) Emacs command C-x = Show buffer position and information about the current character C-x C-b Show information about buffers and a lot of other Emacs stats <== try this! C-u C-x C-b Any count on list-buffers also shows hidden buffers C-x u Insert a Unicode character; you will be prompted for the code point in hex (or decimal or octal) Use if your keyboard does not generate the needed Unicode character. C-SPC Set the mark. Each window on a buffer has its own mark C-x C-a Set a mark named by an alphabetic character C-x a Return to a mark named by an alphabetic character Numeric mark 1 is set (renaming the old 1 -> 2, etc) on jumps (eg search, line goto). Return to a numeric mark with C-x a C-x a + Return to next numeric mark. Good for hunting through them C-x M Show positions of all visible alpha & numeric marks Window manipulation ******************* Up to 250+ windows in the screen (terminal); can be split arbitrarily, resizable. Minimum size: 1 column wide, 1 line high + 1 line mode. C-x 0 Close current window C-x 1 Close all other windows C-x 2 Split current window horizontally C-x 3 Split current window vertically. With a wide screen, 2 buffers side by side is good C-x 4 Split current window horizontally, prompt for file C-x 5 Split current window vertically, prompt for file S-arrow-key Move to window in the direction of the arrow. Eg: S-left-arrow C-x w Enter window manipulation mode, this is not intuitive. Common uses: e move window edge (ie change size). Choose the edge (arrow key) then move it with arrow keys q quit window mode (also C-g) ? gives brief help Display ******* UTF-8 mode shows Unicode characters - dependent on the terminal emulator displaying them correctly. Unicode characters may have screen width or 1 or 2 places. Zero/fractional width characters shown by a coloured '​'. Control characters shown as one standout character. Eg U+01 shown as standout 'A'. Meta (top bit set) characters shown as one underlined character (non UTF-8 mode), option for old behaviour (eg M-C-c). This preserves alignment of columns. Position of mark shown in red. Non current window "." shown in green. Last char of an over long line shown in yellow. The whole screen scrolls left/right on long lines not just one line. Keyboard input & bindings ************************* * Naming of keys is different from GNU and other Microemacs. * Can bind to keys: up-arrow, down-arrow, left-arrow, right-arrow, page-up, page-down, insert, delete, home end, back-tab and function keys FN1 - FN63 * In bindings modifier: M- is left hand Alt or ESC prefix A- is left hand Alt but not ESC prefix S- is shift C- is control Eg: S-left-arrow is shift and left-arrow key; M-C-left-arrow is Alt and Ctrl and left-arrow. * If using Gnome Terminal setting $TERM=gnome will help with key interpretation. Gnome Terminal claims to be xterm but generates different codes for some function keys. * Eg in startup: bind-to-key move-to-window-down S-down-arrow * See which keys are defined (by terminfo) by using command line option: --list-keys Also run the command: infocmp -x -1 | grep '\sk' * Much depends on your terminal (emulation). You may find that S-FN1 is FN13 back-tab is often generated by S-tab test this with C-x ? Some key combinations might be processed by your window manager. For xterm (and Gnome terminal with $TERM=gnome) you may find: FN13 to FN24 are S-FN1 to S-FN12 FN25 to FN36 are C-FN1 to C-FN12 FN37 to FN48 are C-S-FN1 to C-S-FN12 FN49 to FN60 are A-FN1 to A-FN12 FN61 to FN63 are S-A-FN1 to S-A-FN3 Emacs does not know about these combinations, ie will see FN25 as FN25 and not C-FN1 * Try combinations: S- M- S-A- C- S-C- M-C- S-M-C- * Non control bindings are case sensitive, eg: M-a is different from M-A and C-X a different from C-X A * For default bindings run: M-x describe-bindings Command Line ************ Interesting options: -v Following files opened in VIEW mode -e Following files opened with VIEW mode off -N Following files with NUMBER option -s str Search for string str when the file is opened. Eg: -s foo +nn When open the file goto line nn. Eg: +20 +-nn When open the file goto line nn from the bottom of the file. Eg: +-20 +nn.cc Go to line nn, column cc. Eg: +20.5 --help for other options Misc **** Startup file probably: /usr/local/etc/emacs.rc or /etc/emacs.rc and $HOME/.emacsrc Other differences ***************** Single characters deleted (eg: C-d) are also put into a yank buffer in the kill ring. A count to yank/reyank inserts that number of copies of the yanked text. reyank is what MicroEmacs calls yank-pop. The kill ring is visible as a special buffer. fill-paragraph (M-q) puts one space at sentence end; change with $french-spacing. SCCS: @(#)MicroEmacsForGnuEmacsUsers 1.16 08/21/20 12:21:17 History and License ******************* Originally written by Dave Conroy and Daniel Lawrence. It is not clear what license it was released under, but I find: (C)Copyright 1988 - 1996 by Daniel M. Lawrence, based on code by Dave Conroy. MicroEMACS 4.0 can be copied and distributed freely for any non-commercial purposes. Commercial users may use MicroEMACS 4.0 inhouse. Shareware distributors may redistribute MicroEMACS 4.0 for media costs only. MicroEMACS 4.0 can only be incorporated into commercial software or resold with the permission of the current author. The current MicroEMACS web site: http://www.aquest.com/emacs.htm This version available from: http://www.phcomp.co.uk/Packages/phcl-MicroEmacs.html See also: http://en.wikipedia.org/wiki/MicroEMACS Daniel M. Lawrence, 1958 - 2010 http://le-trombone.livejournal.com/182656.html This is a version of MicroEmacs based on versions 3.7 to 3.9 in 1986 to 1987, some features inspired by later versions. Many hacks at Parliament Hill Computers Ltd (PHCL) by: Tony Bamford & Alain Williams; latterly just Alain. PHCL changes are offered free for anyone to use under the GPL, version 2 or later: http://opensource.org/licenses/gpl-license wcwidth.c is from Markus Kuhn -- 2007-05-26, is free to use and may be obtained from: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c A few trivial changes to wcwidth.c by Alain Williams released under the GPL, version 2 or later. So - licensing the components: * Original code is distributed as shareware. * PHCL changes are released under the GPL. * mcwidth is free. Thus we are OK as this is distributed for zero cost (other than media & related). Most components have been changed by PHCL so derived works are subject to the GPL. Daniel M. Lawrence died in 2010, so getting a commercial license on those other parts would be problematic. Supported operating systems *************************** This is supposed to work on a variety of operating systems. This fork has only, recently, been tested on: Linux, BSD Unix, Minix, Solaris. If porting elsewhere look at screen/keyboard handling functions. SCCS: @(#)LICENSE 1.3 07/14/19 09:01:58