While most people know ex commands only by their use within vi, the editor also exists as a separate program and can be invoked from the shell (for instance, to edit files as part of a script). Within ex, you can enter the vi or visual command to start vi. Similarly, within vi, you can enter Q to quit the vi editor and enter ex.
If you invoke ex as a standalone editor, you can include the following options:
Start editing at line number num, or the last line of the file if num is omitted.
Start editing at the first line matching pattern. (Fails if nowrapscan is set in your .exrc startup file.)
Run the given ex command upon startup. Only one -c option is permitted. An older form of this option, + command, is still supported.
Run as a line editor rather than full-screen vi mode (default).
Enter LISP mode for running LISP programs (not supported in all versions).
Recover and resume editing on file after an aborted editor session or system crash. Without file, list files available for recovery.
Silent; do not display prompts. Useful when running a script. This behavior also can be set through the older - option.
Edit the file containing tag and position the cursor at its definition (see ctags in Chapter 3 for more information).
Run in full-screen mode (same as invoking vi).
Set the window size so rows lines at a time are displayed; useful when editing by a slow dial-up line.
Prompt for a key ...