xref: /titanic_52/usr/src/cmd/vi/port/ex.news (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
1#ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.12	*/
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License, Version 1.0 only
7# (the "License").  You may not use this file except in compliance
8# with the License.
9#
10# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11# or http://www.opensolaris.org/os/licensing.
12# See the License for the specific language governing permissions
13# and limitations under the License.
14#
15# When distributing Covered Code, include this CDDL HEADER in each
16# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17# If applicable, add the following below this CDDL HEADER, with the
18# fields enclosed by brackets "[]" replaced with your own identifying
19# information: Portions Copyright [yyyy] [name of copyright owner]
20#
21# CDDL HEADER END
22#
23
24**********************************************************************
25*** NOTE: All pre-1980 commentary has been removed from this file. ***
26**********************************************************************
27
28Version SVR3.1  	1986
29
30   MAJOR STRUCTURAL CHANGES & ENHANCEMENTS:
31
32	1. ex/vi modified to use an interim version of getopt(3),
33	   so that ex/vi can migrate to standardized command syntax.
34	   Syntax changes:
35
36		ILLEGAL (old)		LEGAL
37
38		-r [optional arg]	-L  (for listing of recovered files)
39					-r arg   (to recover file "arg")
40		+cmd			-c cmd
41		-   (for silent)	-s
42
43	   Both legal and (old) illegal options will be accepted
44	   for a period of time; later, the old illegal options
45	   will be dropped from ex/vi.
46
47	2. It is now possible to recover encrypted files.  The file header has
48	   been changed to include an encrypted flag.  Therefore, if the user
49	   types "vi -r file" when "file" is encrypted, the program will
50	   automatically check the header flag and prompt the user for the
51	   encryption key.  The actions are as follows:
52
53	      command line	encrypted file	  actions
54	      ------------	--------------	  -------
55	       vi -r file	   YES		prompted for key associated
56						with recovered file
57						[editing session not encrypted]
58
59	       vi -r file	   NO		regular recovery
60						[editing session not encrypted]
61
62	      vi -r -x file	   YES		prompted for editing session key
63						[editing session encrypted,
64						editing session key is used
65						to recover file]
66
67	      vi -r -x file	   NO  		prompted for editing session key
68						[editing session encrypted]
69
70	3. The structure of /usr/preserve has been changed to improve security.
71	   The directory /usr/preserve will have read-write-execute permissions
72	   for everybody.  Recovered files will be saved in a subdirectory in
73	   /usr/preserve.  The subdirectory name is the same as the user's id,
74	   owned by the user, and has read-write-execute permissions for the
75	   user only.  The recovered file in the subdirectory has read-write
76	   permissions for the user only.  Expreserve, exrecover, and /usr/preserve
77	   all have owner and group of "bin"; setuid bits in expreserve and
78	   exrecover have been turned off.
79
80	4. the command "vi -r" or "vi -L" used to list recoverable files,
81	   now lists the user's files found in /tmp as well as /usr/preserve/user
82	   so the user has a complete list.  Files are listed under the
83	   appropriate directory names.
84
85	5. name of source directory "vax" changed to "port"
86
87	6. exit code of ex/vi reflects number of error/warning messages
88	   incurred
89
90	7. ctags (used in conjunction with -t option and ":ta") now
91	   installed in /usr/bin/ctags (manual page in Section 1).
92
93	8. added ed-like enhancement such that "s/text/%" will replace
94	   "text" with the righthand side of the previous substitute
95	   command.
96
97	9. added argument to case operator "~" so that multiple substitutions
98	   per line can occur (e.g. "10~").
99
100   BUG FIXES:
101
102	1.*if input being read by source'd file and an error is
103	   encountered, the user is bumped up to the previous source
104	   level, instead of being thrown back into command mode.
105	2.*ex/vi restores tty state if fork fails.
106	3.*ex/vi allows backspacing and retyping of conditional
107	   responses (in the case of ":s/old/new/c").
108	4.*"U" (undo line changes) no longer marks file as modified
109	   when no editing has been done.
110	5.*file not automatically considered modified when "vi +cmd file"
111	   syntax used.
112	6.*actions of "ZZ" altered as follows:
113
114		COMMAND		      OLD ACTIONS	NEW ACTIONS
115		-------		      -----------	-----------
116		vi newfn; ZZ	      no file created	same as old action
117		vi oldfn; ZZ	      oldfn unchanged	same as old action
118		vi newfn; 1,$d; ZZ    no file created	write empty file
119		vi newfn; a text		         (0 char; 0 bytes)
120		  1,$d; ZZ	      no file created	write empty file
121		vi oldfn; 1,$d; ZZ    oldfn unchanged	write empty file
122		vi oldfn; a text;
123		 1,$d; ZZ	      oldfn unchanged	write empty file
124		vi oldfn; dd all; ZZ  write empty file	same as old action@
125
126	7.*cursor now moves to column 1 when HOME arrow key pushed in
127	   INSERT mode.
128	8.*if showmode set, it will display APPEND/INSERT/REPLACE(etc.) mode
129	   as appropriate.
130	9.*"novice" option can now be set or unset properly.
131       10.*yank-put now works when wrapmargin set and user tries to
132	   do a put at the end of a line (i.e., overlapping the wrap
133	   margin).  Similar problem also fixed for ":R" for replacements
134	   beyond 80 columns or overlapping wrap margins (whichever comes
135	   first).
136       11.*stop "!" from being expanded  within the shell escaped command
137	   line.  Now ":!!" or any "!!" (after the initial shell escape)
138	   will cause substitution of the last command.
139       12.*code fixed to allow hardtabs set to 0.  Now, if hardtabs set
140	   to 0 (i.e., terminal does not support hardtabs), ex/vi will
141	   use spaces to emulate tabbing.
142       13.*marks no longer lost after undo
143       14.*Note that the REPORT variable is 5 by default. For informatory
144	   messages when changes have been make for fewer than 5 lines,
145	   the user should ":set report=x" where x is a number.
146       15.*"/" no longer considered a command (for undo purposes)
147       16.*read done by ":Nr file" command  (where N is a line number)
148	   now correctly undone (by "undo" command)
149       17.*added boundary checks so that exceeding maximum permitted map
150	   statements does not generate core dump/infinite loops
151       18.*terminal-dependent mapping removed when the user redefines the
152	   terminal by "set term=xxx" from ex editor (i.e., so only one
153	   terminal is mapped).
154       19.*'w' (advance a word) no longer fails on lines with trailing spaces.
155       20.*newline character not added to empty file.
156       21.*showmode indicator remains on when arrow keys used (e.g., while in
157	   input mode, INPUT MODE indicator is on until the ESC key is pressed).
158       22.*an interrupt during a write operation will no longer cause truncated
159	   file with no backup (happened only if file had NOT been modified
160	   during edit session; otherwise, backup was automatically initiated).
161       23.*new set option "modelines" (abbreviated "ml") created to prevent
162	   accidental interpretation of code by modelines (i.e., any characters
163	   following "ex:" or "vi:" and ending with a ":" would be interpreted
164	   as an ex command that would be executed before the file is loaded
165	   into the editor).  Default of modelines is OFF.
166       24.*"ei:" and "vx:" no longer considered valid triggers to modelines
167       25.*abbreviations fixed so they do not loop recursively
168	   (i.e., ab yes yes!, or ab O O'Connal).
169       26.*J, 1J and 2J perform same operation: joining the current line and
170	   the next line together. 0J is actually two commands: 0 (meaning
171	   go to the beginning of the line) and J (join).
172       27.*when tmp file becomes too big, line of garbage no longer added to
173 	   file.
174       28.*":n +command" no longer infinite loops on 3b2's.
175       29.*%-matching is now interruptible.
176       30.*version information put into /usr/lib/exstrings file.
177
178Version 3.9  February 10, 1983
179
180	A new option "showmode" (smd) causes input mode to be indicated
181	toward the right end of the message line.  This is useful for
182	learning vi and for people who get confused about what mode they
183	are in.  Only the first letter of the message is shown if "terse"
184	is also set.
185
186	A new invocation "vedit" is for novices.  This is like edit but
187	puts you into visual mode right away.  It also sets showmode.
188
189	The default number of lines to scroll in visual mode on a
190	control D is now the variable scroll, not half the variable
191	window.
192
193	A bug causing extra CPU usage when vi is reentered after ^Z
194	has been fixed.  This also fixes a bug causing a hang until the
195	user types something if you are past column 80 before ^Z.
196
197Version 3.8  April 22, 1982
198
199	The main change is conversion from termcap to terminfo.
200
201	More function keys are supported now.  Most function keys
202	with a meaning to vi work both in command mode and input mode.
203
204	A bug in the encryption command causing plain text in the
205	temp file and encrypted text on your screen has been fixed.
206
207	A new command "crypt" or "X" enters encryption mode once
208	you have started editing, like the ed "x" command.
209
210	A new command line option "-V" (verbose) is useful for
211	debugging ex scripts.
212
213	A new boolean set option "flash" allows you to control whether
214	vi uses the visible bell in your terminal (if it has one).
215	The default is "flash", do "set noflash" if the flashing
216	is annoying.
217
218	The "open" boolean option has been deleted.  Ex will no longer
219	prevent the user from entering open mode.  This clears up problems
220	with paths and invocations containing the letter "d".
221
222	If the local system has the Cornell "Fast Timer" driver, vi uses
223	it instead of alarm to detect function keys.  This means that the
224	delay after typing escape will usually only be 0.1 second instead
225	of a full second.  Of course, if the user continues typing, there
226	is no delay at all.
227
228Version 3.7  October 16, 1981
229
230	It is now possible to split lines with substitute commands from vi,
231	by using ^V<return> in the rhs.  This takes care of the last
232	good reason for using ex command mode.
233
234	Mode lines are now supported.  Put a line containing
235		ex: xxx :
236	in the first or last 5 lines of the file, where xxx is any ex
237	command you want executed when that file is read in.  To make
238	other programs happy, it should probably be inside a comment.
239	You can use vi: as well as ex:.  (Note: no space allowed
240	between the "ex" and ":".  The spaces around xxx are considered
241	part of the command, and so are optional.)
242
243	If there is a file .exrc in the current directory, it will be
244	sourced when you enter vi, after your EXINIT or ~/.exrc.
245
246	The changeable scrolling region of the vt100 is now used in
247	place of insert line, resulting in much better performance.
248
249	Vi uses the new AL, DL, LE, RI, DO, and UP (all upper case)
250	termcap capabilities, which are parameterized versions of their
251	lower case equivalents.  This will results in better performance
252	on ANSI terminals, and especially on the Tektronix 4025 which
253	has parameterized local motions but cannot cursor address.
254
255	Vi uses backtabs again.  Now it knows how to handle backtabs on
256	terminals that have tabs set at intervals other than 8, and it
257	won't use backtabs if gtty indicates it can't use tabs.
258
259	A bug causing <escape> <del> to core dump vi has been fixed.
260
261	A bug causing writes to filters when editing encrypted files
262	to write encrypted text has been fixed.
263
264	A bug causing the message "substitution loop", when you enter a
265	1,$s/xxx/yyy/g with lots of changes, has been fixed.
266
267	A bug causing the current directory to be chmod'ed to 0 if you
268	set nomesg after starting up the editor has been fixed.  Note
269	that the nomesg option is intended for your EXINIT, since it only
270	takes effect on entry to the editor.
271
272	The eat newline glitch has been fixed so that vt100's and tab132's
273	handle long lines correctly.
274
275	Some internal changes have been made so that vi can run under UNIX
276	on the Bell Labs 3B machine, the BBN C/70, and the IBM 370.
277
278Version 3.6  October 30, 1980
279
280	A kernel problem on the V7 pdp-11 overlay systems which causes
281	bad EMT traps to happen randomly, core dumping the editor,
282	has been programmed around by catching EMT traps.
283
284	A bug which prevented using a screen larger than 48 lines has
285	been fixed.
286
287	A bug which allowed you to set window to a value larger than
288	your screen size has been fixed.
289
290	The screen size limit on non-VM/Unix systems has been increased
291	to 66 lines or 5000 characters, to allow the Ann Arbor Ambassador
292	terminal to be used.
293
294	A bug which caused hangups to be ignored on USG systems has
295	been fixed.
296
297	A bug which caused maps with multiple changes on multiple lines
298	to mess up has been fixed.
299
300	If you get I/O errors, the file is considered "not edited" so
301	that you don't accidentally clobber the good file with a munged
302	up buffer.
303
304	An inefficiency in 3.5 which caused the editor to always call
305	ttyname has been fixed.
306
307	A bug which prevented the "source" command from working in an
308	EXINIT or from visual has been fixed.
309
310	A bug which caused readonly to be cleared when reading from
311	a writable file with "r" has been fixed.
312
313	The name "suspend" has been made an alias for "stop".
314
315	The stop command now once again works correctly from command mode.
316
317	On a dumb terminal at 1200 baud, "slowopen" is now the default.
318
319	A bug in the shell script "makeoptions" which searched for a
320	string that appeared earlier in a comment has been fixed.
321
322	A bug that caused an infinite loop when you did ":s/\</&/g"
323	has been fixed.
324
325	A bug that caused & with no previous substitution to give
326	"re internal error" has been fixed.
327
328	A bug in the binary search algorithm for tags which sometimes
329	prevented the last tag in the file from being found has been fixed.
330
331	Error messages from expreserve no longer output a linefeed,
332	messing up the screen.
333
334	The message from expreserve telling you a buffer was saved when
335	your phone was hung up has be amended to say the editor was
336	terminated, since a kill can also produce that message.
337
338	The "directory" option, which has been broken for over
339	a year, has been fixed.
340
341	The "r" command no longer invokes input mode macros.
342
343	A bug which caused strangeness if you set wrapmargin to 1
344	and typed a line containing a backslash in column 80 has
345	been fixed.
346
347	A bug which caused the "r<cr>" at the wrapmargin column
348	to mess up has been fixed.
349
350	On terminals with both scroll reverse and insert line,
351	the least expensive of the two will be used to scroll up.
352	This is usually scroll reverse, which is much less annoying
353	than insert line on terminals such as the mime I and mime 2a.
354
355	A bug which caused vi to estimate the cost of cursor motion
356	without taking into account padding has been fixed.
357
358	The failure of the editor to check counts on ^F and ^B commands
359	has been fixed.
360
361	The "remap" option failed completely if it was turned off.
362	This has been fixed.
363
364	A check of the wrong limit on a buffer for the right hand side
365	of substitutions has been fixed.  Overflowing this buffer could
366	produce a core dump.
367
368	A bug causing the editor to go into insert mode if you typed
369	return during an R command has been fixed.
370
371	A bug preventing the + command from working when you edit a
372	new file has been fixed by making it no longer an error to
373	edit a new file (when you first enter the editor.)  Instead
374	you are told it is a new file.
375
376	If an error happens when you are writing out a file, such as
377	an interrupt, you are warned that the file is incomplete.
378
379Version 3.5 -- August 20, 1980
380
381	The provisions for changing the window size with a numeric
382	prefix argument to certain visual commands have been deleted.
383	The correct way to change the window size is to use the z
384	command, for example z5<cr> to change the window to 5 lines.
385
386	The code to handle the -x (encryption) option has been made
387	conditionally compiled, so that ex can run on an an 11/34 (!)
388	with overlays.  Since this code calls getpass, stdio was
389	being pulled in even without VMUNIX being defined.  The
390	savings from not defining CRYPT are about 4K of text and 4.5K
391	of bss.
392
393	Bill Joy put in a buffering scheme under the VMUNIX flag so
394	that up to 64K of file is edited in-core until you make enough
395	changes to force a temp file sync.  This makes entry into the
396	editor much faster, but also makes vi much bigger.
397
398	The source to ex is now sccs'ed.
399
400	An undocumented "feature" which caused the ^^ command to return
401	to the previous tag, if in the current file, instead of the
402	previous file, has been removed.
403
404	A bug which prevented ex from compiling on systems with the new
405	tty driver but no process control (such as Cory) was fixed.
406
407Version 3.4 -- June 24, 1980
408
409	The visual page motion commands ^F and ^B now treat any preceding
410	counts as number of pages to move, instead of changes to the
411	window size.  That is, 2^F moves forward 2 pages.
412
413	A :vi <file> command from visual mode is now treated the same
414	as a :edit <file> or :ex <file> command.  The meaning of the
415	vi command from ex command mode is not affected.
416
417	Provisions to handle the new process stopping features of the
418	Berkeley TTY driver have been added.  A new command, "stop",
419	takes you out of the editor cleanly and efficiently, returning
420	you to the shell.  Resuming the editor puts you back in command
421	or visual mode, as appropriate.  If autowrite is set and there
422	are outstanding changes, a write is done first unless you say
423	"stop!".  From visual mode, the command ^Z is the same as :stop.
424	Note that if you have an arrow key that sends ^Z the stop function
425	will take priority over the arrow function.  If you have your
426	"susp" character set to something besides ^Z, that key will be
427	honored as well.
428
429	A read only mode now lets you guarantee you won't clobber your
430	file by accident.  You can set the on/off option "readonly" (ro)
431	and writes will fail unless you use an ! after the write.
432	Commands such as x, ZZ, and autowrite, and in general anything
433	that writes is affected.  This option is turned on if you invoke
434	ex with the -R flag.  A new link called "view" has been  created.
435	View is just like vi but it sets readonly.
436
437	The encryption code from the v7 editor is now part of ex.
438	You invoke ex with the -x option and it will ask for a key,
439	as ed.  The ed "x" command (to enter encryption mode from
440	within the editor) is not available.
441
442	The editor now adopts the convention that a null string in the
443	environment is the same as not being set.  This applies to
444	TERM, TERMCAP, and EXINIT.
445
446	A word abbreviation mode is now available.  You can define
447	abbreviations with the abbreviate command
448		:abbr foo find outer otter
449	which maps "foo" to "find outer otter".  Abbreviations can be
450	turned off with the "unabbreviate" command.  The syntax of these
451	commands is identical to the map and unmap commands, except
452	that the ! forms do not exist.  Abbreviations are considered
453	when in visual input mode only, and only affect whole words
454	typed in, using the conservative definition.  (Thus "foobar"
455	will not be mapped as it would using map!)
456	Abbreviate and unabbreviate can be abbreviated to "ab" and
457	"una", respectively.
458
459	The editor now supports certain terminals that use strings other
460	then \r and \n for return and linefeed by implementing the cr
461	and nl termcap options.  (Thanks to UCLA for these enhancements).
462
463	The termcap attribute ns is now checked for, and ex refuses to
464	go into visual mode on such a terminal unless it has sf.
465
466	Terminals that can cursor address but cannot go up a line
467	now work in visual.
468
469	If you change your start and stop characters to something other
470	than the default ^S and ^Q, vi now turns them off.  This causes
471	people who change them to escape not to lose so badly.
472	The quit character is once again turned off so that datamedias
473	which send ^\ for the right arrow key work.
474
475	The ~ command now repeats correctly with ".".
476
477	If you type in an unmatched ) or } in showmatch mode, the editor
478	will now beep to warn you about your mistake.  The ) or } is
479	still accepted.
480
481	The way macros are undone has been improved considerably.
482	The number of changes inside the macro is counted, and just
483	before the second change the state before the macro is recreated
484	internally and saved to allow the macro to be undoable as a unit.
485	Hence, if the macro makes only one change the particular change is
486	undone (which will probably not redraw the screen).  If no changes
487	are made (for example, the arrow keys) the previous thing that could
488	be undone is not clobbered.
489
490	The undomacro option has been deleted since it is no longer needed.
491
492	Editor scripts can now contain comments.  Begin the comments with "
493	(double quote).  Comments can be on their own line or come at the
494	end of command lines.  The comment continues to the end of the line.
495
496	The 3rd version of the USG tty driver is now supported, making it
497	possible on USG systems to interrupt redrawing the screen and to
498	not flush output when interruptible commands take place.
499
500	The rewind command has been added to the list of commands that
501	the autowrite option knows about.
502
503	The wrapmargin option is now usable.  The way it works has been
504	completely revamped.  Now if you go past the margin (even in the
505	middle of a word) the entire word is erased and rewritten on the
506	next line.  This changes the semantics of the number given to
507	wrapmargin.  0 still means off.  Any other number is still a
508	distance from the right edge of the screen, but this location
509	is now the right edge of the area where wraps can take place,
510	instead of the left edge.  Wrapmargin now behaves much like
511	fill/nojustify mode in nroff.
512
513	A bug on the USG system where hanging up the phone causes more
514	than one SIGHUP to be sent has been compensated for.
515
516	A bug which caused the :sh command not to send the vs and ti
517	sequences when you returned has been fixed.
518
519	A bug which caused a file that bombed out in the middle of
520	an edit command to be considered modified has been fixed.
521
522	A bug which caused the screen to be wrong after undoing a
523	:move command has been fixed.
524
525	A bug which messed up the buffer and the screen after
526	undoing a :join command has been fixed.
527
528	The source file ex_io.c has been split into ex_io.c and
529	ex_unix.c to avoid a problem where many C compilers overflowed
530	the symbol table.
531
532	A bug which prevented turning off your prompt in your .exrc
533	has been fixed.
534
535	Some of the code internal to the editor has been rearranged
536	and some comments added.
537
538	The bug fix to the USG tty driver to output a null character
539	as padding at 1200 baud has been improved to output a DEL
540	at 1200 baud or above.
541
542	Terminals with small screens (less than 20 columns or less
543	than 5 lines) should now work.
544
545	A bug which prevented you from entering the character DEL
546	into the buffer if you changed your interrupt character to
547	something else besides DEL has been fixed.
548
549	A bug which caused the current line to be clobbered when
550	you did a /, ?, or : command which mapped an input macro
551	successfully has been fixed.
552
553	If you map o to O and O to o and have remap set, the editor
554	now catches the infinite loop.
555
556	A put command after a macro now beeps instead of putting
557	a copy of the whole buffer.  (Note that the arrow keys
558	on terminals are considered macros.)
559
560	A bug which caused things like d) and d} to miss the last
561	character when they should have deleted to the end of the
562	buffer has been fixed.
563
564	A bug which caused the last character to be lost when you
565	read in a file with no newline at the end of the last line
566	has been fixed.
567
568	A bug that caused garbage to be in the buffer if the temp file
569	overflowed has been fixed.  (This only affected non-VMUNIX systems
570	since the temp file cannot overflow on VMUNIX.)
571
572	When a macro or global is undone, you no longer get picked up and
573	dropped on line 1.
574
575	The character | can now be escaped with \| in file names.
576
577	A bug which prevented the confirm option to a substitution that
578	was inside a source command has been fixed.
579
580	A bug which caused the editor to not work if the tab stop size
581	did not divide the screen width has been fixed.
582
583	A bug on HP terminals that caused the screen to be messed up if
584	you scrolled up something that began the same way as the echo line
585	has been fixed.
586
587	A macro bug which sometimes caused the next character after an
588	escape to be ignored on an HP terminal has been fixed.
589
590	A bug which caused unmap of strings with length 2 to fail has been
591	fixed.
592
593	A bug which left vi confused if you invoked a macro containing a
594	quit to command mode and then did an undo has been fixed.
595
596	An old ed bug which caused globals to fail when they did a substitute
597	on the next line has been fixed.
598
599	The % operator will now find matching square brackets the same way
600	it does parentheses and braces.  It will not display them in
601	showmatch mode, however, and will not use a ] to match all ('s.
602
603	Code has been added to handle the Beehive Superbee terminal,
604	using f1 for escape and f2 for control C.
605
606	The default value of the option shell is now taken from the
607	environment variable SHELL, if present.
608
609Version 3.3 -- February 2, 1980
610
611	The default window sizes have been changed.  At 300 baud the
612	window is now 8 lines (was 1/2 the screen size).  At 1200 baud
613	the window is now 16 lines (was 2/3 the screen size, which was
614	usually also 16 for a typical 24 line CRT).  At 9600 baud the
615	window is still the full screen size.  Any baud rate less than
616	1200 behaves like 300, any over 1200 like 9600.
617
618	A new command mode command "x" (for "xit") has been added.  This
619	is the same as wq but will not bother to write if there have been
620	no changes to the file.  The command letter was chosen for
621	convenience and compatibility with hed.
622
623	The command "ZZ" from vi is the same as ":x<cr>".  This is
624	the recommended way to leave the editor.  Z must be typed twice
625	since this is two easy to type by accident and has such severe
626	effects if unintentional.
627
628	The options w300, w1200, and w9600 can be set.  They are synonyms
629	for "window", but only apply at 300, 1200, or 9600 baud, resp.
630	Thus you can specify you want a 12 line window at 300 baud and
631	a 23 line window at 1200 baud with
632		:set w300=12 w1200=23
633
634	It is now possible to say
635		:set window=5
636	and get the effect the next time the screen is redrawn from scratch.
637	(^L and Hit return to continue don't start from scratch.)
638	This is sort of pointless, since both
639		5:<cr>
640	and
641		z5<cr>
642	do the same thing with better results.
643
644	The editor no longer uses nondestructive space, except when in
645	insert mode.  It instead prints the character it would be
646	moving over.  This is a real win on terminals that use an
647	escape sequence to nd space.
648
649	It is now possible from visual to string several search expressions
650	together separated by semicolons the same as command mode.  For
651	example, you can say
652		/foo/;/bar
653	from visual and it will move to the first "bar" after the next "foo".
654	This also works within one line.
655
656	The option "mapinput" is dead.  It has been replaced by a much
657	more powerful mechanism: :map! (e.g. put an ! after the map).
658	Map and unmap commands with ! apply only to input, others apply
659	only to command mode.
660
661	The new option "timeout" (default on) causes macros to time out
662	after one second.  Turn it off and they will wait forever.
663
664	By using map! and setting notimeout, it is possible to get the
665	effect of emacs abbreviation mode.  Sanity checking is turned off
666	for map when ! is present.  This is a crude facility and does not
667	take into account things like the abbreviation being part of a longer
668	word.  It also does not echo until it is satisfied.
669
670	The new option "remap" (default on) causes the editor to attempt
671	to map the result of a macro mapping again until the mapping fails.
672	This makes it possible, say, to map q to # and #1 to something else
673	and get q1 mapped to something else.  Turning it off makes it possible
674	to map ^L to l and map ^R to ^L without having ^R map to l.
675
676	The new option "undomacro" (default on) makes it possible to undo
677	macros as a unit.  Leaving it off causes macros not to be treated
678	specially.  Macros with zero or one change work better with noum,
679	with two or more changes better with um.  This option may go away
680	if it becomes unnecessary.
681
682	The new (string) valued option "tags" allows you to specify a list
683	of tag files, similar to the "path" variable of csh.  The files
684	are separated by spaces (which are entered preceded by a backslash)
685	and are searched left to right.  The default value is
686	"tags /usr/lib/tags", which has the same effect as before.
687	It is recommended that "tags" always be the first entry.
688	On Ernie, /usr/lib/tags contains entries for the system defined
689	library procedures from section 3 of the manual.
690
691	^R is now the same as ^L on terminals where the right arrow key
692	sends ^L (The tvi and the adm 31).
693
694	Looking for a tag now uses binary search.
695
696	The "q" command from visual no longer works at all.  You must
697	use "Q" to get to ex command mode.
698
699	A minor incompatibility with the v7 ed has been fixed.  Previously,
700	to do a global substitute with an escaped newline in the rhs, you
701	had to put two \'s in ex and one in ed.  Ex now accepts the single
702	form as well as the double form.  For example, instead of
703		g/foo/s//foo\\
704		bar/g
705	(which still works), you can now type, as in ed,
706		g/foo/s//foo\
707		bar/g
708	This means that the following ex command, which used to "work":
709		g/foo/s//foo bar\
710		.+1,/mumble/d
711	won't work anymore unless you put the trailing / on the substitution.
712	This usage is pretty obscure anyway.
713
714	Several bugs relating to undoing macros have been fixed.
715
716	A bug which caused the command "g/pattern" to print an error
717	message if "pattern" occurred on the last line has been fixed.
718
719	If you reply ":" to "Hit return to continue", you will again be
720	asked "Hit return to continue" after the next command finishes.
721
722	The maximum length of a string valued option has been raised from
723	32 to 64, for the benefit of the "tags" option.
724
725	It is now possible to search for an escape or delete using f, F, t,
726	T, ;, and ,.  These characters must be quoted with ^V.
727
728	The option "ttytype" is now in correct alphabetical order.
729
730	A bug that caused HP terminals to mess up in insert mode when inserting
731	before a tab which follows 7 or fewer characters at the beginning of a
732	line (such as a tags file) has been fixed.
733
734	It is now possible to include control D in your EXINIT or .exrc.
735
736	A bug which caused the screen to mess up when a glob (such as xx*)
737	doesn't match anything has been fixed.
738
739	The editor now checks for extra junk after a /r.e./ from visual
740	(other than the allowed z command) and beeps if any is found.
741	Previously it was just ignored.
742
743	A bug that caused j and k (up and down) to behave strangely after
744	an insertion has been fixed.
745
746	A bug which causes term to be displayed incorrectly and which
747	caused a crash when changing terminal type when there happened
748	to be several |'s and a long string in genbuf has been fixed.
749	This bug was introduced in ex 2.9.
750
751	The patch for echo lines longer than 80 characters has been
752	repaired to do "Hit return to continue" after such lines and
753	print the entire output.
754
755	A bug that caused a messed up screen after a :sh command from
756	open mode has been fixed.
757
758	A bug which caused a tag request for a nonexistent tag to leave
759	the editor in nomagic mode has been fixed.
760
761	A bug which caused strange behavior if there is no default file
762	name when an autowrite save is attempted has been fixed.
763
764	A bug which caused the cursor to go to the wrong position when
765	^^D or 0^D is entered from column 2 in autoindent mode on terminals
766	that can backspace has been fixed.
767
768Version 3.2 -- January 4, 1980
769
770	A bug that caused nomagic to be set if an error happened within
771	a tag command has been fixed.
772
773	A bug that caused put commands to beep after a macro containing
774	an error has been fixed.
775
776	The mapinput option has been placed in alphabetical order.
777
778	A bug that caused undo to undo more than one macro invocation
779	on the same line has been fixed.
780
781	On non VM/UNIX systems, the screen size has been increased to
782	allow a 40 X 80 Ann Arbor to be used.
783
784Version 3.2 -- December 28, 1980
785
786	Several limits have been increased for VM/UNIX.  Longer lines,
787	more characters of file names, longer regular expressions, etc.
788	Huge files can now be edited directly.  Larger terminals (up to
789	66 lines) can be used.
790
791	An internal change has been made for VM/UNIX that causes error
792	messages to be stored directly instead of in a disk file.
793	This should cause faster response to errors.
794
795Version 3.1.1 -- December 13, 1979
796
797	A bug that caused nested macros not to be undoable has been fixed.
798
799	A bug that caused pounding on the escape key on terminals with
800	arrow keys that send escape sequences to cause undo to mess up
801	has been fixed.
802
803	It is now acknowledged that macros cannot contain the put command.
804	This is due to the implementation of put - previously a put inside
805	a macro dumped a copy of the buffer instead of the desired text and
806	left the editor in a very strange state.  Now such a put just beeps.
807
808Version 3.1 -- November 1, 1979
809
810	Versions from 3.1 up are too large to fit on pdp-11's.
811	(Special overlay software is expected to be available soon
812	for v7 pdp-11 Unix that will make it fit.) Version 2.9
813	is 3.1 with only the bug fixes and very few of the enhancements.
814	2.9 will fit on a pdp-11. Version 2.10 will come out and may
815	correspond to 3.2. (It turned out to correspond to 3.3)
816
817	For compatibility with ed:  's<newline>' may be used as a
818	command and means '&'.  If you set the option "edcompatible"
819	(abbr "ed") the presence or absence of g and c suffices is
820	remembered and can be toggled by repeating the suffices.  The
821	suffix "r" makes the substitution into "~" instead of "&".
822
823	A new command line option -w<n> sets the value of window before
824	starting ex. Hence: 'vi -w5 file' makes a quick change to a file
825	easier at 300 baud.
826
827	Arrow keys on terminals that send more than 1 character now
828	work.  Home up keys are supported as are the four directions.
829	Ex no longer looks at the ma= entry in termcap, but uses the
830	ku, kd, kl, kr, and kh entries.  (Note that the HP 2621 will
831	turn on function key labels, and even then you have to hold
832	shift down.  To avoid turning on the labels, and to give up the
833	function keys, use terminal type 2621nl instead of 2621.)
834
835	A parameterless macro facility is included from visual. Briefly,
836	there are two flavors of macros:
837		a) Put the macro body in a buffer register, say x. Then
838		   type @x to invoke it. @ may be followed by another @
839		   to repeat the last macro.
840		   This allows macros up to 512 chars.
841		b) Use the map command from command mode (typically in the
842		   .exrc file) as follows:
843			map lhs rhs
844		   where lhs will be mapped to rhs.
845		   There are restrictions: lhs's should be 1-keystroke
846		   (either 1 char or 1 function key) since they must be
847		   entered within 1 second. lhs no longer than 10 chars,
848		   rhs no longer than 100. To get " ", "\t", "|", or "\n"
849		   into lhs or rhs, escape them with ctrl V. (It may be
850		   necessary to escape the ctrl V with ctrl V if the map
851		   command is given from visual mode.)
852	For 1 shot macros it is best to put the macro in a buffer register
853	and map a key to '@r', since this will allow the macro to be edited.
854
855	Macros can be deleted with
856		unmap lhs
857
858	The boolean option "mapinput" (mi) will, if on, cause macros to
859	be mapped in input mode as well as command mode (in visual only).
860	For example, you can define ctrl T to be four spaces with
861		:map ^V^T_^V^V____
862		:set mi
863	where underlines represent spaces and the ctrl V's are necessary
864	to get ctrl chars and spaces past various levels, and make ^T be
865	a software tab that even works in the middle of a line.
866
867	If the lhs of a macro is "#0" through "#9", this maps the particular
868	function key instead of the 2 char # sequence, if the terminal has
869	function keys. This only works if termcap has function key entries
870	for the particular terminal. For terminals without function keys,
871	the sequence #x means function key x, as typed. As a special case,
872	on terminals without function keys, the #x sequence need not be
873	typed within one second. The character # can be changed by using
874	a macro in the usual way:
875		map ^V^I #
876	to use tab, for example. (This won't affect the map command, which
877	still uses #, but just the invocation from visual mode.)
878	The undo command will undo an entire macro call as a unit.
879
880	New commands in visual: ^Y and ^E. These glitch the screen up
881	and down 1 line, respectively. They can be given counts, controlling
882	the number of lines the screen is glitched. They differ from ^U
883	and ^D in that the cursor stays over the same line in the buffer
884	it was over before rather than staying in the same place on the
885	screen. (^Y on a dumb terminal with a full screen will redraw the
886	screen moving the cursor up a few lines.) If you're looking for
887	mnemonic value in the names, try this: Y is right next to U and
888	E is right next to D.
889
890	More new commands in visual: '&' is a synonym for ':&<cr>'.
891	'~' changes the case of the letter under the cursor and moves
892	to the next character.
893
894	Ex looks in your environment for EXINIT. If it finds it, that
895	is used instead of looking for your .exrc. This should make
896	entry into ex faster, along with the termlib feature of looking
897	for a termcap entry in TERMCAP.
898
899Version 2.13 -- September 23, 1980
900
901	The provisions for changing the window size with a numeric
902	prefix argument to certain visual commands have been deleted.
903	The correct way to change the window size is to use the z
904	command, for example z5<cr> to change the window to 5 lines.
905
906	An undocumented "feature" which caused the ^^ command to return
907	to the previous tag, if in the current file, instead of the
908	previous file, has been removed.
909
910Version 2.12 -- July 23, 1980
911
912	A change was made to the sys_errlist array in ex_subr.c so that
913	Berkeley V7 quotas will produce the right error message.
914
915	A couple of minor bug fixes were made to get the editor to
916	compile on version 6.  The option to use 1K BUFSIZ has been
917	deleted, since it is no longer used on our 1K system.
918
919Version 2.11 -- June 24, 1980
920
921	The visual page motion commands ^F and ^B now treat any preceding
922	counts as number of pages to move, instead of changes to the
923	window size.  That is, 2^F moves forward 2 pages.
924
925	A :vi <file> command from visual mode is now treated the same
926	as a :edit <file> or :ex <file> command.  The meaning of the
927	vi command from ex command mode is not affected.
928
929	A read only mode now lets you guarantee you won't clobber your
930	file by accident.  You can set the on/off option "readonly" (ro)
931	and writes will fail unless you use an ! after the write.
932	Commands such as x, ZZ, and autowrite, and in general anything
933	that writes is affected.  This option is turned on if you invoke
934	ex with the -R flag.  A new link called "view" has been  created.
935	View is just like vi but it sets readonly.
936
937	The editor now supports certain terminals that use strings other
938	then \r and \n for return and linefeed by implementing the cr
939	and nl termcap options.  (Thanks to UCLA for these enhancements).
940
941	The termcap attribute ns is now checked for, and ex refuses to
942	go into visual mode on such a terminal unless it has sf.
943
944	If you change your start and stop characters to something other
945	than the default ^S and ^Q, vi now turns them off.  This causes
946	people who change them to escape not to lose so badly.
947	The quit character is once again turned off so that datamedias
948	which send ^\ for the right arrow key work.
949
950	If you type in an unmatched ) or } in showmatch mode, the editor
951	will now beep to warn you about your mistake.  The ) or } is
952	still accepted.
953
954	Editor scripts can now contain comments.  Begin the comments with "
955	(double quote).  Comments can be on their own line or come at the
956	end of command lines.  The comment continues to the end of the line.
957
958	The 3rd version of the USG tty driver is now supported, making it
959	possible on USG systems to interrupt redrawing the screen and to
960	not flush output when interruptable commands take place.
961
962	The rewind command has been added to the list of commands that
963	the autowrite option knows about.
964
965	A bug on the USG system where hanging up the phone causes more
966	than one SIGHUP to be sent has been compensated for.
967
968	A bug which caused a file that bombed out in the middle of
969	an edit command to be considered modified has been fixed.
970
971	The source file ex_io.c has been split into ex_io.c and
972	ex_unix.c to avoid a problem where many C compilers overflowed
973	the symbol table.
974
975	A bug which prevented turning off your prompt in your .exrc
976	has been fixed.
977
978	Some of the code internal to the editor has been rearranged
979	and some comments added.
980
981	The bug fix to the USG tty driver to output a null character
982	as padding at 1200 baud has been improved to output a DEL
983	at 1200 baud or above.
984
985	Terminals with small screens (less than 20 columns or less
986	than 5 lines) should now work.
987
988	A bug which prevented you from entering the character DEL
989	into the buffer if you changed your interrupt character to
990	something else besides DEL has been fixed.
991
992	A bug which caused things like d) and d} to miss the last
993	character when they should have deleted to the end of the
994	buffer has been fixed.
995
996	A bug which caused the last character to be lost when you
997	read in a file with no newline at the end of the last line
998	has been fixed.
999
1000	A bug that caused garbage to be in the buffer if the temp file
1001	overflowed has been fixed.
1002
1003	The character | can now be escaped with \| in file names.
1004
1005	A bug which caused the editor to not work if the tab stop size
1006	did not divide the screen width has been fixed.
1007
1008	A bug on HP terminals that caused the screen to be messed up if
1009	you scrolled up something that began the same way as the echo line
1010	has been fixed.
1011
1012	An old ed bug which caused globals to fail when they did a substitute
1013	on the next line has been fixed.
1014
1015	The % operator will now find matching square brackets the same way
1016	it does parentheses and braces.  It will not display them in
1017	showmatch mode, however, and will not use a ] to match all ('s.
1018
1019	Ex looks in your environment for EXINIT. If it finds it, that
1020	is used instead of looking for your .exrc. This should make
1021	entry into ex faster, along with the termlib feature of looking
1022	for a termcap entry in TERMCAP.
1023
1024	Internally, it is possible to turn off about a dozen different
1025	options when compiling the editor to make it fit in 64K.
1026	See the makefile for a list of options.
1027
1028Version 2.10 -- February 2, 1980 (Corresponds to 3.3)
1029
1030	The default window sizes have been changed.  At 300 baud the
1031	window is now 8 lines (was 1/2 the screen size).  At 1200 baud
1032	the window is now 16 lines (was 2/3 the screen size, which was
1033	usually also 16 for a typical 24 line CRT).  At 9600 baud the
1034	window is still the full screen size.  Any baud rate less than
1035	1200 behaves like 300, any over 1200 like 9600.
1036
1037	A new command mode command "x" (for "xit") has been added.  This
1038	is the same as wq but will not bother to write if there have been
1039	no changes to the file.  The command letter was chosen for
1040	convenience and compatibility with hed.
1041
1042	The command "ZZ" from vi is the same as ":x<cr>".  This is
1043	the recommended way to leave the editor.  Z must be typed twice
1044	since this is two easy to type by accident and has such severe
1045	effects if unintentional.
1046
1047	The options w300, w1200, and w9600 can be set.  They are synonyms
1048	for "window", but only apply at 300, 1200, or 9600 baud, resp.
1049	Thus you can specify you want a 12 line window at 300 baud and
1050	a 23 line window at 1200 baud with
1051		:set w300=12 w1200=23
1052
1053	The "q" command from visual no longer works at all.  You must
1054	use "Q" to get to ex command mode.
1055
1056	The editor no longer uses nondestructive space, except when in
1057	insert mode.  It instead prints the character it would be
1058	moving over.  This is a real win on terminals that use an
1059	escape sequence to nd space.
1060
1061	A minor incompatibility with the v7 ed has been fixed.  Previously,
1062	to do a global substitute with an escaped newline in the rhs, you
1063	had to put two \'s in ex and one in ed.  Ex now accepts the single
1064	form as well as the double form.  For example, instead of
1065		g/foo/s//foo\\
1066		bar/g
1067	(which still works), you can now type, as in ed,
1068		g/foo/s//foo\
1069		bar/g
1070	This means that the following ex command, which used to "work":
1071		g/foo/s//foo bar\
1072		.+1,/mumble/d
1073	won't work anymore unless you put the trailing / on the substitution.
1074	This usage is pretty obscure anyway.
1075
1076	A bug which caused the command "g/pattern" to print an error
1077	message if "pattern" occurred on the last line has been fixed.
1078
1079	Limits have been raised so that an Ann Arbor terminal can be used,
1080	and long tags can now be accommodated.
1081
1082	A bug that caused HP terminals to mess up in insert mode when inserting
1083	before a tab which follows 7 or fewer characters at the beginning of a
1084	line (such as a tags file) has been fixed.
1085
1086	A bug which causes term to be displayed incorrectly and which
1087	caused a crash when changing terminal type when there happened
1088	to be several |'s and a long string in genbuf has been fixed.
1089	This bug was introduced in ex 2.9.
1090
1091	The patch for echo lines longer than 80 characters has been
1092	repaired to do "Hit return to continue" after such lines and
1093	print the entire output.
1094
1095	A bug that caused a messed up screen after a :sh command from
1096	open mode has been fixed.
1097
1098	A bug which caused a tag request for a nonexistent tag to leave
1099	the editor in nomagic mode has been fixed.
1100
1101	A bug which caused strange behavior if there is no default file
1102	name when an autowrite save is attempted has been fixed.
1103
1104	A bug which caused the cursor to go to the wrong position when
1105	^^D or 0^D is entered from column 2 in autoindent mode on terminals
1106	that can backspace has been fixed.
1107
1108	In order to get 2.10 to fit on a v7 pdp-11, the following features
1109	have been deleted:
1110		The MASTERTAGS feature (undocumented use of /usr/lib/tags
1111		as an alternate tag file)
1112		Checking that a file being read in is an ascii file.
1113		Turning off ^Q/^S on a v7 system.
1114
1115