README for mini editor e3 release 1.61

(c) GPL 2000 Albrecht Kleine  
mailto:kleine@ak.sax.de


1. OVERVIEW
===========
e3 is a text micro editor with a compressed code size less than 10000 bytes.
Except for 'undo' and 'syntax highlighting', e3 supports all of the basic
functions one expects. If you have installed the stream editor 'sed' or 'ex'
you can use these tools as sub-processes, getting the full power of regular
expressions.

e3 can use Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings, whichever
the user chooses.

e3's assembler version is primary available on Linux. FreeBSD and BeOS are
also possible, but there are also GNU-C-written versions for non-i386-Unix
platforms (e3.c, included) and for 16-bit DOS (no longer included).

This README doesn't further mention e3.c. (Just make it!)

e3 is designed to be INDEPENDENT OF LIBC OR ANY OTHER library. 
It's been tested using Linux kernels 2.0.33, 2.2.xx, 2.4.0-testX and 
the terminal console, but Xterm, Eterm, kvt, rxvt, vt220 and vt100 
should work too. Also it's been somewhat tested with FreeBSD 3.1
and BeOS 5PE.



2. BUILD
========
A. For assembling of e3 you need _NASM_ _assembler_ _v0.98_.

B. Unless you build a debug version ("make debug") Makefile will call
   a compressor for executables, but in Linux only. We use either gzexe 
   or UPX (http://wildsau.idv.uni-linz.ac.at/mfx/upx.html) .
   
C. If you don't like the default OS or destination (LINUX , /usr/local/ )
   then edit Makefile (other possible OS are FreeBSD or BEOS).
   
D. e3 is expecting "sed" at /bin/sed, or "ex" at /usr/bin/ex; otherwise change 
   SEDPATH in e3.asm.  By default /bin/sed is used, but you can
   use /usr/bin/ex instead, if you edit Makefile as appropriate.

E. Build e3 via typing 'make' (or 'gmake' on FreeBSD)  for building:             
   e3	: the default Wordstar-like version,
   e3ws	: ditto Wordstar,
   e3em	: the Emacs-like version,
   e3pi	: the Pico-like version,
   e3vi	: the vi-like version.
   e3ne	: the NEW Nedit-like version.
   (e3?? are symbolic links to e3. In fact only one executable is built)

F. Optional: type 'make install' or 
   move or copy e3 and its symlinks wherever you want.

G. Optional: some more editable options are on top of e3.asm: 
   for example, if you don't like WS mode, choice an other default mode 
   by setting DEFAULT_MODE to one of EM, NE, PI or VI .
   Also you could activate error beeping in vi mode by uncommenting 
   the BEEP_IN_VI line.
   


3. RELEASE NOTES for 1.6
========================
For the very first time you can do some simple arithmetic calculations
inside your text. For example:

                 1234+56*78=
place cursor here^ and press:
   ^KN  for WSTAR mode
   ^QC  for PICO mode
   ^X^N for EMACS mode
   #    for VI command mode
   ^K   for NEDIT mode
This should insert 5602 into text.

Use 0, 0.000001 ,... up to 999999999999.999999 and operators +-*/ .
CAUTION #1: +- signs and brackets() are not yet implemented. 
CAUTION #2: Do NOT expect high precision. 

More examples:
 2/3*3=2
 2+4*8=34
 4*3-5*4=-8
 100000000+0.000001=100000000.000001
 10000000000+1=10000000001
 1+1*2*3*4*5*6*7*8*9*10=3628801
 7.627891*2.643189=20.161958
 10000000000/8=1250000000
 100000000000+1.00001=99999997953.00001	<--loss of precision!
 4/-2=					<--not possible due sign. Sorry.
 8/0=					<--not possible. You know.
 100000000*100000000=			<--overflow 
 
This arithmetic calculator is the smallest and simplest I could write.
It takes only some hundred byte in the compressed executable because it does
NOT use precise BCD arithmetics, but built in x87-coprocessor features. 
From technical point of view it is a recursive descent parser.




4. BASIC USAGE
==============
* All versions of e3 accept a filename as argument; see the man page.

* There is a status and input line, where you can enter filenames, 
  find-texts, line numbers  etc.  In the lower right you will find
  a code like "WS" showing the selected editor mode and a help
  pointer (EXCEPT vi).

* e3 changes the appearance of the cursor (to reverse) depending on 
  insert/overwrite mode (on Linux text console only). 

* For details on key bindings read each e3xx's initial page or 
  type Alt-H during edit (for vi use  ESC:h). On some computers (BeOS etc.) 
  Alt-key combinations won't work: press <ESC> followed by the key, e.g. press 
  ESC and H instead of Alt-H.

* e3 shows a dot for characters below ASCII #32.

* At the end of an edit cycle, e3 asks you something like "SAVE? Ynl".  Press
  "n" to NOT save, "l" for SAVE and LOAD new, any other for SAVE and EXIT.



5. MIXED HINTS
==============
* The emacs-mode version has currently a kill buffer but no kill ring and no 
  undo feature, so be careful about that. I'm sure, inside 10000 byte you won't 
  expect a complete Emacs key set, but IMHO you get the most important part.

* The Pico mode is both: extended and incomplete compared to some Pico options,
  new are some ^J (delete) and ^Q (quick_move) keys.

* The size of files you edit is currently limited to the maximum of either 
  100k or twice the file's size if you start with a file on commandline, i.e.,
  for example, starting e3 with a 2MB_sized_file gives you another 2 MB space 
  for inserts.

* You can choose inside the edit session (w/o leaving e3) between the 
  different edit modes, for example:
	-start  e3em <filename>
		---> now using Emacs style keys.
	-type   altX
	-type	e3vi
		--->welcome in the land of vi!
	-type   <ESC> ;
	-type   e3ws
		--->you are entering Wordstar emulation sector!
	....etc....
  This VERY hot keys are ^KM (for WS), ^QM (for Pico), altX (for Emacs),
  ^E (for Nedit) and ; (for vi-mode).


* Everytime if e3vi does not recognize a vi-mode ex command, e3vi will pipe
  the whole editor text buffer through /bin/sed or /bin/ex. I.e. you can use 
  pure sed or ex commands like:
	1,6 s/foo/bar/
	2,$ d
	8,$ w filecopy
	/remove_me/d
  ***TAKE CARE***: "sed" or "ex" won't know your current cursor position in e3!
  What call to subprogram (either ex or sed) is compiled in
  you can find in helptext:
	"pipe buffer through /bin/sed"    
	vs.    
	"pipe buffer through /bin/ex"
  You should know this because the syntax is not equal:
	s/./\./		<--sed syntax
	1,$ s/./\./g	<-- ex syntax
  Also you should know what "sed" version you have installed,
  because sed 2.x and sed 3.x are quite different.
  You can use this new buffer pipe features also from WS-, Pico- and Emacs modes
  by pressing ^KP (Wordstar), or ^JP (Pico), or ^X^P (Emacs).


6. FILES
========
Makefile	- (edit destination path and OS if desired)
e3.asm		- NASM source code
e3.man		- man page (copied by default to /usr/local/man/man1)
e3.spec		- spec file for building RPM archives
README		- you are reading this
ChangeLog	- version history
COPYING.GPL
COPYRIGHT	- please read before using e3!
e3c/*		- C stuff for non x86 systems
contrib/*	- useful things
binaries/*	- separated for Linux, FreeBSD, BeOS


7. THANKS
=========
Konstantin Boldyshev <konst@voshod.com>
Mark Zealey <mark@itsolve.co.uk>
Urs Rau <urs.rau@uk.om.org>
Terry Loveall <loveall@uswest.net>
David Douthitt <n9ubh@callsign.net>
Bjrn De Meyer <bjorn.demeyer@pandora.be>
Matthias Kopfermann <kopfermann@trio-hittfeld.de>
Tim Wegner <twegner@swbell.net>
Michele Andreoli <m.andreoli@tin.it>
Aaron Lehmann <aaronl@vitelus.com>
Zas <lmonin@metaconcept.com>
Sergei Viznyuk <sviznyuk@hotmail.com>


8. TM note
==========
Some names are trademarks of their owners: 
Linux FreeBSD BeOS Windows Digital Unix Cygwin Wordstar DOS  ..etc.
