


      EEEEXXXX((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       EEEEXXXX((((1111))))



      NNNNAAAAMMMMEEEE
           ex - text editor

      SSSSYYYYNNNNTTTTAAAAXXXX
           eeeexxxx [ ---- ] [ ----vvvv ] [ ----tttt tag ] [ ----rrrr ] [ ++++_c_o_m_m_a_n_d ] [ ----llll ] name
           ...

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _E_x is the root of a family of editors:  _e_d_i_t, _e_x and _v_i. _E_x
           is a superset of _e_d, with the most notable extension being a
           display editing facility.  Display based editing is the
           focus of _v_i.

           If you have not used _e_d, or are a casual user, you will find
           that the editor _e_d_i_t is convenient for you.  It avoids some
           of the complexities of _e_x used mostly by systems programmers
           and persons very familiar with _e_d.

           If you have a CRT terminal, you may wish to use a display
           based editor; in this case see _v_i(1), which is a command
           which focuses on the display editing portion of _e_x.

      DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
           The document _E_d_i_t: _A _t_u_t_o_r_i_a_l provides a comprehensive
           introduction to _e_d_i_t assuming no previous knowledge of
           computers.

           The _E_x _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l - _V_e_r_s_i_o_n _3._1 is a comprehensive and
           complete manual for the command mode features of _e_x, but you
           cannot learn to use the editor by reading it.  For an
           introduction to more advanced forms of editing using the
           command mode of _e_x see the editing documents written by
           Brian Kernighan for the editor _e_d; the material in the
           introductory and advanced documents works also with _e_x.

           _A_n _I_n_t_r_o_d_u_c_t_i_o_n _t_o _D_i_s_p_l_a_y _E_d_i_t_i_n_g _w_i_t_h _V_i introduces the
           display editor _v_i and provides reference material on _v_i. The
           _V_i _Q_u_i_c_k _R_e_f_e_r_e_n_c_e card summarizes the commands of _v_i in a
           useful, functional way, and is useful with the _I_n_t_r_o_d_u_c_t_i_o_n.

      FFFFOOOORRRR EEEEDDDD UUUUSSSSEEEERRRRSSSS
           If you have used _e_d you will find that _e_x has a number of
           new features useful on CRT terminals.  Intelligent terminals
           and high speed terminals are very pleasant to  use with _v_i.
           Generally, the editor uses far more of the capabilities of
           terminals than _e_d does, and uses the terminal capability
           data base _t_e_r_m_c_a_p(5) and the type of the terminal you are
           using from the variable TERM in the environment to determine
           how to drive your terminal efficiently.  The editor makes
           use of features such as insert and delete character and line
           in its vvvviiiissssuuuuaaaallll command (which can be abbreviated vvvviiii) and
           which is the central mode of editing when using _v_i(1).



      Page 1                                                   (9010-E)






      EEEEXXXX((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       EEEEXXXX((((1111))))



           There is also an interline editing ooooppppeeeennnn (oooo) command which
           works on all terminals.

           _E_x contains a number of new features for easily viewing the
           text of the file.  The zzzz command gives easy access to
           windows of text.  Press ^D to cause the editor to scroll a
           half-window of text; this is more useful than RETURN for
           stepping through a file quickly.  Of course, the screen
           oriented vvvviiiissssuuuuaaaallll mode gives constant access to editing
           context.

           _E_x gives you more help when you make mistakes.  The uuuunnnnddddoooo (uuuu)
           command allows you to reverse any single change which goes
           astray.  _E_x gives you a lot of feedback, normally printing
           changed lines, and indicates when more than a few lines are
           affected by a command so that it is easy to detect when a
           command has affected more lines than it should have.

           The editor also normally prevents overwriting existing files
           unless you edited them so that you don't accidentally
           clobber with a _w_r_i_t_e a file other than the one you are
           editing.  If the system (or editor) crashes, or you
           accidentally hang up the phone, you can use the editor
           rrrreeeeccccoooovvvveeeerrrr command to retrieve your work.  This will get you
           back to within a few lines of where you left off.

           _E_x has several features for dealing with more than one file
           at a time.  You can give it a list of files on the command
           line and use the nnnneeeexxxxtttt (nnnn) command to deal with each in turn.
           The nnnneeeexxxxtttt command can also be given a list of file names, or
           a pattern as used by the shell to specify a new set of files
           to be dealt with.  In general, filenames in the editor may
           be formed with full shell metasyntax.  The metacharacter `%'
           is also available in forming filenames and is replaced by
           the name of the current file.

           For moving text between files and within a file the editor
           has a group of buffers, named _a through _z. You can place
           text in these named buffers and carry it over when you edit
           another file.

           There is a command &&&& in _e_x which repeats the last ssssuuuubbbbssssttttiiiittttuuuutttteeee
           command.  In addition there is a confirmed substitute
           command.  You give a range of substitutions to be done and
           the editor interactively asks whether each substitution is
           desired.

           You can use the ssssuuuubbbbssssttttiiiittttuuuutttteeee command in _e_x to systematically
           convert the case of letters between upper and lower case.
           It is possible to ignore case of letters in searches and
           substitutions.  _E_x also allows regular expressions which
           match words to be constructed.  This is convenient, for



      Page 2                                                   (9010-E)






      EEEEXXXX((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       EEEEXXXX((((1111))))



           example, in searching for the word ``edit'' if your document
           also contains the word ``editor.''

           _E_x has a set of _o_p_t_i_o_n_s which you can set to tailor it to
           your liking.  One option which is very useful is the
           _a_u_t_o_i_n_d_e_n_t option which allows the editor to automatically
           supply leading white space to align text.  You can then use
           the ^D key as a backtab and space and tab forward to align
           new code easily.

           Miscellaneous new useful features include an intelligent
           jjjjooooiiiinnnn (jjjj) command which supplies white space between joined
           lines automatically, commands < and > which shift groups of
           lines, and the ability to filter portions of the buffer
           through commands such as _s_o_r_t.

      FFFFIIIILLLLEEEESSSS
           /usr/lib/ex?.?recover         recover command
           /usr/lib/ex?.?preserve        preserve command
           /etc/termcap             describes capabilities of terminals
           ~/.exrc                  editor startup file
           /tmp/Ex_n_n_n_n_n             editor temporary
           /tmp/Rx_n_n_n_n_n             named buffer temporary
           /usr/preserve            preservation directory

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           awk(1), ed(1), grep(1), sed(1), edit(1), grep(1),
           termcap(5), vi(1)

      AAAAUUUUTTTTHHHHOOOORRRR
           University of California, Berkeley.

      BBBBUUUUGGGGSSSS
           The _u_n_d_o command causes all marks to be lost on lines
           changed and then restored if the marked lines were changed.

           _U_n_d_o 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.

           File input/output errors don't print a name if the command
           line ````----'''' option is used.

           There is no easy way to do a single scan ignoring case.

           The editor does not warn if text is placed in named buffers
           and not used before exiting the editor.

           Null characters are discarded in input files, and cannot
           appear in resultant files.



      Page 3                                                   (9010-E)






      EEEEXXXX((((1111))))                       ((((bbbbssssdddd 4444....1111))))                       EEEEXXXX((((1111))))























































      Page 4                                                   (9010-E)






