EX(VI) − PWB/UNIX 11/15/77
NAME
ex − text editor
SYNOPSIS
ex [ − ] [ −n ] [ −o ] [ −p ] [ [ −r ] name ... ]
DESCRIPTION
Ex is a text editor based on ed (I). A complete description of ex is given in the "Ex Reference Manual." "Getting out of the editor." The only way to leave ex is to type ‘quit’ in command mode (with a ‘:’ prompt.) You can always get to command mode by typing one or more interrupts, generated by the DELETE (RUBOUT) character. You may have to type ‘quit’ more than once if you have made changes to the file editing buffer since you have written it out. "Quota exceeded." If you are writing out a file and you get the message “Quota exceeded” 1 [U proceed with extreme caution. It is likely that only a part of the editor’s buffer is now present in the file you tried to write. In this case you should use the shell escape from the editor to remove some of your files which you don’t need and try to write the file again. If you do not know how to do this, and cannot find someone to help, you should use the editor preserve command to save the editing buffer and then seek help immediately. "Do not simply leave the editor." If you do you may not be able to save your file. "No space on device." If you are writing out a file and get this message, the system has run out of space. As with “Quota exceeded” you may not have a complete copy of your file. This situation is less stable than the quota problem one, however, so you may not be able to recover as described above. It cannot hurt to try. "Crashes." After a crash it is usually possible to recover the work you were doing to within a few lines of changes of where you were. This applies both to editor crashes and system crashes. Change, using chdir (I) to the directory where you were editing and enter the editor specifying the "−r" option, i.e.: ex −r resume if you were editing the file resume. This should allow you to continue where you left off. This is also the way to recover a file saved by preserve.
FILES
/usr/lib/ex1.1stringserror messages
/etc/ttycaptty capability data base
/etc/htmphome directory and teletype type data base
.exrcstart-up file in home directory
/tmp/Exnnnnneditor temporary (nnnnn is decimal pid)
/usr/lib/how_ex/*help command data base
/usr/lib/expreserveroutine implementing preserve command
/usr/lib/exrecoverroutine implementing recover command
/usr/preservepreservation directory
SEE ALSO
“Ex Reference Manual” by William Joy
Topic ex in the system news
ed (I), htmp (V), sethome (V), tset(VI), ttycap (V), ttytype (V), edit (VI), grep (VI), sethome (VI), ttytype (VI)
AUTHOR
William Joy
BUGS
The commands expand or xpand, tabulate and the shifts ‘<’ and ‘>’ do not give feedback that more than notify lines were changed, and print nothing if nothing changes. The shift commands tend to right shift “labels” in C programs annoyingly. It would be nice if the labels were held at the margins. There should be a way to say that, although you have a terminal which prints 132 columns, you have a box of 80 column paper. The set of primitives for dealing with the editor argument list is too primitive. A diagnostic should be given when temporary file space is low or when a file being edited is so large that that the editor limits are being strained. There is no easy way to do a single addressing search or substitute ignoring case. Adding cursor-addressible terminals to the editor requires recompilation. A data string encoding the cursor addressing information could be part of the ttycap data base. The option optimize, although greatly speeding throughput of text with leading blanks on non-cursor addressible terminals, tends to be mysterious and sometimes annoying, as it causes typeahead during output to be lost. It currently “pessimises” on terminals which can tab. The undo comand causes all marks to be lost on lines changed and then restored if the marked lines were changed. Undo never clears the buffer modified condition. The z command prints a number of logical rather than physical lines. More than a screen full of output may result if long lines are present. The R operation in visual and open does not set the previous deleted text. The e and E operations are unimplemented. Changes completely within the text of a single line can be undone only while the cursor remains on that line.