Ed: a Generic Editor


ED is an object-oriented editor toolkit using a subset of BRIEF's key sequences; you can drive it from your programs or simply use it as a text editor. You can easily remap any key sequence to any function, or even implement new features. Basically, ED provides four levels of editor that you access through four creators (meta-functions):
(make-editor [window] ['EXIT-FREELY]) $\Longrightarrow$ a basic editor object
(make-enhanced-editor ...) $\Longrightarrow$ ditto, with additional features
(make-color-editor ...) $\Longrightarrow$ ditto, with block highlight
(make-scheme-editor ...) $\Longrightarrow$ ditto, with scheme-specific rules

Typical use:
(define ed (make-[...-]editor)); create a full-screen editor
(ed 'REMAP-KEY 27 '@GOTO-LINE); remap ESC to ''go to line''
(ed [filename]); open the editor

If you want a multi-window editor, you can define two or more editors in different window ports; scrapbook and keystroke assignements will be shared by all.

This part has been written by Marc Vuilleumier.



Subsections