home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / EDITOR / NVI179B / NVI179B.ZIP / docs / USD.doc / vi.man / vi.0 < prev    next >
Text File  |  1996-10-23  |  53KB  |  1,519 lines

  1.  
  2.  
  3.  
  4. VI(1)                                                       VI(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ex, vi, view - text editors
  9.  
  10. SSYYNNOOPPSSIISS
  11.        eexx [--eeFFRRrrSSssvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
  12.        vvii [--eeFFllRRrrSSvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
  13.        vviieeww [--eeFFRRrrSSvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
  14.  
  15. LLIICCEENNSSEE
  16.        The vi program is freely redistributable.  You are welcome
  17.        to copy, modify and share it with others under the  condi-
  18.        tions  listed  in  the  LICENSE file.  If any company (not
  19.        individual!) finds vi sufficiently useful that  you  would
  20.        have  purchased  it,  or  if  any company wishes to redis-
  21.        tribute it, contributions to the authors would be appreci-
  22.        ated.
  23.  
  24. DDEESSCCRRIIPPTTIIOONN
  25.        _V_i  is  a  screen oriented text editor.  _E_x is a line-ori-
  26.        ented text editor.  _E_x and _v_i are different interfaces  to
  27.        the  same  program,  and it is possible to switch back and
  28.        forth during an edit session.  _V_i_e_w is the  equivalent  of
  29.        using the --RR (read-only) option of _v_i.
  30.  
  31.        This manual page is the one provided with the _n_e_x_/_n_v_i ver-
  32.        sions of the _e_x_/_v_i text editors.  _N_e_x_/_n_v_i are intended  as
  33.        bug-for-bug   compatible  replacements  for  the  original
  34.        Fourth Berkeley Software Distribution  (4BSD)  _e_x  and  _v_i
  35.        programs.   For  the  rest of this manual page, _n_e_x_/_n_v_i is
  36.        used only when it's necessary to distinguish it  from  the
  37.        historic implementations of _e_x_/_v_i.
  38.  
  39.        This  manual  page  is intended for users already familiar
  40.        with _e_x_/_v_i.  Anyone else should almost  certainly  read  a
  41.        good  tutorial  on the editor before this manual page.  If
  42.        you're in an unfamiliar environment,  and  you  absolutely
  43.        have  to get work done immediately, read the section after
  44.        the options description, entitled ``Fast Startup''.   It's
  45.        probably enough to get you going.
  46.  
  47.        The following options are available:
  48.  
  49.        --cc     Execute  ccmmdd  immediately  after  starting the edit
  50.               session.  Particularly useful for initial position-
  51.               ing  in  the  file,  however  ccmmdd is not limited to
  52.               positioning commands.  This  is  the  POSIX  1003.2
  53.               interface   for   the   historic  ``+cmd''  syntax.
  54.               _N_e_x_/_n_v_i supports both the old and new syntax.
  55.  
  56.        --ee     Start editing in ex mode, as if  the  command  name
  57.               were _e_x.
  58.  
  59.        --FF     Don't  copy  the entire file when first starting to
  60.               edit.  (The default is  to  make  a  copy  in  case
  61.  
  62.  
  63.  
  64.                          October 10, 1996                       1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VI(1)                                                       VI(1)
  71.  
  72.  
  73.               someone  else  modifies  the  file during your edit
  74.               session.)
  75.  
  76.        --ll     Start editing with the lisp and  showmatch  options
  77.               set.
  78.  
  79.        --RR     Start  editing in read-only mode, as if the command
  80.               name was _v_i_e_w, or the rreeaaddoonnllyy option was set.
  81.  
  82.        --rr     Recover the specified files, or, if  no  files  are
  83.               specified,  list the files that could be recovered.
  84.               If no  recoverable  files  by  the  specified  name
  85.               exist,  the  file is edited as if the --rr option had
  86.               not been specified.
  87.  
  88.        --SS     Run with the sseeccuurree edit  option  set,  disallowing
  89.               all access to external programs.
  90.  
  91.        --ss     Enter  batch  mode; applicable only to _e_x edit ses-
  92.               sions.   Batch  mode  is  useful  when  running  _e_x
  93.               scripts.   Prompts,  informative messages and other
  94.               user  oriented  message  are  turned  off,  and  no
  95.               startup  files or environmental variables are read.
  96.               This is the POSIX 1003.2 interface for the historic
  97.               ``-''  argument.  _N_e_x_/_n_v_i supports both the old and
  98.               new syntax.
  99.  
  100.        --tt     Start  editing  at   the   specified   tag.    (See
  101.               _c_t_a_g_s(1)).
  102.  
  103.        --ww     Set the initial window size to the specified number
  104.               of lines.
  105.  
  106.        --vv     Start editing in vi mode, as if  the  command  name
  107.               was _v_i or _v_i_e_w.
  108.  
  109.        Command  input  for _e_x_/_v_i is read from the standard input.
  110.        In the _v_i interface, it is an error if standard  input  is
  111.        not a terminal.  In the _e_x interface, if standard input is
  112.        not a terminal, _e_x will read commands from it  regardless,
  113.        however, the session will be a batch mode session, exactly
  114.        as if the --ss option had been specified.
  115.  
  116.        _E_x_/_v_i exits 0 on success, and greater than 0 if  an  error
  117.        occurs.
  118.  
  119. FFAASSTT SSTTAARRTTUUPP
  120.        This  section  will  tell  you the minimum amount that you
  121.        need to do simple editing tasks using _v_i.  If you've never
  122.        used any screen editor before, you're likely to have prob-
  123.        lems even with this simple introduction.  In that case you
  124.        should  find  someone  that already knows _v_i and have them
  125.        walk you through this section.
  126.  
  127.  
  128.  
  129.  
  130.                          October 10, 1996                       2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VI(1)                                                       VI(1)
  137.  
  138.  
  139.        _V_i is a screen editor.  This means that it takes up almost
  140.        the  entire  screen,  displaying  part of the file on each
  141.        screen line, except for the last line of the screen.   The
  142.        last  line  of the screen is used for you to give commands
  143.        to _v_i, and for _v_i to give information to you.
  144.  
  145.        The other fact that you need to understand is that _v_i is a
  146.        modeful  editor,  i.e. you are either entering text or you
  147.        are executing commands, and you have to be  in  the  right
  148.        mode  to do one or the other.  You will be in command mode
  149.        when you first start editing a file.  There  are  commands
  150.        that  switch  you  into input mode.  There is only one key
  151.        that takes you out of input mode, and that is the <escape>
  152.        key.   (Key names are written using less-than and greater-
  153.        than signs, e.g.  <escape> means the ``escape'' key,  usu-
  154.        ally  labeled  ``esc''  on  your terminal's keyboard.)  If
  155.        you're ever confused as to  which  mode  you're  in,  keep
  156.        entering  the <escape> key until _v_i beeps at you.  (Gener-
  157.        ally, _v_i will beep at you if  you  try  and  do  something
  158.        that's not allowed.  It will also display error messages.)
  159.  
  160.        To  start  editing  a  file,  enter   the   command   ``vi
  161.        file_name<carriage-return>''.    The  command  you  should
  162.        enter as soon as you start editing is ``:set verbose show-
  163.        mode<carriage-return>''.   This  will make the editor give
  164.        you verbose error messages and display the current mode at
  165.        the bottom of the screen.
  166.  
  167.        The commands to move around the file are:
  168.  
  169.        hh      Move the cursor left one character.
  170.  
  171.        jj      Move the cursor down one line.
  172.  
  173.        kk      Move the cursor up one line.
  174.  
  175.        ll      Move the cursor right one character.
  176.  
  177.        <<ccuurrssoorr--aarrrroowwss>>
  178.               The cursor arrow keys should work, too.
  179.  
  180.        //tteexxtt<<ccaarrrriiaaggee--rreettuurrnn>>
  181.               Search  for  the  string  ``text'' in the file, and
  182.               move the cursor to its first character.
  183.  
  184.        The commands to enter new text are:
  185.  
  186.        aa      Append new text, _a_f_t_e_r the cursor.
  187.  
  188.        ii      Insert new text, _b_e_f_o_r_e the cursor.
  189.  
  190.        oo      Open a new line below the line the  cursor  is  on,
  191.               and start entering text.
  192.  
  193.  
  194.  
  195.  
  196.                          October 10, 1996                       3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VI(1)                                                       VI(1)
  203.  
  204.  
  205.        OO      Open  a  new  line above the line the cursor is on,
  206.               and start entering text.
  207.  
  208.        <<eessccaappee>>
  209.               Once you've entered input mode using the one of the
  210.               aa,  ii, OO or oo commands, use <<eessccaappee>> to quit enter-
  211.               ing text and return to command mode.
  212.  
  213.        The commands to copy text are:
  214.  
  215.        yyyy     Copy the line the cursor is on.
  216.  
  217.        pp      Append the copied line after the line the cursor is
  218.               on.
  219.  
  220.        The commands to delete text are:
  221.  
  222.        dddd     Delete the line the cursor is on.
  223.  
  224.        xx      Delete the character the cursor is on.
  225.  
  226.        The commands to write the file are:
  227.  
  228.        ::ww<<ccaarrrriiaaggee--rreettuurrnn>>
  229.               Write  the file back to the file with the name that
  230.               you originally used as an argument on the  _v_i  com-
  231.               mand line.
  232.  
  233.        ::ww ffiillee__nnaammee<<ccaarrrriiaaggee--rreettuurrnn>>
  234.               Write  the  file  back  to  the  file with the name
  235.               ``file_name''.
  236.  
  237.        The commands to quit editing and exit the editor are:
  238.  
  239.        ::qq<<ccaarrrriiaaggee--rreettuurrnn>>
  240.               Quit editing and leave vi (if you've  modified  the
  241.               file, but not saved your changes, _v_i will refuse to
  242.               quit).
  243.  
  244.        ::qq!!<<ccaarrrriiaaggee--rreettuurrnn>>
  245.               Quit, discarding any  modifications  that  you  may
  246.               have made.
  247.  
  248.        One  final  caution.   Unusual characters can take up more
  249.        than one column on the screen, and long lines can take  up
  250.        more  than  a single screen line.  The above commands work
  251.        on ``physical'' characters and lines, i.e. they affect the
  252.        entire  line  no  matter how many screen lines it takes up
  253.        and the entire character no matter how many screen columns
  254.        it takes up.
  255.  
  256. VVII CCOOMMMMAANNDDSS
  257.        The  following section describes the commands available in
  258.        the command mode of the _v_i editor.  In each  entry  below,
  259.  
  260.  
  261.  
  262.                          October 10, 1996                       4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VI(1)                                                       VI(1)
  269.  
  270.  
  271.        the  tag  line is a usage synopsis for the command charac-
  272.        ter.
  273.  
  274.  
  275.        [[ccoouunntt]] <<ccoonnttrrooll--AA>>
  276.               Search forward _c_o_u_n_t times for the current word.
  277.  
  278.        [[ccoouunntt]] <<ccoonnttrrooll--BB>>
  279.               Page backwards _c_o_u_n_t screens.
  280.  
  281.        [[ccoouunntt]] <<ccoonnttrrooll--DD>>
  282.               Scroll forward _c_o_u_n_t lines.
  283.  
  284.        [[ccoouunntt]] <<ccoonnttrrooll--EE>>
  285.               Scroll forward _c_o_u_n_t  lines,  leaving  the  current
  286.               line and column as is, if possible.
  287.  
  288.        [[ccoouunntt]] <<ccoonnttrrooll--FF>>
  289.               Page forward _c_o_u_n_t screens.
  290.  
  291.        <<ccoonnttrrooll--GG>>
  292.               Display the file information.
  293.  
  294.        <<ccoonnttrrooll--HH>>
  295.  
  296.        [[ccoouunntt]] hh
  297.               Move  the  cursor back _c_o_u_n_t characters in the cur-
  298.               rent line.
  299.  
  300.        [[ccoouunntt]] <<ccoonnttrrooll--JJ>>
  301.  
  302.        [[ccoouunntt]] <<ccoonnttrrooll--NN>>
  303.  
  304.        [[ccoouunntt]] jj
  305.               Move the cursor down _c_o_u_n_t lines  without  changing
  306.               the current column.
  307.  
  308.        <<ccoonnttrrooll--LL>>
  309.  
  310.        <<ccoonnttrrooll--RR>>
  311.               Repaint the screen.
  312.  
  313.        [[ccoouunntt]] <<ccoonnttrrooll--MM>>
  314.  
  315.        [[ccoouunntt]] ++
  316.               Move  the cursor down _c_o_u_n_t lines to the first non-
  317.               blank character of that line.
  318.  
  319.        [[ccoouunntt]] <<ccoonnttrrooll--PP>>
  320.  
  321.        [[ccoouunntt]] kk
  322.               Move the cursor up _c_o_u_n_t  lines,  without  changing
  323.               the current column.
  324.  
  325.  
  326.  
  327.  
  328.                          October 10, 1996                       5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. VI(1)                                                       VI(1)
  335.  
  336.  
  337.        <<ccoonnttrrooll--TT>>
  338.               Return to the most recent tag context.
  339.  
  340.        <<ccoonnttrrooll--UU>>
  341.               Scroll backwards _c_o_u_n_t lines.
  342.  
  343.        <<ccoonnttrrooll--WW>>
  344.               Switch  to the next lower screen in the window, or,
  345.               to the first screen if there are no  lower  screens
  346.               in the window.
  347.  
  348.        <<ccoonnttrrooll--YY>>
  349.               Scroll  backwards  _c_o_u_n_t lines, leaving the current
  350.               line and column as is, if possible.
  351.  
  352.        <<ccoonnttrrooll--ZZ>>
  353.               Suspend the current editor session.
  354.  
  355.        <<eessccaappee>>
  356.               Execute _e_x commands or cancel partial commands.
  357.  
  358.        <<ccoonnttrrooll--]]>>
  359.               Push a tag reference onto the tag stack.
  360.  
  361.        <<ccoonnttrrooll--^^>>
  362.               Switch to the most recently edited file.
  363.  
  364.        [[ccoouunntt]] <<ssppaaccee>>
  365.  
  366.        [[ccoouunntt]] ll
  367.               Move the cursor forward  _c_o_u_n_t  characters  without
  368.               changing the current line.
  369.  
  370.        [[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss))
  371.               Replace text with results from a shell command.
  372.  
  373.        [[ccoouunntt]] ## ##||++||--
  374.               Increment or decrement the cursor number.
  375.  
  376.        [[ccoouunntt]] $$
  377.               Move the cursor to the end of a line.
  378.  
  379.        %%      Move to the matching character.
  380.  
  381.        &&      Repeat  the  previous  substitution  command on the
  382.               current line.
  383.  
  384.        ''<<cchhaarraacctteerr>>
  385.  
  386.        ``<<cchhaarraacctteerr>>
  387.               Return to a context marked by the character  _<_c_h_a_r_-
  388.               _a_c_t_e_r_>.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                          October 10, 1996                       6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. VI(1)                                                       VI(1)
  401.  
  402.  
  403.        [[ccoouunntt]] ((
  404.               Back up _c_o_u_n_t sentences.
  405.  
  406.        [[ccoouunntt]] ))
  407.               Move forward _c_o_u_n_t sentences.
  408.  
  409.        [[ccoouunntt]] ,,
  410.               Reverse find character _c_o_u_n_t times.
  411.  
  412.        [[ccoouunntt]] --
  413.               Move  to first nonblank of the previous line, _c_o_u_n_t
  414.               times.
  415.  
  416.        [[ccoouunntt]] ..
  417.               Repeat the last _v_i command that modified text.
  418.  
  419.        //RREE<<ccaarrrriiaaggee--rreettuurrnn>>
  420.  
  421.        //RREE// [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
  422.  
  423.        ??RREE<<ccaarrrriiaaggee--rreettuurrnn>>
  424.  
  425.        ??RREE?? [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
  426.  
  427.        NN
  428.  
  429.        nn      Search forward or backward for  a  regular  expres-
  430.               sion.
  431.  
  432.        00      Move to the first character in the current line.
  433.  
  434.        ::      Execute an ex command.
  435.  
  436.        [[ccoouunntt]] ;;
  437.               Repeat the last character find _c_o_u_n_t times.
  438.  
  439.        [[ccoouunntt]] << mmoottiioonn
  440.  
  441.        [[ccoouunntt]] >> mmoottiioonn
  442.               Shift lines left or right.
  443.  
  444.        @@ bbuuffffeerr
  445.               Execute a named buffer.
  446.  
  447.        [[ccoouunntt]] AA
  448.               Enter  input mode, appending the text after the end
  449.               of the line.
  450.  
  451.        [[ccoouunntt]] BB
  452.               Move backwards _c_o_u_n_t bigwords.
  453.  
  454.        [[bbuuffffeerr]] [[ccoouunntt]] CC
  455.               Change text from the current position to  the  end-
  456.               of-line.
  457.  
  458.  
  459.  
  460.                          October 10, 1996                       7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. VI(1)                                                       VI(1)
  467.  
  468.  
  469.        [[bbuuffffeerr]] DD
  470.               Delete  text  from the current position to the end-
  471.               of-line.
  472.  
  473.        [[ccoouunntt]] EE
  474.               Move forward _c_o_u_n_t end-of-bigwords.
  475.  
  476.        [[ccoouunntt]] FF <<cchhaarraacctteerr>>
  477.               Search _c_o_u_n_t times  backward  through  the  current
  478.               line for _<_c_h_a_r_a_c_t_e_r_>.
  479.  
  480.        [[ccoouunntt]] GG
  481.               Move to line _c_o_u_n_t, or the last line of the file if
  482.               _c_o_u_n_t not specified.
  483.  
  484.        [[ccoouunntt]] HH
  485.               Move to the screen line _c_o_u_n_t _- _1 lines  below  the
  486.               top of the screen.
  487.  
  488.        [[ccoouunntt]] II
  489.               Enter  input mode, inserting the text at the begin-
  490.               ning of the line.
  491.  
  492.        [[ccoouunntt]] JJ
  493.               Join lines.
  494.  
  495.        [[ccoouunntt]] LL
  496.               Move to the screen line _c_o_u_n_t _- _1 lines  above  the
  497.               bottom of the screen.
  498.  
  499.         MM     Move  to  the  screen  line  in  the  middle of the
  500.               screen.
  501.  
  502.        [[ccoouunntt]] OO
  503.               Enter input mode, appending  text  in  a  new  line
  504.               above the current line.
  505.  
  506.        [[bbuuffffeerr]] PP
  507.               Insert text from a buffer.
  508.  
  509.        QQ      Exit _v_i (or visual) mode and switch to _e_x mode.
  510.  
  511.        [[ccoouunntt]] RR
  512.               Enter  input  mode, replacing the characters in the
  513.               current line.
  514.  
  515.        [[bbuuffffeerr]] [[ccoouunntt]] SS
  516.               Substitute _c_o_u_n_t lines.
  517.  
  518.        [[ccoouunntt]] TT <<cchhaarraacctteerr>>
  519.               Search backwards, _c_o_u_n_t times, through the  current
  520.               line for the character _a_f_t_e_r the specified _<_c_h_a_r_a_c_-
  521.               _t_e_r_>.
  522.  
  523.  
  524.  
  525.  
  526.                          October 10, 1996                       8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. VI(1)                                                       VI(1)
  533.  
  534.  
  535.        UU      Restore the current line to its  state  before  the
  536.               cursor last moved to it.
  537.  
  538.        [[ccoouunntt]] WW
  539.               Move forward _c_o_u_n_t bigwords.
  540.  
  541.        [[bbuuffffeerr]] [[ccoouunntt]] XX
  542.               Delete _c_o_u_n_t characters before the cursor.
  543.  
  544.        [[bbuuffffeerr]] [[ccoouunntt]] YY
  545.               Copy  (or  ``yank'') _c_o_u_n_t lines into the specified
  546.               buffer.
  547.  
  548.        ZZZZ     Write the file and exit _v_i.
  549.  
  550.        [[ccoouunntt]] [[[[
  551.               Back up _c_o_u_n_t section boundaries.
  552.  
  553.        [[ccoouunntt]] ]]]]
  554.               Move forward _c_o_u_n_t section boundaries.
  555.  
  556.        ^^      Move to first nonblank  character  on  the  current
  557.               line.
  558.  
  559.        [[ccoouunntt]] __
  560.               Move  down  _c_o_u_n_t  _- _1 lines, to the first nonblank
  561.               character.
  562.  
  563.        [[ccoouunntt]] aa
  564.               Enter input mode, appending the text after the cur-
  565.               sor.
  566.  
  567.        [[ccoouunntt]] bb
  568.               Move backwards _c_o_u_n_t words.
  569.  
  570.        [[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
  571.               Change a region of text.
  572.  
  573.        [[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
  574.               Delete a region of text.
  575.  
  576.        [[ccoouunntt]] ee
  577.               Move forward _c_o_u_n_t end-of-words.
  578.  
  579.        [[ccoouunntt]] ff<<cchhaarraacctteerr>>
  580.               Search  forward,  _c_o_u_n_t  times, through the rest of
  581.               the current line for _<_c_h_a_r_a_c_t_e_r_>.
  582.  
  583.        [[ccoouunntt]] ii
  584.               Enter input mode, inserting  the  text  before  the
  585.               cursor.
  586.  
  587.        mm <<cchhaarraacctteerr>>
  588.               Save  the  current  context  (line  and  column) as
  589.  
  590.  
  591.  
  592.                          October 10, 1996                       9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. VI(1)                                                       VI(1)
  599.  
  600.  
  601.               _<_c_h_a_r_a_c_t_e_r_>.
  602.  
  603.        [[ccoouunntt]] oo
  604.               Enter input mode, appending  text  in  a  new  line
  605.               under the current line.
  606.  
  607.        [[bbuuffffeerr]] pp
  608.               Append text from a buffer.
  609.  
  610.        [[ccoouunntt]] rr <<cchhaarraacctteerr>>
  611.               Replace _c_o_u_n_t characters.
  612.  
  613.        [[bbuuffffeerr]] [[ccoouunntt]] ss
  614.               Substitute  _c_o_u_n_t  characters  in  the current line
  615.               starting with the current character.
  616.  
  617.        [[ccoouunntt]] tt <<cchhaarraacctteerr>>
  618.               Search forward, _c_o_u_n_t times,  through  the  current
  619.               line  for the character immediately _b_e_f_o_r_e _<_c_h_a_r_a_c_-
  620.               _t_e_r_>.
  621.  
  622.        uu      Undo the last change made to the file.
  623.  
  624.        [[ccoouunntt]] ww
  625.               Move forward _c_o_u_n_t words.
  626.  
  627.        [[bbuuffffeerr]] [[ccoouunntt]] xx
  628.               Delete _c_o_u_n_t characters.
  629.  
  630.        [[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
  631.               Copy (or ``yank'') a text region specified  by  the
  632.               _c_o_u_n_t and motion into a buffer.
  633.  
  634.        [[ccoouunntt11]] zz [[ccoouunntt22]] --||..||++||^^||<<ccaarrrriiaaggee--rreettuurrnn>>
  635.               Redraw,  optionally  repositioning and resizing the
  636.               screen.
  637.  
  638.        [[ccoouunntt]] {{
  639.               Move backward _c_o_u_n_t paragraphs.
  640.  
  641.        [[ccoouunntt]] ||
  642.               Move to a specific _c_o_l_u_m_n position on  the  current
  643.               line.
  644.  
  645.        [[ccoouunntt]] }}
  646.               Move forward _c_o_u_n_t paragraphs.
  647.  
  648.        [[ccoouunntt]] ~~
  649.               Reverse the case of the next _c_o_u_n_t character(s).
  650.  
  651.        [[ccoouunntt]] ~~ mmoottiioonn
  652.               Reverse the case of the characters in a text region
  653.               specified by the _c_o_u_n_t and _m_o_t_i_o_n.
  654.  
  655.  
  656.  
  657.  
  658.                          October 10, 1996                      10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. VI(1)                                                       VI(1)
  665.  
  666.  
  667.        <<iinntteerrrruupptt>>
  668.               Interrupt the current operation.
  669.  
  670. VVII TTEEXXTT IINNPPUUTT CCOOMMMMAANNDDSS
  671.        The following section describes the commands available  in
  672.        the text input mode of the _v_i editor.
  673.  
  674.  
  675.        <<nnuull>>  Replay the previous input.
  676.  
  677.        <<ccoonnttrrooll--DD>>
  678.               Erase to the previous sshhiiffttwwiiddtthh column boundary.
  679.  
  680.        ^^<<ccoonnttrrooll--DD>>
  681.               Erase  all  of the autoindent characters, and reset
  682.               the autoindent level.
  683.  
  684.        00<<ccoonnttrrooll--DD>>
  685.               Erase all of the autoindent characters.
  686.  
  687.        <<ccoonnttrrooll--TT>>
  688.               Insert sufficient _<_t_a_b_> and _<_s_p_a_c_e_>  characters  to
  689.               move  forward  to the next sshhiiffttwwiiddtthh column bound-
  690.               ary.
  691.  
  692.        <<eerraassee>>
  693.  
  694.        <<ccoonnttrrooll--HH>>
  695.               Erase the last character.
  696.  
  697.        <<lliitteerraall nneexxtt>>
  698.               Quote the next character.
  699.  
  700.        <<eessccaappee>>
  701.               Resolve all text input into the file, and return to
  702.               command mode.
  703.  
  704.        <<lliinnee eerraassee>>
  705.               Erase the current line.
  706.  
  707.        <<ccoonnttrrooll--WW>>
  708.  
  709.        <<wwoorrdd eerraassee>>
  710.               Erase  the  last  word.   The definition of word is
  711.               dependent on the aallttwweerraassee and ttttyywweerraassee options.
  712.  
  713.        <<ccoonnttrrooll--XX>>[[00--99AA--FFaa--ff]]++
  714.               Insert a character with the  specified  hexadecimal
  715.               value into the text.
  716.  
  717.        <<iinntteerrrruupptt>>
  718.               Interrupt  text  input  mode,  returning to command
  719.               mode.
  720.  
  721.  
  722.  
  723.  
  724.                          October 10, 1996                      11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. VI(1)                                                       VI(1)
  731.  
  732.  
  733. EEXX CCOOMMMMAANNDDSS
  734.        The following section describes the commands available  in
  735.        the  _e_x  editor.   In  each entry below, the tag line is a
  736.        usage synopsis for the command.
  737.  
  738.  
  739.        <<eenndd--ooff--ffiillee>>
  740.               Scroll the screen.
  741.  
  742.        !! aarrgguummeenntt((ss))
  743.  
  744.        [[rraannggee]]!! aarrgguummeenntt((ss))
  745.               Execute a shell command, or filter lines through  a
  746.               shell command.
  747.  
  748.        ""      A comment.
  749.  
  750.        [[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]]
  751.  
  752.        [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
  753.               Display  the selected lines, each preceded with its
  754.               line number.
  755.  
  756.        @@ bbuuffffeerr
  757.  
  758.        ** bbuuffffeerr
  759.               Execute a buffer.
  760.  
  761.        [[lliinnee]] aa[[ppppeenndd]][[!!]]
  762.               The input text  is  appended  after  the  specified
  763.               line.
  764.  
  765.        [[rraannggee]] cc[[hhaannggee]][[!!]] [[ccoouunntt]]
  766.               The input text replaces the specified range.
  767.  
  768.        ccss[[ccooppee]] aadddd || ffiinndd || hheellpp || kkiillll || rreesseett
  769.               Execute a Cscope command.
  770.  
  771.        [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
  772.               Delete the lines from the file.
  773.  
  774.        ddii[[ssppllaayy]] bb[[uuffffeerrss]] || cc[[oonnnneeccttiioonnss]] || ss[[ccrreeeennss]] || tt[[aaggss]]
  775.               Display  buffers,  Cscope  connections,  screens or
  776.               tags.
  777.  
  778.        [[EEee]][[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]
  779.  
  780.        [[EEee]]xx[[!!]] [[++ccmmdd]] [[ffiillee]]
  781.               Edit a different file.
  782.  
  783.        eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
  784.               Display usage for an _e_x command.
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                          October 10, 1996                      12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. VI(1)                                                       VI(1)
  797.  
  798.  
  799.        ff[[iillee]] [[ffiillee]]
  800.               Display and optionally change the file name.
  801.  
  802.        [[FFff]]gg [[nnaammee]]
  803.               _V_i mode only.  Foreground the specified screen.
  804.  
  805.        [[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]]
  806.  
  807.        [[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]]
  808.               Apply commands to lines matching (or not  matching)
  809.               a pattern.
  810.  
  811.        hhee[[llpp]] Display a help message.
  812.  
  813.        [[lliinnee]] ii[[nnsseerrtt]][[!!]]
  814.               The  input  text  is  inserted before the specified
  815.               line.
  816.  
  817.        [[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]]
  818.               Join lines of text together.
  819.  
  820.        [[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]]
  821.               Display the lines unambiguously.
  822.  
  823.        mmaapp[[!!]] [[llhhss rrhhss]]
  824.               Define or display maps (for _v_i only).
  825.  
  826.        [[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
  827.  
  828.        [[lliinnee]] kk <<cchhaarraacctteerr>>
  829.               Mark the line with the mark _<_c_h_a_r_a_c_t_e_r_>.
  830.  
  831.        [[rraannggee]] mm[[oovvee]] lliinnee
  832.               Move the specified lines after the target line.
  833.  
  834.        mmkk[[eexxrrcc]][[!!]] ffiillee
  835.               Write the abbreviations, editor options and maps to
  836.               the specified file.
  837.  
  838.        [[NNnn]][[eexxtt]][[!!]] [[ffiillee ......]]
  839.               Edit the next file from the argument list.
  840.  
  841.        [[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]]
  842.               Enter open mode.
  843.  
  844.        pprree[[sseerrvvee]]
  845.               Save the file in a form that can later be recovered
  846.               using the _e_x --rr option.
  847.  
  848.        [[PPpp]]rreevv[[iioouuss]][[!!]]
  849.               Edit the previous file from the argument list.
  850.  
  851.        [[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]]
  852.               Display the specified lines.
  853.  
  854.  
  855.  
  856.                          October 10, 1996                      13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. VI(1)                                                       VI(1)
  863.  
  864.  
  865.        [[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]]
  866.               Append buffer contents to the current line.
  867.  
  868.        qq[[uuiitt]][[!!]]
  869.               End the editing session.
  870.  
  871.        [[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]]
  872.               Read a file.
  873.  
  874.        rreecc[[oovveerr]] ffiillee
  875.               Recover _f_i_l_e if it was previously saved.
  876.  
  877.        rreess[[iizzee]] [[++||--]]ssiizzee
  878.               _V_i mode only.  Grow or shrink the current screen.
  879.  
  880.        rreeww[[iinndd]][[!!]]
  881.               Rewind the argument list.
  882.  
  883.        ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]] [[nnooooppttiioonn ......]] [[ooppttiioonn?? ......]]
  884.               [[aallll]]
  885.               Display or set editor options.
  886.  
  887.        sshh[[eellll]]
  888.               Run a shell program.
  889.  
  890.        ssoo[[uurrccee]] ffiillee
  891.               Read and execute _e_x commands from a file.
  892.  
  893.        [[rraannggee]]   ss[[uubbssttiittuuttee]]   [[//ppaatttteerrnn//rreeppllaaccee//]]   [[ooppttiioonnss]]
  894.               [[ccoouunntt]] [[ffllaaggss]]
  895.  
  896.        [[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
  897.  
  898.        [[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
  899.               Make substitutions.
  900.  
  901.        ssuu[[ssppeenndd]][[!!]]
  902.  
  903.        sstt[[oopp]][[!!]]
  904.  
  905.        <<ssuussppeenndd>>
  906.               Suspend the edit session.
  907.  
  908.        [[TTtt]]aa[[gg]][[!!]] ttaaggssttrriinngg
  909.               Edit the file containing the specified tag.
  910.  
  911.        ttaaggnn[[eexxtt]][[!!]]
  912.               Edit  the  file containing the next context for the
  913.               current tag.
  914.  
  915.        ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
  916.               Pop to the specified tag in the tags stack.
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                          October 10, 1996                      14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. VI(1)                                                       VI(1)
  929.  
  930.  
  931.        ttaaggpp[[rreevv]][[!!]]
  932.               Edit the file containing the previous  context  for
  933.               the current tag.
  934.  
  935.        uunnmm[[aapp]][[!!]] llhhss
  936.               Unmap a mapped string.
  937.  
  938.        vvee[[rrssiioonn]]
  939.               Display the version of the _e_x_/_v_i editor.
  940.  
  941.        [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
  942.               _E_x mode only.  Enter _v_i.
  943.  
  944.        [[VVii]]ii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
  945.               _V_i mode only.  Edit a new file.
  946.  
  947.        vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
  948.               Display usage for a _v_i command.
  949.  
  950.        [[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]]
  951.  
  952.        [[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]]
  953.  
  954.        [[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]]
  955.  
  956.        [[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]]
  957.               Write the file.
  958.  
  959.        [[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]]
  960.               Write the file if it has been modified.
  961.  
  962.        [[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]]
  963.               Copy the specified lines to a buffer.
  964.  
  965.        [[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
  966.               Adjust the window.
  967.  
  968. SSEETT OOPPTTIIOONNSS
  969.        There  are  a  large number of options that may be set (or
  970.        unset) to change  the  editor's  behavior.   This  section
  971.        describes  the  options,  their  abbreviations  and  their
  972.        default values.
  973.  
  974.        In each entry below, the first part of the tag line is the
  975.        full name of the option, followed by any equivalent abbre-
  976.        viations.  The part in  square  brackets  is  the  default
  977.        value  of  the  option.   Most of the options are boolean,
  978.        i.e. they are either on or off, and do not have an associ-
  979.        ated value.
  980.  
  981.        Options  apply  to  both _e_x and _v_i modes, unless otherwise
  982.        specified.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                          October 10, 1996                      15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. VI(1)                                                       VI(1)
  995.  
  996.  
  997.        aallttwweerraassee [[ooffff]]
  998.               _V_i only.  Select an alternate word erase algorithm.
  999.  
  1000.        aauuttooiinnddeenntt,, aaii [[ooffff]]
  1001.               Automatically indent new lines.
  1002.  
  1003.        aauuttoopprriinntt,, aapp [[ooffff]]
  1004.               _E_x only.  Display the current line automatically.
  1005.  
  1006.        aauuttoowwrriittee,, aaww [[ooffff]]
  1007.               Write  modified  files  automatically when changing
  1008.               files.
  1009.  
  1010.        bbaacckkuupp [[""""]]
  1011.               Backup files before they are overwritten.
  1012.  
  1013.        bbeeaauuttiiffyy,, bbff [[ooffff]]
  1014.               Discard control characters.
  1015.  
  1016.        ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreeccttoorryy]]
  1017.               The  directory  paths used as path prefixes for the
  1018.               ccdd command.
  1019.  
  1020.        cceeddiitt [[nnoo ddeeffaauulltt]]
  1021.               Set the character to edit  the  colon  command-line
  1022.               history.
  1023.  
  1024.        ccoolluummnnss,, ccoo [[8800]]
  1025.               Set the number of columns in the screen.
  1026.  
  1027.        ccoommmmeenntt [[ooffff]]
  1028.               _V_i only.  Skip leading comments in shell, C and C++
  1029.               language files.
  1030.  
  1031.        ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]]
  1032.               The directory where temporary files are created.
  1033.  
  1034.        eeddccoommppaattiibbllee,, eedd [[ooffff]]
  1035.               Remember the values of the ``c'' and ``g'' suffices
  1036.               to the ssuubbssttiittuuttee commands, instead of initializing
  1037.               them as unset for each new command.
  1038.  
  1039.        eerrrroorrbbeellllss,, eebb [[ooffff]]
  1040.               _E_x only.  Announce error messages with a bell.
  1041.  
  1042.        eexxrrcc,, eexx [[ooffff]]
  1043.               Read the startup files in the local directory.
  1044.  
  1045.        eexxtteennddeedd [[ooffff]]
  1046.               Regular    expressions    are    extended     (i.e.
  1047.               _e_g_r_e_p(1)-style) expressions.
  1048.  
  1049.        ffiilleecc [[nnoo ddeeffaauulltt]]
  1050.               Set  the  character to perform file path completion
  1051.  
  1052.  
  1053.  
  1054.                          October 10, 1996                      16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. VI(1)                                                       VI(1)
  1061.  
  1062.  
  1063.               on the colon command line.
  1064.  
  1065.        ffllaasshh [[oonn]]
  1066.               Flash the screen instead of beeping the keyboard on
  1067.               error.
  1068.  
  1069.        hhaarrddttaabbss,, hhtt [[88]]
  1070.               Set the spacing between hardware tab settings.
  1071.  
  1072.        iicclloowweerr [[ooffff]]
  1073.               Makes  all Regular Expressions case-insensitive, as
  1074.               long as an upper-case letter does not appear in the
  1075.               search string.
  1076.  
  1077.        iiggnnoorreeccaassee,, iicc [[ooffff]]
  1078.               Ignore case differences in regular expressions.
  1079.  
  1080.        kkeeyyttiimmee [[66]]
  1081.               The 10th's of a second _e_x_/_v_i waits for a subsequent
  1082.               key to complete a key mapping.
  1083.  
  1084.        lleeffttrriigghhtt [[ooffff]]
  1085.               _V_i only.  Do left-right scrolling.
  1086.  
  1087.        lliinneess,, llii [[2244]]
  1088.               _V_i only.  Set the number of lines in the screen.
  1089.  
  1090.        lliisspp [[ooffff]]
  1091.               _V_i  only.   Modify  various  search  commands   and
  1092.               options  to work with Lisp.  _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t
  1093.               _i_m_p_l_e_m_e_n_t_e_d_.
  1094.  
  1095.        lliisstt [[ooffff]]
  1096.               Display lines in an unambiguous fashion.
  1097.  
  1098.        lloocckk [[oonn]]
  1099.               Attempt to get an exclusive lock on any file  being
  1100.               edited, read or written.
  1101.  
  1102.        mmaaggiicc [[oonn]]
  1103.               Treat   certain  characters  specially  in  regular
  1104.               expressions.
  1105.  
  1106.        mmaattcchhttiimmee [[77]]
  1107.               _V_i only.  The 10th's of a second  _e_x_/_v_i  pauses  on
  1108.               the matching character when the sshhoowwmmaattcchh option is
  1109.               set.
  1110.  
  1111.        mmeessgg [[oonn]]
  1112.               Permit messages from other users.
  1113.  
  1114.        mmooddeelliinneess,, mmooddeelliinnee [[ooffff]]
  1115.               Read the first and last few lines of each file  for
  1116.               _e_x   commands.    _T_h_i_s   _o_p_t_i_o_n   _w_i_l_l   _n_e_v_e_r   _b_e
  1117.  
  1118.  
  1119.  
  1120.                          October 10, 1996                      17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. VI(1)                                                       VI(1)
  1127.  
  1128.  
  1129.               _i_m_p_l_e_m_e_n_t_e_d_.
  1130.  
  1131.        nnoopprriinntt [[""""]]
  1132.               Characters that  are  never  handled  as  printable
  1133.               characters.
  1134.  
  1135.        nnuummbbeerr,, nnuu [[ooffff]]
  1136.               Precede  each  line displayed with its current line
  1137.               number.
  1138.  
  1139.        ooccttaall [[ooffff]]
  1140.               Display  unknown  characters  as   octal   numbers,
  1141.               instead of the default hexadecimal.
  1142.  
  1143.        ooppeenn [[oonn]]
  1144.               _E_x  only.   If this option is not set, the ooppeenn and
  1145.               vviissuuaall commands are disallowed.
  1146.  
  1147.        ooppttiimmiizzee,, oopptt [[oonn]]
  1148.               _V_i only.  Optimize text throughput to  dumb  termi-
  1149.               nals.  _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
  1150.  
  1151.        ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]]
  1152.               _V_i  only.   Define  additional paragraph boundaries
  1153.               for the {{ and }} commands.
  1154.  
  1155.        ppaatthh [[]]
  1156.               Define additional directories to search  for  files
  1157.               being edited.
  1158.  
  1159.        pprriinntt [[""""]]
  1160.               Characters  that  are  always  handled as printable
  1161.               characters.
  1162.  
  1163.        pprroommpptt [[oonn]]
  1164.               _E_x only.  Display a command prompt.
  1165.  
  1166.        rreeaaddoonnllyy,, rroo [[ooffff]]
  1167.               Mark the file and session as read-only.
  1168.  
  1169.        rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
  1170.               The directory where recovery files are stored.
  1171.  
  1172.        rreeddrraaww,, rree [[ooffff]]
  1173.               _V_i only.  Simulate an  intelligent  terminal  on  a
  1174.               dumb one.  _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
  1175.  
  1176.        rreemmaapp [[oonn]]
  1177.               Remap keys until resolved.
  1178.  
  1179.        rreeppoorrtt [[55]]
  1180.               Set  the  number  of  lines  about which the editor
  1181.               reports changes or yanks.
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                          October 10, 1996                      18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. VI(1)                                                       VI(1)
  1193.  
  1194.  
  1195.        rruulleerr [[ooffff]]
  1196.               _V_i only.  Display a row/column ruler on  the  colon
  1197.               command line.
  1198.  
  1199.        ssccrroollll,, ssccrr [[wwiinnddooww // 22]]
  1200.               Set the number of lines scrolled.
  1201.  
  1202.        sseeaarrcchhiinnccrr [[ooffff]]
  1203.               Makes the // and ??  commands incremental.
  1204.  
  1205.        sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
  1206.               _V_i  only.  Define additional section boundaries for
  1207.               the [[[[ and ]]]] commands.
  1208.  
  1209.        sseeccuurree [[ooffff]]
  1210.               Turns off all access to external programs.
  1211.  
  1212.        sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
  1213.               Select the shell used by the editor.
  1214.  
  1215.        sshheellllmmeettaa [[~~{{[[**??$$``''""\\]]
  1216.               Set the meta characters  checked  to  determine  if
  1217.               file name expansion is necessary.
  1218.  
  1219.        sshhiiffttwwiiddtthh,, ssww [[88]]
  1220.               Set  the  autoindent  and shift command indentation
  1221.               width.
  1222.  
  1223.        sshhoowwmmaattcchh,, ssmm [[ooffff]]
  1224.               _V_i only.  Note matching ``{'' and ``(''  for  ``}''
  1225.               and ``)'' characters.
  1226.  
  1227.        sshhoowwmmooddee,, ssmmdd [[ooffff]]
  1228.               _V_i  only.   Display  the  current editor mode and a
  1229.               ``modified'' flag.
  1230.  
  1231.        ssiiddeessccrroollll [[1166]]
  1232.               _V_i only.  Set the amount a left-right  scroll  will
  1233.               shift.
  1234.  
  1235.        sslloowwooppeenn,, ssllooww [[ooffff]]
  1236.               Delay  display  updating  during  text input.  _T_h_i_s
  1237.               _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
  1238.  
  1239.        ssoouurrcceeaannyy [[ooffff]]
  1240.               Read startup files not owned by the  current  user.
  1241.               _T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_.
  1242.  
  1243.        ttaabbssttoopp,, ttss [[88]]
  1244.               This option sets tab widths for the editor display.
  1245.  
  1246.        ttaagglleennggtthh,, ttll [[00]]
  1247.               Set the number of  significant  characters  in  tag
  1248.               names.
  1249.  
  1250.  
  1251.  
  1252.                          October 10, 1996                      19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. VI(1)                                                       VI(1)
  1259.  
  1260.  
  1261.        ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]]
  1262.               Set the list of tags files.
  1263.  
  1264.        tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]]
  1265.               Set the terminal type.
  1266.  
  1267.        tteerrssee [[ooffff]]
  1268.               This  option  has historically made editor messages
  1269.               less verbose.  It has no effect in this implementa-
  1270.               tion.
  1271.  
  1272.        ttiillddeeoopp [[ooffff]]
  1273.               Modify  the ~~ command to take an associated motion.
  1274.  
  1275.        ttiimmeeoouutt,, ttoo [[oonn]]
  1276.               Time out on keys which may be mapped.
  1277.  
  1278.        ttttyywweerraassee [[ooffff]]
  1279.               _V_i only.  Select an alternate erase algorithm.
  1280.  
  1281.        vveerrbboossee [[ooffff]]
  1282.               _V_i only.  Display an error message for every error.
  1283.  
  1284.        ww330000 [[nnoo ddeeffaauulltt]]
  1285.               _V_i  only.   Set the window size if the baud rate is
  1286.               less than 1200 baud.
  1287.  
  1288.        ww11220000 [[nnoo ddeeffaauulltt]]
  1289.               _V_i only.  Set the window size if the baud  rate  is
  1290.               equal to 1200 baud.
  1291.  
  1292.        ww99660000 [[nnoo ddeeffaauulltt]]
  1293.               _V_i  only.   Set the window size if the baud rate is
  1294.               greater than 1200 baud.
  1295.  
  1296.        wwaarrnn [[oonn]]
  1297.               _E_x only.  This option causes a warning  message  to
  1298.               the  terminal  if the file has been modified, since
  1299.               it was last written, before a !!  command.
  1300.  
  1301.        wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS]]
  1302.               Set the window size for the screen.
  1303.  
  1304.        wwiinnddoowwnnaammee [[ooffff]]
  1305.               Change the icon/window name  to  the  current  file
  1306.               name even if it can't be restored on editor exit.
  1307.  
  1308.        wwrraapplleenn,, wwll [[00]]
  1309.               _V_i  only.  Break lines automatically, the specified
  1310.               number of columns from the  left-hand  margin.   If
  1311.               both  the  wwrraapplleenn  and wwrraappmmaarrggiinn edit options are
  1312.               set, the wwrraappmmaarrggiinn value is used.
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.                          October 10, 1996                      20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. VI(1)                                                       VI(1)
  1325.  
  1326.  
  1327.        wwrraappmmaarrggiinn,, wwmm [[00]]
  1328.               _V_i only.  Break lines automatically, the  specified
  1329.               number  of  columns from the right-hand margin.  If
  1330.               both the wwrraapplleenn and wwrraappmmaarrggiinn  edit  options  are
  1331.               set, the wwrraappmmaarrggiinn value is used.
  1332.  
  1333.        wwrraappssccaann,, wwss [[oonn]]
  1334.               Set searches to wrap around the end or beginning of
  1335.               the file.
  1336.  
  1337.        wwrriitteeaannyy,, wwaa [[ooffff]]
  1338.               Turn off file-overwriting checks.
  1339.  
  1340. EENNVVIIRROONNMMEENNTTAALL VVAARRIIAABBLLEESS
  1341.        _C_O_L_U_M_N_S
  1342.               The number of columns on the  screen.   This  value
  1343.               overrides  any  system or terminal specific values.
  1344.               If the _C_O_L_U_M_N_S environmental variable  is  not  set
  1345.               when  _e_x_/_v_i  runs, or the ccoolluummnnss option is explic-
  1346.               itly reset by the user, _e_x_/_v_i enters the value into
  1347.               the environment.
  1348.  
  1349.        _E_X_I_N_I_T A list of _e_x startup commands, read if the variable
  1350.               _N_E_X_I_N_I_T is not set.
  1351.  
  1352.        _H_O_M_E   The user's home  directory,  used  as  the  initial
  1353.               directory path for the startup ``$_H_O_M_E/.nexrc'' and
  1354.               ``$_H_O_M_E/.exrc'' files.  This value is also used  as
  1355.               the default directory for the _v_i ccdd command.
  1356.  
  1357.        _L_I_N_E_S  The number of rows on the screen.  This value over-
  1358.               rides any system or terminal specific  values.   If
  1359.               the  _L_I_N_E_S  environmental  variable is not set when
  1360.               _e_x_/_v_i runs, or the lliinneess option is explicitly reset
  1361.               by  the user, _e_x_/_v_i enters the value into the envi-
  1362.               ronment.
  1363.  
  1364.        _N_E_X_I_N_I_T
  1365.               A list of _e_x startup commands.
  1366.  
  1367.        _S_H_E_L_L  The user's shell of  choice  (see  also  the  sshheellll
  1368.               option).
  1369.  
  1370.        _T_E_R_M   The  user's terminal type.  The default is the type
  1371.               ``unknown''.  If the _T_E_R_M environmental variable is
  1372.               not  set  when  _e_x_/_v_i  runs,  or the tteerrmm option is
  1373.               explicitly reset by  the  user,  _e_x_/_v_i  enters  the
  1374.               value into the environment.
  1375.  
  1376.        _T_M_P_D_I_R The  location  used  to stored temporary files (see
  1377.               also the ddiirreeccttoorryy edit option).
  1378.  
  1379. AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                          October 10, 1996                      21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. VI(1)                                                       VI(1)
  1391.  
  1392.  
  1393.        SIGALRM
  1394.               _V_i_/_e_x uses this signal for periodic backups of file
  1395.               modifications and to display ``busy'' messages when
  1396.               operations are likely to take a long time.
  1397.  
  1398.        SIGHUP
  1399.  
  1400.        SIGTERM
  1401.               If the current buffer has changed since it was last
  1402.               written  in  its  entirety,  the editor attempts to
  1403.               save the modified file so it can  be  later  recov-
  1404.               ered.  See the _v_i_/_e_x Reference manual section enti-
  1405.               tled ``Recovery'' for more information.
  1406.  
  1407.        SIGINT When an interrupt occurs, the current operation  is
  1408.               halted,  and  the  editor  returns  to  the command
  1409.               level.  If interrupted during text input, the  text
  1410.               already  input  is resolved into the file as if the
  1411.               text input had been normally terminated.
  1412.  
  1413.        SIGWINCH
  1414.               The screen is resized.   See  the  _v_i_/_e_x  Reference
  1415.               manual  section  entitled ``Sizing the Screen'' for
  1416.               more information.
  1417.  
  1418.        SIGCONT
  1419.  
  1420.        SIGQUIT
  1421.  
  1422.        SIGTSTP
  1423.               _V_i_/_e_x ignores these signals.
  1424.  
  1425. FFIILLEESS
  1426.        /bin/sh
  1427.               The default user shell.
  1428.  
  1429.        /etc/vi.exrc
  1430.               System-wide vi startup file.
  1431.  
  1432.        /tmp   Temporary file directory.
  1433.  
  1434.        /var/tmp/vi.recover
  1435.               The default recovery file directory.
  1436.  
  1437.        $HOME/.nexrc
  1438.               1st choice for user's home directory startup  file.
  1439.  
  1440.        $HOME/.exrc
  1441.               2nd  choice for user's home directory startup file.
  1442.  
  1443.        .nexrc 1st choice for local directory startup file.
  1444.  
  1445.        .exrc  2nd choice for local directory startup file.
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                          October 10, 1996                      22
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. VI(1)                                                       VI(1)
  1457.  
  1458.  
  1459. SSEEEE AALLSSOO
  1460.        _c_t_a_g_s(1), _m_o_r_e(3), _c_u_r_s_e_s(3), _d_b_o_p_e_n(3)
  1461.  
  1462.        The ``Vi Quick Reference'' card.
  1463.  
  1464.        ``An Introduction to Display Editing with Vi'',  found  in
  1465.        the ``UNIX User's Manual Supplementary Documents'' section
  1466.        of both the 4.3BSD and 4.4BSD manual sets.  This  document
  1467.        is  the  closest thing available to an introduction to the
  1468.        _v_i screen editor.
  1469.  
  1470.        ``Ex Reference Manual (Version 3.7)'', found in the ``UNIX
  1471.        User's  Manual  Supplementary  Documents'' section of both
  1472.        the 4.3BSD and 4.4BSD manual sets.  This document  is  the
  1473.        final  reference for the _e_x editor, as distributed in most
  1474.        historic 4BSD and System V systems.
  1475.  
  1476.        ``Edit: A tutorial'', found in the  ``UNIX  User's  Manual
  1477.        Supplementary  Documents''  section  of  the 4.3BSD manual
  1478.        set.  This document is an introduction to a simple version
  1479.        of the _e_x screen editor.
  1480.  
  1481.        ``Ex/Vi  Reference  Manual'',  found  in the ``UNIX User's
  1482.        Manual Supplementary Documents''  section  of  the  4.4BSD
  1483.        manual  set.  This document is the final reference for the
  1484.        _n_e_x_/_n_v_i text editors, as distributed in 4.4BSD and 4.4BSD-
  1485.        Lite.
  1486.  
  1487.        _R_o_f_f source for all of these documents is distributed with
  1488.        _n_e_x_/_n_v_i in the _n_v_i_/_U_S_D_._d_o_c directory of the _n_e_x_/_n_v_i source
  1489.        code.
  1490.  
  1491.        The   files   ``autowrite'',  ``input'',  ``quoting''  and
  1492.        ``structures'' found in the  _n_v_i_/_d_o_c_s_/_i_n_t_e_r_n_a_l_s  directory
  1493.        of the _n_e_x_/_n_v_i source code.
  1494.  
  1495. HHIISSTTOORRYY
  1496.        The  _n_e_x_/_n_v_i  replacements  for  the  _e_x_/_v_i  editor  first
  1497.        appeared in 4.4BSD.
  1498.  
  1499. SSTTAANNDDAARRDDSS
  1500.        _N_e_x_/_n_v_i is close to IEEE Std1003.2 (``POSIX'').  That doc-
  1501.        ument  differs  from  historical _e_x_/_v_i practice in several
  1502.        places; there are changes to be made on both sides.
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                          October 10, 1996                      23
  1517.  
  1518.  
  1519.