added README.md

master
Hugh Barney 6 years ago
parent e1b7e7d467
commit 2b0d421ee4

@ -1,8 +1,10 @@
#Zepto Emacs
Smallest usable Editor in less than 1000 lines of C.
#Zep Emacs
Zepto Emacs is the smallest in a family of Emacs type editors inspired by MicroEmacs, Nano, Pico and my earlier project known as Perfect Emacs [1].
Smallest usable Editor in less than 800 lines of C.
Zep Emacs is the smallest in a family of Emacs type editors inspired by MicroEmacs, Nano, Pico and my earlier project known as Perfect Emacs [1].
* Zep is a single window minimal editor in less than 800 lines of C. (uses ncurses).
* Zepto is a single window minimal editor in less than 1000 lines of C that uses VT100 escape sequences instead of ncurses.
* Atto is the smallest fuctional Emacs in less than 2000 lines of C.
* FemtoEmacs is an Atto based Emacs with the FemtoLisp extension language.
@ -10,14 +12,14 @@ Zepto Emacs is the smallest in a family of Emacs type editors inspired by MicroE
> A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
> -- <cite>Antoine de Saint-Exupery</cite>
##Goals of Zepto Emacs
##Goals of Zep Emacs
* Provide just enough editing features to be able to make small changes to files
* Act as an experimental platform for using VT100 / rawio instead of using the curses library
* Smallest code footprint to demonstrate the buffer editor concept without the distraction of more advanced editor features.
* Be easy to understand without requiring extensive study (to encourage further experimentation).
##Why the name Zepto ?
##Why the name Zep ?
The small Emacs naming scheme appears to use sub-unit prefixes in decending order with each further reduction of functionality. The Nano and Pico Emacs editors have been around for a while.
* Nano means 10 to the power of minus 9
@ -25,13 +27,15 @@ The small Emacs naming scheme appears to use sub-unit prefixes in decending orde
* Femto means 10 to power of minus 15
* Atto means 10 to power of minus 18
* Zepto means 10 to the power of minus 21
* Zep is smaller version of Zepto Emacs
In Defining Atto as the lowest functional Emacs I have had to consider the essential feature set that makes Emacs, 'Emacs'. I have defined this point as a basic Emacs command set and key bindings; the ability to edit multiple files (buffers), and switch between them; edit the buffers in mutliple windows, cut, copy and paste; forward and reverse searching, a replace function and basic syntax hilighting. The proviso being that all this will fit in less than 2000 lines of C.
Zepto has the smallest possible feature set to make a viable file editor. Zepto supports basic movement around the file, character insertion, deletion, backspace, line deletion, cut, copy, paste and the ability to search for a text string. Although Zepto uses a subset of the Emacs keyboard command set; it cant really be considered to be an Emacs in that it does not support the editing of multiple files in multiple windows.
Zep has the smallest possible feature set to make a viable file editor. Zep supports basic movement around the file, character insertion, deletion, backspace, line deletion, cut, copy, paste and the ability to search for a text string. Although Zep uses a subset of the Emacs keyboard command set; it cant really be considered to be an Emacs in that it does not support the editing of multiple files in multiple windows.
##Derivation
Femto, Atto and Zepto is based on the public domain code of Anthony Howe's editor (commonly known as Anthony's Editor or AE, [2]). Rather than representing a file as a linked list of lines, the AE Editor uses the concept of a Buffer-Gap [4,5,6]. A Buffer-Gap editor stores the file in a single piece of contiguous memory with some extra unused space known as the buffer gap. On character insertion and deletion the gap is first moved to the current point. A character deletion then extends the gap by moving the gap pointer back by 1 OR the gap is reduced by 1 when a character is inserted. The Buffer-Gap technique is elegant and significantly reduces the amount of code required to load a file, modify it and redraw the display. The proof of this is seen when you consider that Atto supports almost the same command set that Pico supports, but Pico requires almost 17 times the amount of code.
Femto, Atto, Zepto and Zep are based on the public domain code of Anthony Howe's editor (commonly known as Anthony's Editor or AE, [2]). Rather than representing a file as a linked list of lines, the AE Editor uses the concept of a Buffer-Gap [4,5,6]. A Buffer-Gap editor stores the file in a single piece of contiguous memory with some extra unused space known as the buffer gap. On character insertion and deletion the gap is first moved to the current point. A character deletion then extends the gap by moving the gap pointer back by 1 OR the gap is reduced by 1 when a character is inserted. The Buffer-Gap technique is elegant and significantly reduces the amount of code required to load a file, modify it and redraw the display. The proof of this is seen when you consider that Atto supports almost the same command set that Pico supports, but Pico requires almost 17 times the amount of code.
##Comparisons with Other Emacs Implementations
@ -52,12 +56,13 @@ Femto, Atto and Zepto is based on the public domain code of Anthony Howe's edito
ue3.10 uemacs 171664 52.4K 16
GNUEmacs emacs 14632920 358.0k 186
##Starting Zepto
Zepto can only open one file at a time. The filename to edit must be specified on the command line.
##Starting Zep
Zep can only open one file at a time. The filename to edit must be specified on the command line.
$ zepto filename
$ zep filename
##Zepto Key Bindings
##Zep Key Bindings
C-A begining-of-line
C-B backward-character
C-D delete-char
@ -115,7 +120,7 @@ Generally, the procedure for copying or moving text is:
3. Move the cursor to the desired location and yank it back (with ^Y).
##Copying
Zepto code is released to the public domain.
Zep is released to the public domain.
hughbarney AT gmail.com 2017
##References

Loading…
Cancel
Save