[fa.editor-p] Modes Again

C70:editor-people (06/15/82)

>From LAWS@SRI-AI Tue Jun 15 02:26:17 1982
Various contributors have been saying how difficult it is to
do foo in mode bar, or to be creative at all in a system with
modes.  I disagree with the premise that modes are bad.

Every versatile editor lets you insert text, overwrite text,
move the cursor around, etc.  These are "semantic" modes, whether
or not the editor recognizes them as "syntactic" modes.

A "modeless" editor gives you a top-level insert or replace mode
with escape mechanisms (e.g., control keys) for motion and control
functions.  Usually the cursor is bound to a separate keypad so
that you don't have to work the "mode shift" with every motion
command.  The modeless editor gives you an enormous choice of
commands in a stable environment, but you have to constantly work
the mode shifts (for anything except text entry) and you get only
a weak grouping of control commands into semantic classes.

The Rand-style editors (NED, Z, etc.) offer a top-level replace
mode with an escape to insert mode.  The replace mode is very
compatible with full 2-D cursor motion and with text entry at the
ends of lines or at the end of the document.  It can also be used
for some intra-line editing tasks such as changing misspellings.
A top-level delete key is available for removing excess characters.
You only enter insert mode when your intention is to insert a word
or character, you do it, and then you get right back out.  This
stikes me as very clean.  The only drawback is that you must type
<enter> and <escape>, and this overhead is significant only on
small, frequent changes.

My favorite style for complex work is a top-level "orthogonal"
command mode.  The best examples are VI and ZED, although I would
make changes to either.  The top level lets me use cursor and
control commands without working the mode shift keys, and it gives me
far more control commands than the Rand-style editors or even the
EMACS modeless editors.  (All lowercase and uppercase letters can
be bound to useful commands, as well as the control-  and meta-
versions of these keys.  Further, keystroke pairs and larger
composites are typically assigned to more complex commands.)
To insert text you use an <enter> and <escape> bracketing sequence;
to replace text you do the same with a different <enter> command.
There are (or should be) separate command strokes meaning "insert
(or replace with) the next single character typed", as well as
handy keystrokes for things like "go to the end of the line and
enter insert mode" or "delete the next word and enter insert mode".
The penalty for this flexibility is that you can generally do only primitive
editing while in insert mode: you must jump to command level to do the
editing, then reenter the insert mode.  


It is possible to do creative work in any of these systems.  I find
the Rand editors easiest for straight text manipulation, but I prefer
having a separate command mode for complex tasks.  That command mode
would ideally have the variety and extensibility that are now the
province of EMACS.  (My apologies to fans of formatting or mouse editors;
I haven't enough experience with them to integrate their advantages.)

					-- Ken Laws
-------

C70:editor-people (06/20/82)

>From POURNE@MIT-MC Sun Jun 20 00:39:02 1982
As I have patiently tried to say, althugh apparently no one
believes me, the best editors for micros have all the features
you have just described, including several "command modes"
invoked only when you are doing something complex like macro
expansion or the like.
	ah well