24 May 1989                                                       sted(1)

NAME
     sted - simple text editor demo program

SYNOPSIS
     sted filename ...

DESCRIPTION
     Sted  is a  simple  text editor  that   illustrates the  use of  the
     TextEditor and TextBuffer classes.  Multiple files can be  edited in
     separate windows.    Initially,  windows are  opened    on each file
     specified on the command   line.    Sted is   not intended to   be a
     complete editor and cannot save modifications to a file.

EDITING MODEL
     Sted implements a small subset of editing commands  using an editing
     model  similar to emacs.   Each window has   a single text selection
     that is displayed with reversed colors.   If the selection is empty,
     an insertion caret is  displayed  instead.   Characters typed into a
     window replace the current contents of the selection.

     Currently defined commands include

         quit
              Close all windows and exit

         close
              Close this window

         visit <filename>
              Open a new window on filename

         file <filename>
              Edit filename in the current window

         search <regexp>
              Search  forward   for a match   with  the   regular
              expression regexp,   wrapping from  the end  to the
              beginning of the buffer if necessary.

         goto <line>
              Move the insertion point to the  beginning  of line
              line, scrolling the display if necessary.

     Commands  are issued by clicking and  typing  in the 'minibuffer' at
     the bottom of the window.

MOUSE BINDINGS
     The left mouse button  is used to  select text.  Clicking   the left
     button in the text window  selects  a new insertion point;  Dragging
     the button selects a range of text.  If the mouse is dragged outside
     the window, the display  is scrolled to keep  the selection point in
     view.

     The middle  and right  mouse  buttons illustrate different  ways  of
     scrolling  with  the   mouse.   Of course,   scrolling can also   be
     performed  using  the scroller in the normal  way.  The middle mouse
     button does 'grabber'  scrolling.  Clicking and  dragging the middle
     button causes the text to move along with the mouse.  This scrolling
     style is useful for fine control  over small scrolling ranges.   The
     right mouse button does 'rate'  scrolling.   Clicking with the right
     button  and 'pulling back'  on the mouse causes  the text  to scroll
     upwards at a rate dependent on the position of the mouse.   'Pushing
     forward' causes downwards   scrolling.  This  style  of scrolling is
     useful for rapidly scanning through a large document.

KEYBOARD BINDINGS
     For convenience, many operations can be performed from the keyboard.
     These operations  include  scrolling, cursor  movement,  and command
     execution.  The current keyboard  bindings mimic similar bindings in
     standard emacs.

	(ESC-V)		backward page
	(^V)		forward page
	(^P)		backward line
	(^N)		forward line
	(^B)		backward character
	(^F)		forward character
	(ESC-<)		beginning of buffer
	(ESC->)		end of buffer
	(^A)		beginning of line
	(^E)		end of line
	(^D)		delete character
	(DEL) (^H)	delete backward character
	(ESC-=)		goto
	(^S)		search
	(^X-^V)		visit
	(^X-^F)		file
	(^X-K)		close
	(^X-^C)		quit

SEE ALSO
     TextBuffer(3I), TextEditor(3I), StringEditor(3I), Regexp(3I)
