.LG .LG .LG .sp 5 .B .ce Ex changes \- Version 1.0 to 1.1 .R .sp 5 .NL .SH .LG .LG Changes to existing features .NL .sp 2 .IP 1) The command form consisting of a single `!' which yielded an interactive shell has been eliminated. A command .I shell has been added in its place. .IP 2) The actions in .I autoindent mode have been changed slightly. In the non-open, non-visual .I ai you no longer return to command mode when you backtab at the left margin. In .I visual and .I open, .I autoindent has been changed to be more like it is in command mode. You no longer can backspace over the indent, an erase via `@' does not kill the indent, and backtabs will not work except over the supplied indent. This change makes .I ai more consistent and also allows a consistent interpretation of repeated multi-line textual inputs in .I open and .I visual as described below. .IP 3) The processing of hangup signals is now different\fB...\fR see the discussion of crash recovery below. .IP 4) A number of changes have been made to .I open and .I visual modes. The ones which affect previously existing commands are: .RS .IP a) The digit `0' is now an operation referring to the first column of the current line. .IP b) A single .SM DELETE .NL character no longer drops you out of .I visual or .I open . Two successive .SM DELETE .NL characters still get you out of .I open or .I visual so that it is still true that you can get to command mode by hitting .SM DELETE .NL enough. .IP c) Scans via `/' and `?' are now cancelled by hitting a .SM DELETE .NL instead of erasing them with `@' as before. Failed searches no longer drop you out of .I visual \|; instead the scan delimiter, `/' or `?', is replaced with `F' (for failed search), the terminal bell is rung, typeahead is discarded, and the cursor is returned to its previous position. .IP d) The character \s-2CTRL\s0(Z) in text insert mode no longer has any effect. .RE .IP 5) The editor temporary file now has twice the capacity of before, holding up to 256K characters. Blanks and tabs are now compressed in the temporary allowing much larger files to be edited if they are, e.g., card images. .bp .sp 3 .SH .LG .LG New features .NL .sp 2 .LP The major additions in this version of the editor are in the area of crash recovery and .I visual and .I open mode polish. We first give a general description of the changes, and then give the specific commands and operations. .SH Crash Recovery .LP The editor has been changed so that the contents of the buffer file may be used to recover the editing state after an editor or system crash. The buffer file is synchronized with the editing progress when a change of twenty of more lines has accumulated in the buffer, or when a .I sync command (or \s-2CTRL\s0(S) operation in .I open or .I visual \|) occurs. Thus if the editor or system crashes, you can use the .I recover command of the editor to retrieve the file you were working on. For example, if a crash occurred when you were editing the file .I resume you can enter .I ex and issue the command: .DS .B recover \ \c resume .DE Another, more convenient, way of doing this is to specify the .B \-r option on the command line, i.e.: .DS .B ex \-r \c .R resume .DE The editor will look for the buffer you were editing either in the directory where it was being kept, or in the directory .B /usr/recover where such files are placed after a system crash. After recovering the file you should check that it is indeed ok before writing it over its previous contents. If an error occurs during the recovery operation this means that the buffer was not in a consistent state at the time of the crash and that you will not be able to recover in this way. After a successful .I recover command the saved buffer is discarded. You should therefore write out the contents of the buffer if you want to preserve them. .SH Hangup .LP When a hangup occurs and the buffer has been modified since it was written out, .I ex first tries a .I preserve command; if this fails, then .I ex will not unlink the editor buffer in the .I directory where it was. In either case a .I recover command as above should continue the work where it left off. .SH ``Quota Exceeded'' and ``No Space on Device'' .LP A new command .I preserve has been added for use in emergencies. If you are using the editor and get one of the messages ``Quota exceeded'' or ``No space on device'' you may wish to save your file in a safe place and seek help. The .I preserve command will save the file as though the editor had just crashed. After preserving your file you should immediately seek help. .bp .sp 3 .SH .LG .LG New commands .sp 2 .IP .RS .IP "\fBcd \fIdirectory\fR" .br A synonym for the .I chdir command. .IP "\fBhelp \fItopic\fR" .br The .I help command is now implemented. It accepts single word arguments and looks in the directory .B /usr/lib/how_ex for files of the given name supplying information about the given argument. No files of information have been prepared as yet. .IP \fBpreserve\fR .br The current editor buffer is saved as though the editor had just crashed. This command is for use only in emergencies when a .I write command has resulted in an error and you don't know how to save your work. After a .I preserve you should seek help immediately. .IP "( \fB.\fR )\|\fBput\fR" .br The lines removed from the editing buffer by the last command which had the ability to change the buffer are restored after the addressed line. .I Put can be used, e.g., after a .I change command to retrieve the lines changed away when you decide that you want both these and the lines you replaced them with. A .I delete command and a .I put command effect a .I move . Note that .I put is very similar to its .I open and .I visual mode counterpart. .IP \fBrecover\fR \fIfile\fR .br The command .I recover may be used to retrieve the contents of the editor buffer after a system crash, editor crash, or a .I preserve command. A .I recover also occurs implicitly when the .B \-r option is specified on the command line. A file name should be given to .I recover unless the file of the current name is to be recovered. A .I recover results in the removal of the saved buffer. The recovered buffer contents should be checked for sensibility and then saved. It is not possible to recover from errors occurring during a .I recover . .IP \fBreset\fR .br The command .I reset restores all numeric and Boolean valued options to their default settings. .IP \fBshell\fR .br The .I shell command forks an interactive shell. When this shell is terminated, editing resumes. .IP \fBsync\fR .br The .I sync command causes the contents of the editor temporary file to be synchronized to reflect the current state of editing. .I Sync commands are as useful as .I write commands, and much faster, for those who are worried about losing work due to an editor or system crash. .IP "( \fB.\fR , \fB.\fR )\|\fByank \fIcount\fR" .br The .I yank command causes the contents of the addressed lines to define the text to be .I put by a .I put command. The addressed lines are not affected. A .I yank and a .I put can be used instead of a .I copy command. .RE .bp .sp 3 .SH .LG .LG New open and visual mode features .NL .sp 2 .SH Memory .LP The most important new features relate to memory \- the editor remembers the previous command in each of several categories and allows it to be repeated by a very short (one-character) sequence. The remembered information includes: .IP .B Last single character scan. .R The last of the targeting operations .I f , .I F , .I t , and .I T are remembered as is the target character therewith. This combination may be used again by the abbreviation `;'. .IP .B Last pattern scan. .R The last of the pattern scans with `/' or `?' is remembered and may be repeated with the operation .I n in both open and visual. (The previous meaning of .I n in open is no longer available as .I n now is simply a repeated `/' or `?' operation.) .IP .B Last modifying command. .R The last command which modified the buffer is remembered and may be repeated by the command form `\fB.\fR'. (This may be remembered easily by association with an ellipsis `\fB...\fR'.) .IP .B Last inserted text. .R The text of the last insertion (up to 128 characters) is remembered and may be specified in future operations by a null character, generated by a \s-2CTRL\s0(@). This is given when .I text would begin, instead of text; the .SM ESCAPE .NL terminating the .I text is not needed. If there is no previous inserted text, or if the previous inserted text was longer than 128 characters, the bell is rung and the operation completes inserting no text. If the operation was a scan via `/' or `?' it aborts as though it had been cancelled with a .SM DELETE .NL character. .IP .B Last deleted text. .R The last deleted text which was part of a single line (up to 128 characters) is remembered. Previously, deleted lines were remembered but not deleted parts of lines. Note that some commands (such as those involving a .I change operation) will set both the deleted and inserted text. The .I p and .I P operations have been generalized so that if the last deleted text was part of a line, then that text will be put after or before the current cursor position respectively by these operations. .RE .SH Yank and grab. .LP There are two new operators yank .I y and grab .I g which take a target and pretend it was the previous inserted or deleted text respectively. The grab .I g operation is especially useful when you wish to scan for something on the screen \- you can .I grab it, and then do a scan defaulting the search with a null character. The .I y operation complements .I Y in working with .I p and .I P . .SH Motion sequences. .LP There are a number of new motion sequences in .I visual and .I open. The operation .I G causes the line specified by the preceding count to become the current line. If the line is on the screen, the screen is not redrawn. The default line for .I G if no count is given is the last line of the file. The sequences `\(aa\fIx\fR' where .I x is a single lower case letter cause the display to return to the specified marked line, with the marked line in the center. The previous context mark `\(aa\(aa' may also be addressed here, and it is set by the searching operations `/' and `?', the .I G operation, the mark operations `\(aa\fIx\fR' and the .I z or .I v operations if a count is given. Marks may be set while in .I visual or .I open by using the .I K operation and following it by a single lower case letter specifying the register to be marked. .bp .sp 3 .SH .LG .LG Miscellaneous changes to open and visual .NL .sp 2 .IP 1) An .SM ESC .NL at the top level, not cancelling or ending a command, now feeds back a bell to let you know where you are. .IP 2) You now need two .SM DELETE .NL characters in a row to get out of .I visual or .I open . One .SM DELETE .NL acts as a .I cancel operation much as .SM ESCAPE .NL does. .IP 3) The operation \s-2CTRL\s0(S) does a .I sync command while remaining in .I visual or .I open . .IP 4) The operation \s-2CTRL\s0(X) is now equivalent to the operation `@'. This is also usable as a input kill in text insert mode within .I open and .I visual . .IP 5) The operation \s-2CTRL\s0(W) is equivalent to .I B , acting as an operation as it does while inserting text. .IP 6) The operation `0' now addresses the first position of the line. This was difficult to refer to previously. .IP 7) A new operation .I S replaces a specified number of lines with the following input text up to an \s-2ESC\s0 like the combination of `\e\e' and an .I o or .I O as appropriate. .IP 8) A multicharacter replace operation .I R replaces the following characters one-for-one with the text input characters in an ``overstrike'' fashion. The .I R operation is terminated with an \s-2ESC\s0. .IP 9) A new operation .I L is like .I H but to the last screen line. .IP 10) The .I visualmessage option is now implemented. The default .I novm prohibits interconsole messages during a .I visual . .IP 11) With .I autoindent , a `0' followed by a \s-2CTRL\s0(D) acts much like an `^' followed by a \s-2CTRL\s0(D), except that subsequent text is aligned at the margin.