

UPDATE FOR VERSION 7						7 June, 1990
====================

New features for version 7 include:

	* unlimited number of text lines (until memory runs out)
	* unlimited line length (ditto)
	* adoption of the ISO Latin 1 character set

Sections of `ve' have been rewritten to improve error handling, portability
and efficiency.  There are no new commands.


SYNOPSIS
========

ve		invoke editor
ve file		invoke editor, editing file
ve !command	invoke editor, editing the command output


COMMAND MODE
============

command	notes	description
--------	-----	-----------
:e file		C O	edit new file
:E file		C O	edit new file even if buffer changes not saved
:r file		C O	read file into buffer before current line
:rz file	C O	like  :r  but also define zone
:w file		C O	write buffer to file
:W file			write buffer even if file exists
:wq file	C O	write buffer to file, then quit
:wz file	C O	write zone to file
:wzq file	C O	write zone to file, then quit
:c command	o	buffer is input to command, output replaces buffer
:cz command	o	zone is input to command, output replaces zone
:q			quit from editor
:Q			quit even if buffer not saved
:f file			set the remembered file name
:f			print the remembered file name
:fr file	C	set only the remembered input file name
:fw file	C	set only the remembered output file name
:!command		execute shell command
:gz/cat/p	G P	global print; trailing `p' optional
:gz/cat/d	G P	global delete
:gz//s//dog/gp	G P	global substitute; trailing `g' and `p' optional
:^V			print version info

notes
-----
	C	May take a shell command line prefixed by `!'.
	O	If optional file name omitted, use remembered name.
	o	If optional command omitted, use previous command.
	G	`v' may replace `g', `z' is optional, `/' may be any char.
	P	If pattern is empty, use previous.


EDIT MODE
=========

command		notes	description
-------		-----	-----------
<RETURN>	#	go to beginning of next line
<LINEFEED>	#	go to beginning of next line
;		#	go to beginning of previous line
l		#	go straight down a line
L		#	go straight up a line
+		#	go straight down a line
-		#	go straight up a line
j		J	go to beginning of current line + J
J		J	go to beginning of current line - J
p		#	go to next page, same column
P		#	go to previous page, same column
G			go to beginning of line 1
g		L	go to beginning of line L
wt			adjust window so current line is at top of screen
wc			adjust window so current line is in center of screen
wb			adjust window so current line is at bottom of screen
ww			repeat last wt, wc or wb command
wl			lock text window
wL			unlock text window
w<RETURN>		open text window fully
<SPACE>		#	go to next column
<BACKSPACE>	#	go to previous column
<TAB>		#	go to next tab stop
`		#	go to previous tab stop
^			go to column 1
$			go to end of line
/cat<RETURN>	P	search forward for "cat"
?dog<RETURN>	P	search backward for "dog"
fa			find next "a"
Fa			find previous "a"
s			search forward, previous pattern
S			search backward, previous pattern
kz		M	mark current character position as `z'
'z		M	go to character marked as `z'
zz		M	define zone to line marked `z'
z		N	define zone of N lines
z<RETURN>		undefine zone
dl		C #	delete current line
dc		C #	delete current char
dC		C #	delete previous char
dw		C #	delete word
d^		C	delete all chars to left of cursor
d$		C	delete all chars from cursor to end-of-line
ds		C	delete text found by last search
dz		C	delete zone
dd		#	delete current line
x		#	delete current char
X		#	delete previous char
h		I	change all chars from cursor to end-of-line
r		I	change text found by last search
i		I	insert before current char position
I		I	insert at end-of-line
o		I	open new line before current
%		#	join next line to end of current
m			move zone in front of current line
t		#	copy zone in front of current line
>		#	indent zone by one tab stop
<		#	exdent zone by one tab stop
.			repeat last text-altering command
u		#	undo previous text-altering command
U		#	undo undo
^R			redraw screen after henry writes to you
=			print current line number

notes
-----
	#	A leading count is optional.
	N	A leading count is required.
	J	If leading count is not given, use remembered J count.
	L	If a leading line number is not given, assume end-of-buffer.
	P	If pattern is empty, use previous.
	M	Any lower case char may be used.
	C	Replace `d' by `c' for change command (enters insert mode).
	I	Enters insert mode.


INSERT MODE
===========

char		what happens
----		------------
<ESCAPE>	exit insert mode
<RETURN>	continue inserting on next line
<BACKSPACE>	delete previously inserted char
@		delete all inserted chars on this line
\		insert next char, even if it is special in insert mode


GENERAL NOTES
=============

	The motion commands take an optional count, e.g.   7;   will back up
7 lines.  If you are beyond the end of the current line, the insert command
goes to end-of-line.  The window alignment command   ww   is automatically
used when commands move the current editing position to a distant line.
	A zone is created by the command   z   , containing the current line,
the marked line designated by the   z   command, and all lines in between.
This zone may be referenced automatically by certain commands, e.g.  m   .


SEARCH AND REPLACE
==================

The   /   ?   S   s   ds   r   :g   commands use a search pattern, also
called a "regular expression".  The regular expression is similar to that
used by the UNIX editor `ed', but includes word search, e.g.
	cat	matches "cat", "caterpillar", "ducat", "staccato"
	~cat	matches "cat", "caterpillar"
	cat~	matches "cat", "ducat"
	~cat~	matches "cat"
Searching places the cursor at the start of the matching text.  If the
pattern contains a   \(   \)   bracket pair, the matching text is considered
to lie between the brackets.


INFINITE UNDO AND UNDO-UNDO
===========================

        A complete history of all text buffer changes is maintained by `ve',
called the time-line.  Normally, a user is at the end of the time-line,
changing text.  However, the user may move backwards along the time-line,
viewing earlier states of the buffer.  In fact, the user may move backwards
and forwards along the time-line without restraint.  Furthermore, any commands
that do not alter the text buffer may be executed without destroying the
time-line.  Commands that change the buffer will operate normally, but the
"future" is lost, i.e. the current position in the editing time-line becomes
the end of the time line.  Users beware: there is no way to recover the future
once it is lost, so think twice when you are in the "past" and want to alter
the buffer.  The time-line is also killed by the   :E   and   :e   commands.
Only text is restored: no record is maintained of earlier remembered file
names, automatic counts, search patterns, etc.


UNIX ENVIRONMENT
================

`ve' refers to several shell variables in the UNIX environment.  These are
needed when default settings are wrong.

TERM tells what type of terminal is being used, and characteristics of that
terminal are read from the file given by VATTR.  Terminal characteristics
include the number of lines and columns, although these may be overridden by
LINES and COLUMNS.

If a hangup signal occurs before changes can be saved, the buffer is written
to the file "ve.hup" in the current directory.  If this fails, a second
attempt is made in the user's home directory, as given by HOME.

SHELL gives the full path name of the shell to be used for all sub-commands.


CHARACTER SET
=============

`ve' uses the ISO Latin 1 character set when interpreting data from files and
the terminal.  This 8-bit standard includes the 7-bit ASCII standard, and
enables European characters and punctuation to be part of text files.
Terminals that can display Latin 1 should indicate this ability in the
`vattr' file.
