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