BSD 1 development
[unix-history] / exrefm / 1.0to1.1
CommitLineData
8e81a891
BJ
1.LG
2.LG
3.LG
4\a
5.sp 5
6.B
7.ce
8Ex changes \- Version 1.0 to 1.1
9.R
10.sp 5
11.NL
12.SH
13.LG
14.LG
15Changes to existing features
16.NL
17.sp 2
18.IP 1)
19The command form consisting of a single `!' which yielded an interactive shell
20has been eliminated.
21A command
22.I shell
23has been added in its place.
24.IP 2)
25The actions in
26.I autoindent
27mode have been changed slightly.
28In the non-open, non-visual
29.I ai
30you no longer return to command mode when you backtab at the left margin.
31In
32.I visual
33and
34.I open,
35.I autoindent
36has been changed to be more like it is in command mode.
37You no longer can backspace over the indent,
38an erase via `@' does not kill the indent,
39and backtabs will not work except over the supplied indent.
40This change makes
41.I ai
42more consistent and also allows a consistent interpretation of
43repeated multi-line textual inputs in
44.I open
45and
46.I visual
47as described below.
48.IP 3)
49The processing of hangup signals is now different\fB...\fR
50see the discussion of crash recovery below.
51.IP 4)
52A number of changes have been made to
53.I open
54and
55.I visual
56modes.
57The ones which affect previously existing commands are:
58.RS
59.IP a)
60The digit `0' is now an operation referring to the first column of the
61current line.
62.IP b)
63A single
64.SM
65DELETE
66.NL
67character no longer drops you out of
68.I visual
69or
70.I open .
71Two successive
72.SM
73DELETE
74.NL
75characters still get you out of
76.I open
77or
78.I visual
79so that it is still true that you can get to command mode
80by hitting
81.SM
82DELETE
83.NL
84enough.
85.IP c)
86Scans via `/' and `?' are now cancelled by hitting a
87.SM
88DELETE
89.NL
90instead of erasing them with `@' as before.
91Failed searches no longer drop you out of
92.I visual \|;
93instead the scan delimiter, `/' or `?', is replaced with `F'
94(for failed search), the terminal bell is rung,
95typeahead is discarded, and the cursor is returned to its previous position.
96.IP d)
97The character \s-2CTRL\s0(Z) in text insert mode no longer has any effect.
98.RE
99.IP 5)
100The editor temporary file now has twice the capacity of before,
101holding up to 256K characters.
102Blanks and tabs are now compressed in the temporary allowing
103much larger files to be edited if they are, e.g., card images.
104.bp
105\a
106.sp 3
107.SH
108.LG
109.LG
110New features
111.NL
112.sp 2
113.LP
114The major additions in this version of the editor are
115in the area of crash recovery and
116.I visual
117and
118.I open
119mode polish.
120We first give a general description of the changes, and then
121give the specific commands and operations.
122.SH
123Crash Recovery
124.LP
125The editor has been changed so that the contents of the buffer file
126may be used to recover the editing state after an
127editor or system crash.
128The buffer file is synchronized with the editing
129progress when a change of twenty of more lines has accumulated in the
130buffer,
131or when a
132.I sync
133command
134(or \s-2CTRL\s0(S) operation in
135.I open
136or
137.I visual \|)
138occurs.
139Thus if the editor or system crashes, you can use the
140.I recover
141command of the editor to retrieve the file you were working on.
142For example, if a crash occurred when you were editing the file
143.I resume
144you can enter
145.I ex
146and issue the command:
147.DS
148.B recover \ \c
149resume
150.DE
151Another, more convenient, way of doing this is to specify the
152.B \-r
153option on the command line, i.e.:
154.DS
155.B
156ex \-r \c
157.R
158resume
159.DE
160The editor will look for the buffer you were editing either in the
161directory where it was being kept, or in the directory
162.B /usr/recover
163where such files are placed after a system crash.
164After recovering the file you should check that it is indeed
165ok before writing it over its previous contents.
166If an error occurs during the recovery operation this means that
167the buffer was not in a consistent state at the time of the
168crash and that you will not be able to recover in this way.
169After a successful
170.I recover
171command the saved buffer is discarded.
172You should therefore write out the contents of the buffer
173if you want to preserve them.
174.SH
175Hangup
176.LP
177When a hangup occurs and the buffer has been modified since it was
178written out,
179.I ex
180first tries a
181.I preserve
182command;
183if this fails, then
184.I ex
185will not unlink the editor buffer in the
186.I directory
187where it was.
188In either case a
189.I recover
190command as above should continue the work where it left off.
191.SH
192``Quota Exceeded'' and ``No Space on Device''
193.LP
194A new command
195.I preserve
196has been added for use in emergencies.
197If you are using the editor and get one of the messages
198``Quota exceeded''
199or
200``No space on device''
201you may wish to save your file in a safe place and seek help.
202The
203.I preserve
204command will save the file as though the editor had just
205crashed.
206After preserving your file you should immediately seek help.
207.bp
208\a
209.sp 3
210.SH
211.LG
212.LG
213New commands
214.sp 2
215.IP
216.RS
217.IP "\fBcd \fIdirectory\fR"
218.br
219A synonym for the
220.I chdir
221command.
222.IP "\fBhelp \fItopic\fR"
223.br
224The
225.I help
226command
227is now implemented.
228It accepts single word arguments and looks in the directory
229.B /usr/lib/how_ex
230for files of the given name supplying information about the given
231argument.
232No files of information have been prepared as yet.
233.IP \fBpreserve\fR
234.br
235The current editor buffer is saved as though the editor had just crashed.
236This command is for use only in emergencies when a
237.I write
238command has resulted in an error and you don't know how to save
239your work.
240After a
241.I preserve
242you should seek help immediately.
243.IP "( \fB.\fR )\|\fBput\fR"
244.br
245The lines removed from the editing buffer by the last command which
246had the ability to change the buffer are restored after the addressed line.
247.I Put
248can be used, e.g., after a
249.I change
250command to retrieve the lines changed away when you decide that
251you want both these and the lines you replaced them with.
252A
253.I delete
254command and a
255.I put
256command effect a
257.I move .
258Note that
259.I put
260is very similar to its
261.I open
262and
263.I visual
264mode counterpart.
265.IP \fBrecover\fR \fIfile\fR
266.br
267The command
268.I recover
269may be used to retrieve the contents of the editor buffer
270after a system crash, editor crash, or a
271.I preserve
272command.
273A
274.I recover
275also occurs implicitly when the
276.B \-r
277option is specified on the command line.
278A file name should be given to
279.I recover
280unless the file of the current name is to be recovered.
281A
282.I recover
283results in the removal of the saved buffer.
284The recovered buffer contents should be checked for sensibility
285and then saved.
286It is not possible to recover from errors occurring during a
287.I recover .
288.IP \fBreset\fR
289.br
290The command
291.I reset
292restores all numeric and Boolean valued options to their default settings.
293.IP \fBshell\fR
294.br
295The
296.I shell
297command forks an interactive shell.
298When this shell is terminated,
299editing resumes.
300.IP \fBsync\fR
301.br
302The
303.I sync
304command causes the contents of the editor temporary file to be synchronized
305to reflect the current state of editing.
306.I Sync
307commands are as useful as
308.I write
309commands,
310and much faster,
311for those who are worried about losing work due to an editor or system crash.
312.IP "( \fB.\fR , \fB.\fR )\|\fByank \fIcount\fR"
313.br
314The
315.I yank
316command
317causes the contents of the addressed lines to define the text to be
318.I put
319by a
320.I put
321command.
322The addressed lines are not affected.
323A
324.I yank
325and a
326.I put
327can be used instead of a
328.I copy
329command.
330.RE
331.bp
332\a
333.sp 3
334.SH
335.LG
336.LG
337New open and visual mode features
338.NL
339.sp 2
340.SH
341Memory
342.LP
343The most important new features relate to memory \-
344the editor remembers the previous command in each of several
345categories and allows it to be repeated by a very short (one-character)
346sequence.
347The remembered information includes:
348.IP
349.B
350Last single character scan.
351.R
352The last of the targeting operations
353.I f ,
354.I F ,
355.I t ,
356and
357.I T
358are remembered as is the target character therewith.
359This combination may be used again by the abbreviation `;'.
360.IP
361.B
362Last pattern scan.
363.R
364The last of the pattern scans with
365`/'
366or
367`?'
368is remembered and may be repeated with the operation
369.I n
370in both open and visual.
371(The previous meaning of
372.I n
373in open is no longer available
374as
375.I n
376now is simply a repeated
377`/'
378or
379`?'
380operation.)
381.IP
382.B
383Last modifying command.
384.R
385The last command which modified the buffer is remembered and
386may be repeated by the command form
387`\fB.\fR'.
388(This may be remembered easily by association with an ellipsis
389`\fB...\fR'.)
390.IP
391.B
392Last inserted text.
393.R
394The text of the last insertion (up to 128 characters) is remembered
395and may be specified in future operations by a
396null character, generated by a \s-2CTRL\s0(@).
397This is given when
398.I text
399would begin,
400instead of text; the
401.SM
402ESCAPE
403.NL
404terminating the
405.I text
406is not needed.
407If there is no previous inserted text, or if the previous inserted
408text was longer than 128 characters, the bell is rung and the
409operation completes inserting no text.
410If the operation was a scan via `/' or `?' it aborts as though
411it had been cancelled with a
412.SM
413DELETE
414.NL
415character.
416.IP
417.B
418Last deleted text.
419.R
420The last deleted text which was part of a single line
421(up to 128 characters)
422is remembered.
423Previously, deleted lines were remembered but not deleted parts of lines.
424Note that some commands (such as those involving a
425.I change
426operation) will set both the deleted and inserted text.
427The
428.I p
429and
430.I P
431operations have been generalized so that if the last deleted text
432was part of a line, then that text will be put after or before
433the current cursor position respectively by these operations.
434.RE
435.SH
436Yank and grab.
437.LP
438There are two new operators yank
439.I y
440and grab
441.I g
442which take a target and pretend it was the previous inserted or deleted
443text respectively.
444The grab
445.I g
446operation is especially useful when you wish to scan for something on the screen \-
447you can
448.I grab
449it,
450and then do a scan defaulting the search with a
451null character.
452The
453.I y
454operation complements
455.I Y
456in working with
457.I p
458and
459.I P .
460.SH
461Motion sequences.
462.LP
463There are a number of new motion sequences in
464.I visual
465and
466.I open.
467The operation
468.I G
469causes the line specified by the preceding count to become the current
470line.
471If the line is on the screen, the screen is not redrawn.
472The default line for
473.I G
474if no count is given is the last line of the file.
475The sequences
476`\(aa\fIx\fR'
477where
478.I x
479is a single lower case letter cause the display to return to the specified
480marked line, with the marked line in the center.
481The previous context mark
482`\(aa\(aa'
483may also be addressed here, and it is set by the searching operations
484`/' and `?',
485the
486.I G
487operation,
488the mark operations
489`\(aa\fIx\fR'
490and the
491.I z
492or
493.I v
494operations if a count is given.
495Marks may be set while in
496.I visual
497or
498.I open
499by using the
500.I K
501operation and following it by a single lower case letter
502specifying the register to be marked.
503.bp
504\a
505.sp 3
506.SH
507.LG
508.LG
509Miscellaneous changes to open and visual
510.NL
511.sp 2
512.IP 1)
513An
514.SM
515ESC
516.NL
517at the top level, not cancelling or ending a command,
518now feeds back a bell to let you know where you are.
519.IP 2)
520You now need two
521.SM
522DELETE
523.NL
524characters in a row to get out of
525.I visual
526or
527.I open .
528One
529.SM
530DELETE
531.NL
532acts as a
533.I cancel
534operation much as
535.SM
536ESCAPE
537.NL
538does.
539.IP 3)
540The operation \s-2CTRL\s0(S) does a
541.I sync
542command while remaining in
543.I visual
544or
545.I open .
546.IP 4)
547The operation \s-2CTRL\s0(X) is now equivalent to
548the operation
549`@'.
550This is also usable as a input kill in text insert mode within
551.I open
552and
553.I visual .
554.IP 5)
555The operation \s-2CTRL\s0(W) is equivalent to
556.I B ,
557acting as an operation as it does while inserting text.
558.IP 6)
559The operation `0'
560now addresses the first position of the line.
561This was difficult to refer to previously.
562.IP 7)
563A new operation
564.I S
565replaces a specified number of lines
566with the following input text up to an \s-2ESC\s0
567like the combination of `\e\e' and an
568.I o
569or
570.I O
571as appropriate.
572.IP 8)
573A multicharacter replace operation
574.I R
575replaces the following characters one-for-one with the text input characters
576in an ``overstrike'' fashion.
577The
578.I R
579operation is terminated with an \s-2ESC\s0.
580.IP 9)
581A new operation
582.I L
583is like
584.I H
585but to the last screen line.
586.IP 10)
587The
588.I visualmessage
589option is now implemented.
590The default
591.I novm
592prohibits interconsole messages during a
593.I visual .
594.IP 11)
595With
596.I autoindent ,
597a `0' followed by a
598\s-2CTRL\s0(D)
599acts much like an
600`^'
601followed by a \s-2CTRL\s0(D),
602except that subsequent text is aligned at the margin.