home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1706 / elvis.man
Encoding:
Text File  |  1990-12-28  |  87.1 KB  |  2,707 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. _I_n_t_r_o_d_u_c_t_i_o_n
  7.  
  8.         Elvis is a clone of vi/ex, the standard UNIX editor. Elvis supports
  9.      nearly all of the vi/ex commands, in both visual mode and colon mode.
  10.  
  11.         Like vi/ex, elvis stores most of the  text  in  a  temporary  file,
  12.      instead of RAM. This allows it to edit files that are too large to fit
  13.      in a single process' data space.
  14.  
  15.         Elvis runs under BSD UNIX, AT&T SysV UNIX, Minix, MS-DOS, and Atari
  16.      TOS.  Ports to other operating systems are being worked on; contact me
  17.      before you start porting it to some other OS,  because  somebody  else
  18.      may have already done it for you.
  19.  
  20.         Elvis   is   freely  redistributable,  in  either  source  form  or
  21.      executable form.
  22.  
  23.  
  24.   _O_v_e_r_v_i_e_w _o_f _E_l_v_i_s
  25.  
  26.         The user interface of elvis/vi/ex is weird.  There  are  two  major
  27.      comand  modes  in  Elvis,  and  a  few  text input modes as well. Each
  28.      command mode has a command which allows you to  switch  to  the  other
  29.      mode.
  30.  
  31.         You  will  probably  use  the _v_i_s_u_a_l _c_o_m_m_a_n_d _m_o_d_e most of the time.
  32.      This is the mode that elvis normally starts up in.
  33.  
  34.         In visual command mode, the entire screen is filled with  lines  of
  35.      text  from  your  file.  Each  keystroke  is interpretted as part of a
  36.      visual command. If you start typing text, it will _n_o_t be inserted,  it
  37.      will  be  treated as part of a command. To insert text, you must first
  38.      give an "insert text" command. This will take some  getting  used  to.
  39.      (An alternative exists. Lookup the "inputmode" option.)
  40.  
  41.         The  _c_o_l_o_n  _m_o_d_e is quite different. Elvis displays a ":" character
  42.      on the bottom line of the screen, as a prompt. You are  then  expected
  43.      to  type  in  a  command  line  and  hit  the <Return> key. The set of
  44.      commands recognized in the colon mode is different from visual mode's.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                     - 1 -
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. _V_i_s_u_a_l _M_o_d_e _C_o_m_m_a_n_d_s
  73.  
  74.         Most visual mode commands are one  keystroke  long.  The  following
  75.      table  lists  the  operation  performed  by  each  keystroke, and also
  76.      denotes any options or arguments that it accepts. Notes at the end  of
  77.      the table describe the notation used in this table.
  78.  
  79.         In  addition  to the keys listed here, your keyboard's "arrow" keys
  80.      will be interpretted as the appropriate cursor movement commands.  The
  81.      same goes for <PgUp> and <PgDn>, if your keyboard has them. There is a
  82.      colon mode command (to be described later) which  will  allow  you  to
  83.      define other keys, such as function keys.
  84.  
  85.         A tip: visual command mode looks a lot like text input mode. If you
  86.      forget which mode you're in, just hit the <Esc> key. If  elvis  beeps,
  87.      then  you're  in visual command mode. If elvis does not beep, then you
  88.      were in input mode, but by hitting <Esc> you  will  have  switched  to
  89.      visual command mode. So, one way or another, after <Esc> elvis will be
  90.      ready for a command.
  91.  
  92. command         description                                             type
  93. ---------------+-------------------------------------------------------+--------
  94.         ^A      ---
  95.         ^B      Move toward the top of the file by 1 screenful
  96.         ^C      ---
  97. count   ^D      scroll down <count> lines (default 1/2 screen)
  98. count   ^E      scroll up <count> lines
  99.         ^F      move toward the bottom of the file by 1 screenful
  100.         ^G      show file status, and the current line #
  101. count   ^H      move left, like h                                       MOVE
  102.         ^I      ---
  103. count   ^J      move down                                               MOVE
  104.         ^K      ---
  105.         ^L      redraw the screen
  106. count   ^M      move to the front of the next line                      MOVE
  107. count   ^N      move down                                               MOVE
  108.         ^O      ---
  109. count   ^P      move up                                                 MOVE
  110.         ^Q      ---
  111.         ^R      redraw the screen
  112.         ^S      ---
  113.         ^T      ---
  114. count   ^U      scroll up <count> lines (default 1/2 screen)
  115.         ^V      ---
  116.         ^W      ---
  117.         ^X      ---
  118. count   ^Y      scroll down <count> lines
  119.         ^Z      ---
  120.         ESC     ---
  121.         ^\      ---
  122.         ^]      if the cursor is on a tag name, go to that tag
  123.         ^^      ---
  124.         ^_      ---
  125. count   SPC     move right,like l                                       MOVE
  126.          ! mv   run the selected lines thru an external filter program
  127.          " key  select which cut buffer to use next
  128.  
  129.                                     - 2 -
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. count    # +    increment a number                                      EDIT
  139.          $      move to the rear of the current line                    MOVE
  140.          %      move to the matching (){}[] character                   MOVE
  141.          &      ---
  142.          ' key  move to a marked line                                   MOVE
  143. count    (      move backward <count> sentences                         MOVE
  144. count    )      move forward <count> sentences                          MOVE
  145.          *      ---
  146. count    +      move to the front of the next line                      MOVE
  147. count    ,      repeat the previous [fFtT] but in the other direction   MOVE
  148. count    -      move to the front of the preceding line                 MOVE
  149. count    .      repeat the previous "edit" command
  150.          / text search forward for a given regular expression           MOVE
  151.          0      if not part of count, move to 1st char of this line     MOVE
  152.          1      part of count
  153.          2      part of count
  154.          3      part of count
  155.          4      part of count
  156.          5      part of count
  157.          6      part of count
  158.          7      part of count
  159.          8      part of count
  160.          9      part of count
  161.          : text run single EX cmd
  162. count    ;      repeat the previous [fFtT] cmd                          MOVE
  163.          < mv   shift text left                                         EDIT
  164.          =      ---
  165.          > mv   shift text right                                        EDIT
  166.          ? text search backward for a given regular expression          MOVE
  167.          @      ---
  168. count    A inp  append at end of the line                               EDIT
  169. count    B      move back Word                                          MOVE
  170.          C inp  change text from the cursor through the end of the line EDIT
  171.          D      delete text from the cursor through the end of the line EDIT
  172. count    E      move end of Word                                        MOVE
  173. count    F key  move leftward to a given character                      MOVE
  174. count    G      move to line #<count> (default is the bottom line)      MOVE
  175. count    H      move to home row (the line at the top of the screen)
  176. count    I inp  insert at the front of the line (after indents)         EDIT
  177. count    J      join lines, to form one big line                        EDIT
  178.          K      look up keyword
  179. count    L      move to last row (the line at the bottom of the screen)
  180.          M      move to middle row
  181.          N      repeat previous search, but in the opposite direction   MOVE
  182. count    O inp  open up a new line above the current line               EDIT
  183.          P      paste text before the cursor
  184.          Q      quit to EX mode
  185.          R inp  overtype                                                EDIT
  186. count    S inp  change lines, like <count>cc
  187. count    T key  move leftward *almost* to a given character             MOVE
  188.          U      Undo all recent changes to the current line
  189.          V      ---
  190. count    W      move forward <count> Words                              MOVE
  191. count    X      delete the character(s) to the left of the cursor       EDIT
  192. count    Y      yank text line(s) (copy them into a cut buffer)
  193.          Z Z    save the file & exit
  194.  
  195.                                     - 3 -
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.          [ [    move back 1 section                                     MOVE
  205.          \      ---
  206.          ] ]    move forward 1 section                                  MOVE
  207.          ^      move to the front of the current line (after indent)    MOVE
  208.          _      ---
  209.          ` key  move to a marked character                              MOVE
  210. count    a inp  insert text after the cursor                            EDIT
  211. count    b      move back <count> words                                 MOVE
  212.          c mv   change text                                             EDIT
  213.          d mv   delete text                                             EDIT
  214. count    e      move forward to the end of the current word             MOVE
  215. count    f key  move rightward to a given character                     MOVE
  216.          g      ---
  217. count    h      move left                                               MOVE
  218. count    i inp  insert text at the cursor                               EDIT
  219. count    j      move down                                               MOVE
  220. count    k      move up                                                 MOVE
  221. count    l      move right                                              MOVE
  222.          m key  mark a line or character
  223.          n      repeat the previous search                              MOVE
  224. count    o inp  open a new line below the current line                  EDIT
  225.          p      paste text after the cursor
  226.          q      ---
  227. count    r key  replace <count> chars by a given character              EDIT
  228. count    s inp  replace <count> chars with text from the user           EDIT
  229. count    t key  move rightward *almost* to a given character            MOVE
  230.          u      undo the previous edit command
  231.          v      ---
  232. count    w      move forward <count> words                              MOVE
  233. count    x      delete the character that the cursor's on               EDIT
  234.          y mv   yank text (copy it into a cut buffer)
  235.          z key  scroll current line to the screen's +=top -=bottom .=middle
  236. count    {      move back <count> paragraphs                            MOVE
  237. count    |      move to column <count> (the leftmost column is 1)
  238. count    }      move forward <count> paragraphs                         MOVE
  239.          ~      switch a character between uppercase & lowercase        EDIT
  240.         DEL     ---
  241. --------------------------------------------------------------------------------
  242.  
  243. count   Many commands may be preceded by a count.  This is a sequence of digits
  244.         representing a decimal number.  For most commands that use a count,
  245.         the command is repeated <count> times.  The count is always optional,
  246.         and usually defaults to 1.
  247.  
  248. key     Some commands require two keystrokes.  The first key always determines
  249.         which command is to be executed.  The second key is used as a parameter
  250.         to the command.
  251.  
  252. mv      Six commands (! < > c d y) operate on text between the cursor and some
  253.         other position.  To specify that other position, you are expected to
  254.         follow the command keystroke with a movement command.  Also, you may
  255.         have the command operate on the whole line that the cursor is on by
  256.         typing the command key a second time.
  257.  
  258. inp     Many commands allow the user to interactively enter text.
  259.  
  260.  
  261.                                     - 4 -
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. EDIT    These commands affect text, and may be repeated by the "." command.
  271.  
  272. MOVE    These commands move the cursor, and may be used to specify the extent
  273.         of a member of the "mv" class of commands.
  274.  
  275.  
  276.   _I_n_p_u_t _M_o_d_e
  277.  
  278.         You can't type text into your file  directly  from  visual  command
  279.      mode.  Instead,  you must first give a command which will put you into
  280.      input mode. The commands to do this are A/C/I/O/R/S/a/i/o/s.
  281.  
  282.         The S/s/C/c commands temporarily place a $ at the end of  the  text
  283.      that they are going to change.
  284.  
  285.         In  input  mode,  all  keystrokes are inserted into the text at the
  286.      cursor's position, except for the following:
  287.             ^A      insert a copy of the last input text
  288.             ^D      delete one indent character
  289.             ^H      (backspace) erase the character before the cursor
  290.             ^L      redraw the screen
  291.             ^M      (carriage return) insert a newline (^J, linefeed)
  292.             ^P      insert the contents of the cut buffer
  293.             ^R      redraw the screen, like ^L
  294.             ^T      insert an indent character
  295.             ^U      backspace to the beginning of the line
  296.             ^V      insert the following keystroke, even if special
  297.             ^W      backspace to the beginning of the current word
  298.             ^Z ^Z   write the file & exit elvis
  299.             ^[      (ESCape) exit from input mode, back to command mode
  300.  
  301.         Also, on some systems, ^S may stop output, ^Q may  restart  output,
  302.      and  ^C  may  interupt  execution.  ^@  (the  NUL character) cannot be
  303.      inserted.
  304.  
  305.         The R visual command puts you in overtype mode, which is a slightly
  306.      different form of input mode. In overtype mode, each time you insert a
  307.      character, one of the old characters is deleted from the file.
  308.  
  309.  
  310.   _A_r_r_o_w _k_e_y_s _i_n _I_n_p_u_t _M_o_d_e
  311.  
  312.         The arrow keys can be used to move the cursor in input mode.  (This
  313.      is  an  extension;  the  real  Vi  doesn't support arrow keys in input
  314.      mode.) The <PgUp>, <PgDn>, <Home>, and <End> keys work in input  mode,
  315.      too. The <Delete> key deletes a single character in input mode.
  316.  
  317.         The  best  thing about allowing arrow keys to work in input mode is
  318.      that as long as you're in input mode, Elvis seems  to  have  a  fairly
  319.      ordinary  user interface. With most other text editors, you are always
  320.      in either insert mode or replace mode, and you can use the arrow  keys
  321.      at  any time to move the cursor. Now, Elvis can act like that, too. In
  322.      fact, with the new "inputmode" option and  the  "control-Z  control-Z"
  323.      input  command,  you may never have to go into visual command mode for
  324.      simple edit sessions.
  325.  
  326.  
  327.                                     - 5 -
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.   _D_i_g_r_a_p_h_s
  337.  
  338.  
  339.  
  340.         Elvis supports digraphs as a way to enter non-ASCII  characters.  A
  341.      digraph  is a character which is composed of two other characters. For
  342.      Elvis, the first character must be an ASCII punctuation character, and
  343.      the  second  can  be  any  other  ASCII  character.  For  example,  an
  344.      apostrophe and the letter i could be defined as a digraph which is  to
  345.      be stored & displayed as an accented i.
  346.  
  347.         Elvis  has  no built-in digraphs, since there is no single standard
  348.      for extended ASCII character sets. You must explicitly define a custom
  349.      set  of  digraphs  for the non-ASCII characters that your computer (or
  350.      terminal) uses. Digraphs are defined via the ":digraph" command.
  351.  
  352.         To actually use a digraph, you must first be in  input  mode.  Type
  353.      the  punctuation  character,  then  hit <Backspace>, and then type the
  354.      other character. Elvis will then substitute the non-ASCII character in
  355.      their place.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                     - 6 -
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402. _C_o_l_o_n _M_o_d_e _C_o_m_m_a_n_d_s
  403.  
  404.         To  use  colon  mode  commands, you must switch from visual command
  405.      mode to colon command mode. The visual mode commands to  do  this  are
  406.      ":" for a single colon command, or "Q" for many colon mode commands.
  407.  
  408.         Lines           command         arguments
  409.         ---------------+---------------+-------------------------------
  410.         [line]          append
  411.                         args            [files]
  412.                         cd              [directory]
  413.                         chdir           [directory]
  414.         [line][,line]   change
  415.         [line][,line]   copy            line
  416.         [line][,line]   debug[!]
  417.         [line][,line]   delete          ["x]
  418.                         digraph[!]      [XX [Y]]
  419.                         edit[!]         [file]
  420.                         ex[!]           [file]
  421.                         file
  422.         [line][,line]   global          /regexp/ command
  423.         [line]          insert
  424.         [line][,line]   join
  425.         [line][,line]   list
  426.                         map[!]          key mapped_to
  427.         [line]          mark            x
  428.                         mkexrc
  429.         [line][,line]   move            line
  430.                         next[!]         [files]
  431.                         Next[!]
  432.                         previous[!]
  433.         [line][,line]   print
  434.         [line]          put             ["x]
  435.                         quit[!]
  436.         [line]          read            file
  437.                         rewind[!]
  438.                         set             [options]
  439.                         source          file
  440.         [line][,line]   substitute      /regexp/replacement/[p][g]
  441.                         tag[!]          tagname
  442.         [line][,line]   to              line
  443.                         undo
  444.                         unmap[!]        key
  445.                         validate[!]
  446.                         version
  447.         [line][,line]   vglobal         /regexp/ command
  448.                         visual
  449.                         wq
  450.         [line][,line]   write[!]        [[>>]file]
  451.                         xit[!]
  452.         [line][,line]   yank            ["x]
  453.         [line][,line]   !               command
  454.         [line][,line]   <
  455.         [line][,line]   =
  456.         [line][,line]   >
  457.  
  458.  
  459.                                     - 7 -
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.   _L_i_n_e _S_p_e_c_i_f_i_e_r_s
  469.  
  470.  
  471.  
  472.         Line  specifiers  are  always  optional. The first line specifer of
  473.      most commands usually defaults to the current line.  The  second  line
  474.      specifer  usually defaults to be the same as the first line specifier.
  475.      Exceptions are :write, :global, and :vglobal, which act on  all  lines
  476.      of the file by default, and :!, which acts on no lines by default.
  477.  
  478.         Line  specifiers  consist  of an absolute part and a relative part.
  479.      The absolute part of a line specifer may be either  an  explicit  line
  480.      number,  a  mark,  a  dot to denote the current line, a dollar sign to
  481.      denote the last line of the file, or a forward or backward search.
  482.  
  483.         An explicit line number is simply a decimal number, expressed as  a
  484.      string of digits.
  485.  
  486.         A  mark  is  typed  in as an apostrophe followed by a letter. Marks
  487.      must be set before they can be used. You can  set  a  mark  in  visual
  488.      command  mode  by  typing "m" and a letter, or you can set it in colon
  489.      command mode via the "mark" command.
  490.  
  491.         A forward search is typed in as a regular expression surrounded  by
  492.      slash  characters;  searching  begins  at the default line. A backward
  493.      search is typed in as a  regular  expression  surrounded  by  question
  494.      marks; searching begins at the line before the default line.
  495.  
  496.         If you omit the absolute part, then the default line is used.
  497.  
  498.         The  relative  part  of  a  line  specifer is typed as a "+" or "-"
  499.      character followed by a decimal number. The  number  is  added  to  or
  500.      subtracted from the absolute part of the line specifier to produce the
  501.      final line number.
  502.  
  503.         As a special case, the % character may be used to specify all lines
  504.      of  the  file.  It  is roughly equivelent to saying 1,$. This can be a
  505.      handy shortcut.
  506.  
  507.         Some examples:
  508.             :p              print the current line
  509.             :37p            print line 37
  510.             :'gp            print the line which contains mark g
  511.             :/foo/p         print the next line that contains "foo"
  512.             :$p             print the last line of the file
  513.             :20,30p         print lines 20 through 30
  514.             :1,$p           print all lines of the file
  515.             :%p             print all lines of the file
  516.             :/foo/-2,+4p    print 5 lines around the next "foo"
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                     - 8 -
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.   _T_e_x_t _E_n_t_r_y _C_o_m_m_a_n_d_s
  535.             [line] append
  536.             [line][,line] change ["x]
  537.             [line] insert
  538.  
  539.         The (a)ppend command inserts text after the specified line.
  540.  
  541.         The (i)nsert command inserts text before the specified line.
  542.  
  543.         The (c)hange command copies the range of lines into a  cut  buffer,
  544.      deletes them, and inserts new text where the old text used to be.
  545.  
  546.         For  all of these commands, you indicate the end of the text you're
  547.      inserting by hitting ^D or by entering a line which  contains  only  a
  548.      period.
  549.  
  550.  
  551.   _C_u_t & _P_a_s_t_e _C_o_m_m_a_n_d_s
  552.             [line][,line] delete ["x]
  553.             [line][,line] yank ["x]
  554.             [line] put[!] ["x]
  555.             [line][,line] copy line
  556.             [line][,line] to line
  557.             [line][,line] move line
  558.  
  559.         The (d)elete command copies the specified range of lines into a cut
  560.      buffer, and then deletes them.
  561.  
  562.         The (y)ank command copies the specified range of lines into  a  cut
  563.      buffer, but does *not* delete them.
  564.  
  565.         The  (pu)t  command  inserts  text  from  a  cut  buffer  after the
  566.      specified line -- or before it if the ! is present.
  567.  
  568.         The (co)py and (t)o commands yank the specified range of lines  and
  569.      then immediately paste them after some other line.
  570.  
  571.         The  (m)ove  command  deletes the specified range of lines and then
  572.      immediately pastes them after some other line. If the destination line
  573.      comes  after  the deleted text, then it will be adjusted automatically
  574.      to account for the deleted lines.
  575.  
  576.  
  577.   _D_i_s_p_l_a_y _T_e_x_t _C_o_m_m_a_n_d_s
  578.             [line][,line] print
  579.             [line][,line] list
  580.  
  581.         The (p)rint command displays the specified range of lines.
  582.  
  583.         The (l)ist command also displays them, but it is  careful  to  make
  584.      control characters visible.
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                     - 9 -
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.   _G_l_o_b_a_l _O_p_e_r_a_t_i_o_n_s _C_o_m_m_a_n_d_s
  601.             [line][,line] global /regexp/ command
  602.             [line][,line] vglobal /regexp/ command
  603.  
  604.         The  (g)lobal  command  searches through the lines of the specified
  605.      range (or through the whole file if no range is specified)  for  lines
  606.      that  contain  a given regular expression. It then moves the cursor to
  607.      each of these lines and runs some other command on them.
  608.  
  609.         The (v)global command is similar, but it searches  for  lines  that
  610.      _d_o_n'_t contain the regular expression.
  611.  
  612.  
  613.   _L_i_n_e _E_d_i_t_i_n_g _C_o_m_m_a_n_d_s
  614.             [line][,line] join
  615.             [line][,line] ! program
  616.             [line][,line] <
  617.             [line][,line] >
  618.             [line][,line] substitute /regexp/replacement/[p][g]
  619.  
  620.         The  (j)oin  command  catenates  all  lines  in the specified range
  621.      together to form one big line. If only a  single  line  is  specified,
  622.      then the following line is catenated onto it.
  623.  
  624.         The  !  command  runs  an  external  filter  program, and feeds the
  625.      specified range of lines to it's stdin. The lines are then replaced by
  626.      the  output of the filter. A typical example would be ":'a,'z!sort" to
  627.      sort the lines 'a,'z.
  628.  
  629.         The < and > commands shift the specified range  of  lines  left  or
  630.      right,  normally  by  the  width  of 1 tab character. The "shiftwidth"
  631.      option determines the shifting amount.
  632.  
  633.         The (s)ubstitute command finds the regular expression in each line,
  634.      and  replaces  it with the replacement text. The "p" option causes the
  635.      altered lines to be printed, and the "g" option permits all  instances
  636.      of  the  regular expression to be found & replaced. (Without "g", only
  637.      the first occurrence in each line is replaced.)
  638.  
  639.  
  640.   _U_n_d_o _C_o_m_m_a_n_d
  641.             undo
  642.  
  643.         The (u)ndo command restores the file to the state it was in  before
  644.      your most recent command which changed text.
  645.  
  646.  
  647.   _C_o_n_f_i_g_u_r_a_t_i_o_n & _S_t_a_t_u_s _C_o_m_m_a_n_d_s
  648.             map[!] [key mapped_to]
  649.             unmap[!] key
  650.             digraph[!] [XX [Y]]
  651.             set [options]
  652.             mkexrc
  653.             [line] mark x
  654.             visual
  655.             version
  656.  
  657.                                     - 10 -
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.             [line][,line] =
  667.             file
  668.             source file
  669.  
  670.         The  (ma)p  command allows you to configure Elvis to recognize your
  671.      function keys, and treat them as though they  transmitted  some  other
  672.      sequence of characters. Normally this mapping is done only when in the
  673.      visual command mode, but with the [!] present it will map  keys  under
  674.      all  contexts. When this command is given with no arguments, it prints
  675.      a table showing all mappings currently in effect. When called with two
  676.      arguments,  the  first  is  the sequence that your function key really
  677.      sends, and the second is the sequence that you want Elvis to treat  it
  678.      as having sent.
  679.  
  680.         The  (unm)ap command removes key definitions that were made via the
  681.      map command.
  682.  
  683.         The (di)graph command allows you to display  the  set  of  digraphs
  684.      that  Elvis  is  using,  or  add/remove  a digraph. To list the set of
  685.      digraphs, use the digraph command with no arguments. To add a digraph,
  686.      you  should give the digraph command two arguments. The first argument
  687.      is the two ASCII characters that are to be combined; the second is the
  688.      non-ASCII  character  that  they  represent. The non-ASCII character's
  689.      most significant bit is automatically  set  by  the  digraph  command,
  690.      unless  to  append  a  !  to the command name. Removal of a digraph is
  691.      similar to adding a digraph, except that  you  should  leave  off  the
  692.      second argument.
  693.  
  694.         The  (se)t  command allows you examine or set various options. With
  695.      no arguments, it  displays  the  values  of  options  that  have  been
  696.      changed.  With the single argument "all" it displays the values of all
  697.      options, regardless of whether they've been  explicitly  set  or  not.
  698.      Otherwise, the arguments are treated as options to be set.
  699.  
  700.         The  (mk)exrc  command  saves  the  current configuration to a file
  701.      called ".exrc" in the current directory.
  702.  
  703.         The mar(k) command defines a named mark  to  refer  to  a  specific
  704.      place  in  the  file. This mark may be used later to specify lines for
  705.      other commands.
  706.  
  707.         The (vi)sual command puts the editor into visual mode.  Instead  of
  708.      emulating ex, Elvis will start emulating vi.
  709.  
  710.         The (ve)rsion command tells you that what version of Elvis this is.
  711.  
  712.         The  =  command  tells  you  what  line  you  specified, or, if you
  713.      specified a range of lines, it will tell you both  endpoints  and  the
  714.      number of lines included in the range.
  715.  
  716.         The  (f)ile  command tells you the name of the file, whether it has
  717.      been modified, the number of lines in the file, and the  current  line
  718.      number.
  719.  
  720.  
  721.  
  722.  
  723.                                     - 11 -
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.         The (so)urce command reads a sequence of colon mode commands from a
  733.      file, and interprets them.
  734.  
  735.  
  736.   _M_u_l_t_i_p_l_e _F_i_l_e _C_o_m_m_a_n_d_s
  737.             args [files]
  738.             next[!] [files]
  739.             Next[!]
  740.             previous[!]
  741.             rewind[!]
  742.  
  743.         When you invoke Elvis from your shell's command line, any filenames
  744.      that  you  give to Elvis as arguments are stored in the args list. The
  745.      (ar)gs command will display this list, or define a new one.
  746.  
  747.         The (n)ext command switches from the current file to the  next  one
  748.      in the args list. You may specify a new args list here, too.
  749.  
  750.         The  (N)ext and (pre)vious commands (they're really aliases for the
  751.      same command) switch from the current file to the  preceding  file  in
  752.      the args list.
  753.  
  754.         The  (rew)ind  command  switches from the current file to the first
  755.      file in the args list.
  756.  
  757.  
  758.   _S_w_i_t_c_h_i_n_g _F_i_l_e_s _C_o_m_m_a_n_d_s
  759.             edit[!] [file]
  760.             tag[!] tagname
  761.  
  762.         The (e)dit command allows to switch from the current file  to  some
  763.      other file. This has nothing to do with the args list, by the way.
  764.  
  765.         The (ta)g command looks up a given tagname in a file called "tags".
  766.      This tells it which file the tag is in, and how to  find  it  in  that
  767.      file. Elvis then switches to the tag's file and finds the tag.
  768.  
  769.  
  770.   _E_x_i_t _C_o_m_m_a_n_d_s
  771.             quit[!]
  772.             wq
  773.             xit
  774.  
  775.         The (q)uit command exits from the editor without saving your file.
  776.  
  777.         The (wq) command writes your file out, then then exits.
  778.  
  779.         The (x)it command is similar to the (wq) command, except that (x)it
  780.      won't bother to write your file if you haven't modified it.
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                     - 12 -
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.   _F_i_l_e _I/_O _C_o_m_m_a_n_d_s
  799.             [line] read file
  800.             [line][,line] write[!][[>>]file]
  801.  
  802.         The (r)ead command gets text from another file and inserts it after
  803.      the specified line.
  804.  
  805.         The  (w)rite  command writes the whole file, or just part of it, to
  806.      some other file. The !, if  present,  will  permit  the  lines  to  be
  807.      written  even  if  you've  set the readonly option. If you precede the
  808.      filename by >> then the lines will be appended to the file.
  809.  
  810.  
  811.   _D_i_r_e_c_t_o_r_y _C_o_m_m_a_n_d_s
  812.             cd [directory]
  813.             chdir [directory]
  814.             shell
  815.  
  816.         The (cd) and (chd)ir commands (really two names  for  one  command)
  817.      switch the current working directory.
  818.  
  819.         The (sh)ell command starts an interactive shell.
  820.  
  821.  
  822.   _D_e_b_u_g_g_i_n_g _C_o_m_m_a_n_d_s
  823.             [line][,line] debug[!]
  824.             validate[!]
  825.  
  826.         These  commands  are  only  available if you compile Elvis with the
  827.      -DDEBUG flag.
  828.  
  829.         The de(b)ug command lists stats for the blocks  which  contain  the
  830.      specified  range  of  lines. If the ! is present, then the contents of
  831.      those blocks is displayed, too.
  832.  
  833.         The  (va)lidate  command  checks  certain  variables  for  internal
  834.      consistency.  Normally  it doesn't output anything unless it detects a
  835.      problem. With the !, though, it will always produce *some* output.
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                     - 13 -
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. _R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n_s
  865.  
  866.         Elvis uses regular expressions for searching and substututions.
  867.  
  868.  
  869.   _S_y_n_t_a_x
  870.  
  871.         The code for handling regular expressions  is  derived  from  Henry
  872.      Spencer's  regexp  package.  However,  I  have  modified the syntax to
  873.      resemble that of the real vi.
  874.  
  875.         Elvis' regexp package treats the following  one-  or  two-character
  876.      strings (called meta-characters) in special ways:
  877.             \( \)    Used to control grouping
  878.             ^        Matches the beginning of a line
  879.             $        Matches the end of a line
  880.             \<       Matches the beginning of a word
  881.             \>       Matches the end of a word
  882.             [ ]      Matches any single character inside the brackets
  883.             *        The preceding may be repeated 0 or more times
  884.             +        The preceding may be repeated 1 or more times
  885.             ?        The preceding is optional
  886.             \|       Separates two alternatives
  887.  
  888.         Anything  else  is  treated  as a normal character which must match
  889.      exactly. The special strings may all be preceded  by  a  backslash  to
  890.      force them to be treated normally.
  891.  
  892.         For example, "\(for\|back\)ward" will find "forward" or "backward",
  893.      and "\<text\>" will find "text" but not "context".
  894.  
  895.  
  896.   _O_p_t_i_o_n_s
  897.  
  898.         Elvis has two options which affect the way regular expressions  are
  899.      used. These options may be examined or set via the :set command.
  900.  
  901.         The  first  option is called "[no]magic". This is a boolean option,
  902.      and it is "magic" (TRUE) by default. While in magic mode, all  of  the
  903.      meta-characters behave as described above. In nomagic mode, only ^ and
  904.      $ retain their special meaning.
  905.  
  906.         The second option is called "[no]ignorecase".  This  is  a  boolean
  907.      option,  and  it  is  "noignorecase"  (FALSE)  by  default.  While  in
  908.      ignorecase mode, the searching mechanism will not distinguish  between
  909.      an  uppercase  letter  and  its  lowercase form. In noignorecase mode,
  910.      uppercase and lowercase are treated as being different.
  911.  
  912.         Also, the "[no]wrapscan" option affects searches.
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                                     - 14 -
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.   _S_u_b_s_t_i_t_u_t_i_o_n_s
  931.  
  932.         The :s command has at least two arguments:  a  regular  expression,
  933.      and   a  substitution  string.  The  text  that  matched  the  regular
  934.      expression is replaced by text which is derived from the  substitution
  935.      string.
  936.  
  937.         Most characters in the substitution string are copied into the text
  938.      literally but a few have special meaning:
  939.             &        Causes a copy of the original text to be inserted
  940.             \1       Inserts a copy of that portion of the original text which
  941.                      matched the first set of \( \) parentheses.
  942.             \2 - \9  Does the same for the second (etc.) pair of \( \).
  943.  
  944.         These may be preceded by a backslash to force them  to  be  treated
  945.      normally.
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                     - 15 -
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996. _O_p_t_i_o_n_s
  997.  
  998.         Options  may  be  set  or examined via the colon command "set". The
  999.      values of options will affect the operation of later commands.
  1000.  
  1001.         There are three types of options:  Boolean,  string,  and  numeric.
  1002.      Boolean  options  are made TRUE by giving the name of the option as an
  1003.      argument to the "set" command; they are made FALSE  by  prefixing  the
  1004.      name  with  "no".  For  example, "set autoindent" makes the autoindent
  1005.      option TRUE, and "set noautoindent" makes it FALSE.
  1006.  
  1007.         To change the value of a string or numeric option, pass  the  "set"
  1008.      command  the  name  of  the  option,  followed  by an "=" sign and the
  1009.      option's new value. For example, "set tabstop=8" will give the tabstop
  1010.      option a value of 8. For string options, you may enclose the new value
  1011.      in quotes.
  1012.  
  1013.         For convenience, options have both a long descriptive  name  and  a
  1014.      short   name   which  is  easy  to  type.  You  may  use  either  name
  1015.      interchangably. I like the short names, myself.
  1016.  
  1017. Names           Type        Default             Meaning
  1018. ---------------+-----------+-------------------+--------------------------------
  1019. ai, autoindent  Boolean     noai                auto-indent during input
  1020. aw, autowrite   Boolean     noaw                auto-write when switching files
  1021. ca, charattr    Boolean     noca                interpret \fX sequences
  1022. co, columns     Numeric     co=80               width of the screen
  1023. dir, directory  String      dir="/usr/tmp"      where tmp files are kept
  1024. eb, errorbells  Boolean     eb                  ring bell on error
  1025. er, exrefresh   Boolean     er                  write lines indiviually in EX
  1026. hf, hideformat  Boolean     hf                  hide text formatter comamnds
  1027. ic, ignorecase  Boolean     noic                upper/lowercase match in search
  1028. im, inputmode   Boolean     noim                start vi in insert mode?
  1029. kt, keytime     Numeric     kt=2                timeout for mapped key entry
  1030. kp, keywordprg  String      kp="/usr/bin/ref"   full pathname of shift-K prog
  1031. ln, lines       Numeric     ln=25               number of lines on the screen
  1032. li, list        Boolean     noli                display lines in "list" mode
  1033. ma, magic       Boolean     ma                  use regular expression in search
  1034. pa, paragraphs  String      pa="PPppPApa"       names of "paragraph" nroff cmd
  1035. ro, readonly    Boolean     noro                prevent overwriting of orig file
  1036. re, report      Numeric     re=5                report when 5 or more changes
  1037. sc, scroll      Numeric     sc=12               scroll amount for ^U and ^D
  1038. se, sections    String      se="SEseSHsh"       names of "section" nroff cmd
  1039. sh, shell       String      sh="/bin/sh"        full pathname of the shell
  1040. sho, showmode   Boolean     noshowmode          say when we're in input mode
  1041. sw, shiftwidth  Numeric     sw=8                shift amount for < and >
  1042. ss, sidescroll  Numeric     ss=8                amount of sideways scrolling
  1043. sy, sync        Boolean     nosy                call sync() often
  1044. ts, tabstop     Numeric     ts=8                width of tab characters
  1045. te, term        String      te="?"              name of the termcap entry
  1046. vb, vbell       Boolean     vb                  use visible alternative to bell
  1047. wa, warn        Boolean     wa                  warn for ! if file modified
  1048. wm, wrapmargin  Numeric     wm=0                wrap long lines in input mode
  1049. ws, wrapscan    Boolean     ws                  at EOF, searches wrap to line 1
  1050.  
  1051.  
  1052.  
  1053.                                     - 16 -
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.   _a_u_t_o_i_n_d_e_n_t
  1063.  
  1064.         During input mode, the autoindent option will cause each added line
  1065.      to  begin with the same amount of leading whitespace as the line above
  1066.      it. Without autoindent, added lines are initially empty.
  1067.  
  1068.  
  1069.   _a_u_t_o_w_r_i_t_e
  1070.  
  1071.         When you're editing one file and decide to switch to another -- via
  1072.      the  :tag  command,  or :next command, perhaps -- if your current file
  1073.      has been modified, then Elvis will normally print an error message and
  1074.      refuse to switch.
  1075.  
  1076.         However,  if  the autowrite option is on, then Elvis will write the
  1077.      modified version of the current file and successfully  switch  to  the
  1078.      new file.
  1079.  
  1080.  
  1081.   _c_h_a_r_a_t_t_r
  1082.  
  1083.         Many  text  formatting  programs allow you to designate portions of
  1084.      your text to be underlined, italicized, or boldface by  embedding  the
  1085.      special strings \fU, \fI, and \fB in your text. The special string \fR
  1086.      marks the end of underlined or boldface text.
  1087.  
  1088.         Elvis normally treats those special strings  just  like  any  other
  1089.      text.
  1090.  
  1091.         However,  if  the  charattr option is on, then Elvis will interpret
  1092.      those special strings correctly, to  display  underlined  or  boldface
  1093.      text  on the screen. (This only works, of course, if your terminal can
  1094.      display underlined and boldface, and if the TERMCAP entry says how  to
  1095.      do it.)
  1096.  
  1097.  
  1098.   _c_o_l_u_m_n_s
  1099.  
  1100.         This  is  a "read only" option. You can't change its value, but you
  1101.      can have Elvis print it. It shows how wide your screen is.
  1102.  
  1103.  
  1104.   _d_i_r_e_c_t_o_r_y
  1105.  
  1106.         Elvis stores text in temporary files. This  option  allows  you  to
  1107.      control  which  directory  those  temporary  files will appear in. The
  1108.      default is /usr/tmp.
  1109.  
  1110.         This option can only be set in a .exrc file; after that, elvis will
  1111.      have  already  started making temporary files in some other directory,
  1112.      so it would be too late.
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                     - 17 -
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.   _e_r_r_o_r_b_e_l_l_s
  1129.  
  1130.         Elvis normally rings a bell  when  you  do  something  wrong.  This
  1131.      option lets you disable the bell.
  1132.  
  1133.  
  1134.   _e_x_r_e_f_r_e_s_h
  1135.  
  1136.         The  EX mode of Elvis writes many lines to the screen. You can make
  1137.      Elvis either write each line to the screen separately, or save up many
  1138.      lines and write them all at once.
  1139.  
  1140.         The exrefresh option is normally on, so each line is written to the
  1141.      screen separately.
  1142.  
  1143.         You may wish to turn the exrefresh option off  (:se  noer)  if  the
  1144.      "write"  system  call  is costly on your machine, or if you're using a
  1145.      windowing environment.  (Windowing  environments  scroll  text  a  lot
  1146.      faster when you write many lines at once.)
  1147.  
  1148.         This option has no effect in visual command mode or input mode.
  1149.  
  1150.  
  1151.   _h_i_d_e_f_o_r_m_a_t
  1152.  
  1153.         Many  text  formatters require you to embed format commands in your
  1154.      text, on lines  that  start  with  a  "."  character.  Elvis  normally
  1155.      displays these lines like any other text, but if the hideformat option
  1156.      is on, then format lines are displayed as blank lines.
  1157.  
  1158.  
  1159.   _i_g_n_o_r_e_c_a_s_e
  1160.  
  1161.         Normally, when Elvis searches for text, it treats uppercase letters
  1162.      as being different for lowercase letters.
  1163.  
  1164.         When  the  ignorecase  option  is  on,  uppercase and lowercase are
  1165.      treated as equal.
  1166.  
  1167.  
  1168.   _i_n_p_u_t_m_o_d_e
  1169.  
  1170.         This option allows you to have Elvis start up in insert  mode.  You
  1171.      can  still  exit  insert  mode  at any time by hitting the ESC key, as
  1172.      usual. Usually, this option would be set in your ".exrc" file.
  1173.  
  1174.  
  1175.   _k_e_y_t_i_m_e
  1176.  
  1177.         The arrow keys of most terminals send a  multi-character  sequence.
  1178.      It  takes  a  measurable  amount  of  time  for  these sequences to be
  1179.      transmitted. The keytime option allows  you  to  control  the  maximum
  1180.      amount  of  time to allow for an arrow key (or other mapped key) to be
  1181.      received in full.
  1182.  
  1183.  
  1184.  
  1185.                                     - 18 -
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.         The default keytime value is 2. Because of the way UNIX timekeeping
  1195.      works,  the  actual  amount of time allowed will vary slightly, but it
  1196.      will always be between 1 and 2 seconds.
  1197.  
  1198.         If you set keytime to 1, then the actual  amount  of  time  allowed
  1199.      will  be  between  0  and  1  second.  This  will  generally  make the
  1200.      keyboard's response be a little faster (mostly for the ESC  key),  but
  1201.      on  those  occasions  where the time allowed happens to be closer to 0
  1202.      than 1 second, Elvis may fail to allow enough time for an arrow  key's
  1203.      sequence to be received fully. Ugh.
  1204.  
  1205.         As  a  special  case, you can set keytime to 0 to disable this time
  1206.      limit stuff altogether. The big problem here is: If your  arrow  keys'
  1207.      sequences  start  with  an  ESC,  then every time you hit your ESC key
  1208.      Elvis will wait... and wait... to see if maybe that ESC was part of an
  1209.      arrow key's sequence.
  1210.  
  1211.         NOTE:  this option is a generalization of the timeout option of the
  1212.      real vi.
  1213.  
  1214.  
  1215.   _k_e_y_w_o_r_d_p_r_g
  1216.  
  1217.         Elvis has a special keyword lookup feature.  You  move  the  cursor
  1218.      onto  a  word, and hit shift-K, and Elvis uses another program to look
  1219.      up the word and display information about it.
  1220.  
  1221.         This option says which program gets run. It should contain the full
  1222.      pathname of the program; your whole execution path is _n_o_t checked.
  1223.  
  1224.         The  default  value  of  this  option is "/usr/bin/ref", which is a
  1225.      program that looks up the definition of a function in C. It  looks  up
  1226.      the function name in a file called "refs" which is created by ctags.
  1227.  
  1228.         You  can  subtitute  other  programs, such as an English dictionary
  1229.      program or the online  manual.  Elvis  runs  the  program,  using  the
  1230.      keyword  as its only argument. The program should write information to
  1231.      stdout. The program's exit status should be 0, unless you  want  Elvis
  1232.      to print "<<< failed >>>".
  1233.  
  1234.  
  1235.   _l_i_n_e_s
  1236.  
  1237.         This "read only" option shows how many lines you screen has.
  1238.  
  1239.  
  1240.   _l_i_s_t
  1241.  
  1242.         In  nolist  mode  (the  default), elvis displays text in a "normal"
  1243.      manner -- with tabs expanded to an appropriate number of spaces, etc.
  1244.  
  1245.         However, sometimes it is useful to have  tab  characters  displayed
  1246.      differently.  In  list  mode, tabs are displayed as "^I", and a "$" is
  1247.      displayed at the end of each line.
  1248.  
  1249.  
  1250.  
  1251.                                     - 19 -
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.   _m_a_g_i_c
  1261.  
  1262.         The search mechanism in Elvis can accept "regular  expressions"  --
  1263.      strings in which certain characters have special meaning.
  1264.  
  1265.         The  magic  option is normally on, which causes these characters to
  1266.      be treated specially.
  1267.  
  1268.         If you turn the magic option off (:se noma),  then  all  characters
  1269.      except  ^  and  $  are treated literally. ^ and $ retain their special
  1270.      meanings regardless of the setting of magic.
  1271.  
  1272.  
  1273.   _p_a_r_a_g_r_a_p_h_s
  1274.  
  1275.         The { and }  commands  move  the  cursor  forward  or  backward  in
  1276.      increments  of  one  paragraph.  Paragraphs  may be separated by blank
  1277.      lines, or by a "dot" command  of  a  text  formatter.  Different  text
  1278.      formatters  use  different  "dot"  commands. This option allows you to
  1279.      configure Elvis to work with your text formatter.
  1280.  
  1281.         It is assumed that your formatter uses commands that start  with  a
  1282.      "."  character  at  the  front  of  a  line,  and  then have a one- or
  1283.      two-character command name.
  1284.  
  1285.         The value of the paragraphs option is a string in which  each  pair
  1286.      of  characters is one possible form of your text formatter's paragraph
  1287.      command.
  1288.  
  1289.  
  1290.   _r_e_a_d_o_n_l_y
  1291.  
  1292.         Normally, Elvis will let you write back any file to which you  have
  1293.      write  permission.  If  you  don't have write permission, then you can
  1294.      only write the changed version of the file to a _d_i_f_f_e_r_e_n_t file.
  1295.  
  1296.         If you set the readonly option, then Elvis will pretend  you  don't
  1297.      have  write  permission  to  _a_n_y  file you edit. It is useful when you
  1298.      really only mean to use Elvis to look at a file,  not  to  change  it.
  1299.      This way you can't change it accidentally.
  1300.  
  1301.         This  option  is  normally  off, unless you use the "view" alias of
  1302.      Elvis. "View" is like "vi" except that the readonly option is on.
  1303.  
  1304.  
  1305.   _r_e_p_o_r_t
  1306.  
  1307.         Commands in Elvis may affect many lines. For commands that affect a
  1308.      lot of lines, Elvis will output a message saying what was done and how
  1309.      many lines were affected. This option allows you to define what "a lot
  1310.      of  lines"  means. The default is 5, so any command which affects 5 or
  1311.      more lines will cause a message to be shown.
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                     - 20 -
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.   _s_c_r_o_l_l
  1327.  
  1328.         The ^U and ^D keys normally scroll backward or forward  by  half  a
  1329.      screenful,  but  this is adjustable. The value of this option says how
  1330.      many lines those keys should scroll by.
  1331.  
  1332.  
  1333.   _s_e_c_t_i_o_n_s
  1334.  
  1335.         The [[ and ]] commands move  the  cursor  backward  or  forward  in
  1336.      increments of 1 section. Sections may be delimited by a { character in
  1337.      column 1 (which is useful for C source code) or by  means  of  a  text
  1338.      formatter's "dot" commands.
  1339.  
  1340.         This  option  allows  you to configure Elvis to work with your text
  1341.      formatter's "section" command,  in  exectly  the  same  way  that  the
  1342.      paragraphs  option  makes  it  work  with the formatter's "paragraphs"
  1343.      command.
  1344.  
  1345.  
  1346.   _s_h_e_l_l
  1347.  
  1348.         When Elvis forks a shell (perhaps for the :!  or  :shell  commands)
  1349.      this  is  the  program  that  is uses as a shell. This is "/bin/sh" by
  1350.      default, unless you have  set  the  SHELL  (or  COMSPEC,  for  MS-DOS)
  1351.      environment  variable,  it which case the default value is copied from
  1352.      the environment.
  1353.  
  1354.  
  1355.   _s_h_i_f_t_w_i_d_t_h
  1356.  
  1357.         The < and > commands shift text  left  or  right  by  some  uniform
  1358.      number  of  columns.  The  shiftwidth  option  defines  that  "uniform
  1359.      number". The default is 8.
  1360.  
  1361.  
  1362.   _s_h_o_w_m_o_d_e
  1363.  
  1364.         In visual mode, it is easy to forget whether you're in  the  visual
  1365.      command  mode  or input/replace mode. Normally, the showmode option is
  1366.      off, and you haven't a clue as to which mode you're in.  If  you  turn
  1367.      the  showmode  option  on, though, a little message will appear in the
  1368.      lower right-hand corner of your screen, telling you which mode  you're
  1369.      in.
  1370.  
  1371.  
  1372.   _s_i_d_e_s_c_r_o_l_l
  1373.  
  1374.         For long lines, Elvis scrolls sideways. (This is different from the
  1375.      real vi, which wraps a single long  line  onto  several  rows  of  the
  1376.      screen.)
  1377.  
  1378.         To  minimize  the  number of scrolls needed, Elvis moves the screen
  1379.      sideways by several characters at a time. The  value  of  this  option
  1380.      says how many characters' widths to scroll at a time.
  1381.  
  1382.  
  1383.                                     - 21 -
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.         Generally,  the  faster  your  screen can be redrawn, the lower the
  1393.      value you will want in this option.
  1394.  
  1395.  
  1396.   _s_y_n_c
  1397.  
  1398.         If the system crashes during an edit session,  then  most  of  your
  1399.      work can be recovered from the temporary file that elvis uses to store
  1400.      changes. However, sometimes UNIX/Minix will not copy  changes  to  the
  1401.      hard disk immediately, so recovery might not be possible. The [no]sync
  1402.      option lets you control this.
  1403.  
  1404.         In nosync mode (which is the default),  elvis  lets  the  operating
  1405.      system  control  when  data  is written to the disk. This is generally
  1406.      faster.
  1407.  
  1408.         In sync mode, elvis forces all changes out to disk every  time  you
  1409.      make a change. This is generally safer, but slower.
  1410.  
  1411.  
  1412.   _t_a_b_s_t_o_p
  1413.  
  1414.         Tab  characters  are normally 8 characters wide, but you can change
  1415.      their widths by means of this option.
  1416.  
  1417.  
  1418.   _t_e_r_m
  1419.  
  1420.         This "read only" option shows the name of the  termcap  entry  that
  1421.      Elvis is using for your terminal.
  1422.  
  1423.  
  1424.   _v_b_e_l_l
  1425.  
  1426.         If  your  termcap  entry describes a visible alternative to ringing
  1427.      your terminal's bell, then this option will say  whether  the  visible
  1428.      version gets used or not. Normally it will be.
  1429.  
  1430.         If  your  termcap  does NOT include a visible bell capability, then
  1431.      the vbell option will be off, and you can't turn it on.
  1432.  
  1433.  
  1434.   _w_a_r_n
  1435.  
  1436.         If you have modified a file but not yet written it  back  to  disk,
  1437.      then  Elvis  will  normally print a warning before executing a ":!cmd"
  1438.      command. However, in nowarn mode, this warning is not given.
  1439.  
  1440.         Elvis also normally prints a message after a successful search that
  1441.      wrapped at EOF. The [no]warn option can also disable this warning.
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.                                     - 22 -
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.   _w_r_a_p_m_a_r_g_i_n
  1459.  
  1460.         Normally  (with  wrapmargin=0) Elvis will let you type in extremely
  1461.      long lines, if you wish.
  1462.  
  1463.         However,  with  warpmargin  set   to   something   other   that   0
  1464.      (wrapmargin=10  is nice), Elvis will automatically cause long lines to
  1465.      be "wrapped" on a  word  break  for  lines  longer  than  wrapmargin's
  1466.      setting.
  1467.  
  1468.  
  1469.   _w_r_a_p_s_c_a_n
  1470.  
  1471.         Normally,  when  you  search  for  something, Elvis will find it no
  1472.      matter where it is in the file. Elvis starts at the  cursor  position,
  1473.      and  searches  forward.  If Elvis hits EOF without finding what you're
  1474.      looking for, then it wraps around to continue searching from line 1.
  1475.  
  1476.         If you turn off the wrapscan option (:se  nows),  then  when  Elvis
  1477.      hits EOF during a search, it will stop and say so.
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.                                     - 23 -
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524. _P_r_o_g_r_a_m_s
  1525.  
  1526.  
  1527.   _e_l_v_i_s, _e_x, _v_i, _v_i_e_w, _i_n_p_u_t - _T_h_e _e_d_i_t_o_r
  1528.             elvis [flags] [+cmd] [files...]
  1529.             -r      tell the user to use "virec" instead
  1530.             -R      set the "readonly" option to TRUE
  1531.             -t tag  search for a tag
  1532.             -e      start up in colon command mode
  1533.             -v      start up in visual command mode
  1534.             -i  start up in input mode
  1535.  
  1536.         The editor itself is called elvis, of course. On systems which pass
  1537.      the program name as an argument, such as Unix and Minix, you may  also
  1538.      install  elvis  under  the  names  "ex", "vi", and "view". These extra
  1539.      names would normally be links to elvis; see the "ln" shell command.
  1540.  
  1541.         When elvis is invoked as "vi", it behaves exactly as though it  was
  1542.      invoked  as  "elvis". However, if you invoke elvis as "view", then the
  1543.      readonly option is set as though you had given it the  "-R"  flag.  If
  1544.      you  invoke  elvis  as  "ex",  then  elvis  will start up in the colon
  1545.      command mode instead of the visual command mode,  as  though  you  had
  1546.      given it the "-e" flag. If you invoke elvis as "input" or "edit", then
  1547.      elvis will start up in input mode, as though the "-i" flag was given.
  1548.  
  1549.         If you use the "+cmd" parameter,  then  after  the  first  file  is
  1550.      loaded  "cmd" is treated like a colon command. A typical example would
  1551.      be "elvis +237 foo", which would cause elvis to start editing foo  and
  1552.      then move directly to line 237.
  1553.  
  1554.  
  1555.   _c_t_a_g_s - _G_e_n_e_r_a_t_e_s "_t_a_g_s" _a_n_d (_o_p_t_i_o_n_a_l_l_y) "_r_e_f_s" _f_i_l_e_s
  1556.             ctags [-r] files...
  1557.             -r      generate a "refs" file, too
  1558.  
  1559.         The  "tags"  file  is  used  by  Elvis'  ":tag"  command, control-]
  1560.      command, and -t option. Each C source  file  is  scanned  for  #define
  1561.      statements  and  global function definitions. The name of the macro or
  1562.      function becomes the name of a tag. For each tag, a line is  added  to
  1563.      the "tags" file which contains:
  1564.                    - the name of the tag
  1565.                    - a tab character
  1566.                    - the name of the file containing the tag
  1567.                    - a tab character
  1568.                    - a way to find the particular line within the file.
  1569.  
  1570.         The  "refs" file is used by the "ref" program, which can be invoked
  1571.      via Elvis' K command. When ctags finds a global  function  definition,
  1572.      it  copies the function header into the "refs" file. The first line is
  1573.      flush against the right  margin,  but  the  argument  definitions  are
  1574.      indented.  The ref program can search the "refs" file _m_u_c_h faster than
  1575.      it could search all of the C source files.
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                                     - 24 -
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.         The filenames list will typically be the  names  of  all  C  source
  1591.      files in the current directory, like this:
  1592.             $ ctags -r *.[ch]
  1593.  
  1594.  
  1595.   _r_e_f - _D_i_s_p_l_a_y _a _C _f_u_n_c_t_i_o_n _h_e_a_d_e_r
  1596.             ref function_name
  1597.  
  1598.         Ref is a program which looks up the function header of a particular
  1599.      function in any of a series of reference files. These reference  files
  1600.      are produced by the ctags program.
  1601.  
  1602.         Ref is used by vi's shift-K command.
  1603.  
  1604.         The list of files checked includes "refs" in the current directory,
  1605.      and possibly others. See the source code for an accurate list.
  1606.  
  1607.  
  1608.   _v_i_r_e_c - _R_e_c_o_v_e_r _t_h_e _m_o_d_i_f_i_e_d _v_e_r_s_i_o_n _o_f _a _f_i_l_e _a_f_t_e_r _a _c_r_a_s_h
  1609.             virec [-d tmpdir] textfilename...
  1610.             virec [-d tmpdir] </usr/tmp/viname
  1611.  
  1612.         Virec is a program which extracts the most recent version of a text
  1613.      file from a temporary file in /usr/tmp.
  1614.  
  1615.         When  you  edit  a file with Elvis, only about 5K bytes of the file
  1616.      are stored in RAM; the rest is stored in  a  file  in  /usr/tmp.  This
  1617.      allows  you  to  edit files larger than a process' data space. It also
  1618.      plays a big part in the way that "undo" and "paste" were implemented.
  1619.  
  1620.         The virec program basically extracts the "undo"  version  from  the
  1621.      file.  This  is  most useful when the system (or Elvis) crashes in the
  1622.      middle of a long edit session, because the "undo" version of the  file
  1623.      contains  everything  except your last change. Nearly all of your work
  1624.      can be salvaged.
  1625.  
  1626.         The most common way to invoke virec is this: You  just  give  virec
  1627.      the  name of the file you were editing, and it finds the matching file
  1628.      in /usr/tmp and writes the newest available version of the  file  over
  1629.      the existing version. It then deletes the /usr/tmp file.
  1630.  
  1631.         The  other  way,  where  you  redirect  its  stdin  to  come from a
  1632.      particular /usr/tmp file, is used when you have either forgotten which
  1633.      file  that  is  and  you want to see its contents, or when you want to
  1634.      recover the file without  losing  either  the  /usr/tmp  file  or  the
  1635.      current version of the text file.
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                     - 25 -
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656. _D_i_f_f_e_r_e_n_c_e_s _b_e_t_w_e_e_n _e_l_v_i_s _a_n_d _t_h_e _r_e_a_l _v_i/_e_x
  1657.  
  1658.  
  1659.   _E_x_t_e_n_s_i_o_n_s
  1660.  
  1661.    :mkexrc
  1662.    :mk
  1663.  
  1664.         This  EX  command saves the current :set and :map configurations in
  1665.      the ".exrc" file in your current directory.
  1666.  
  1667.    :args
  1668.    :ar
  1669.  
  1670.         You can use the :args command to define a new args list, as in:
  1671.             :args *.h
  1672.  
  1673.         After you have defined a new args list, the next time you  issue  a
  1674.      :next command Elvis will switch to the first file of the new list.
  1675.  
  1676.    :Next
  1677.    :previous
  1678.    :N
  1679.    :pre
  1680.  
  1681.         These commands move backwards through the args list.
  1682.  
  1683.    zz
  1684.  
  1685.         In  visual  command  mode, the (lowercase) "zz" command will center
  1686.      the current line on the screen, like "z=".
  1687.  
  1688.    .
  1689.  
  1690.         The default count value for . is the same as the  previous  command
  1691.      which . is meant to repeat. However, you can supply a new count if you
  1692.      wish. For example, after "3dw", "." will delete 3 words, but "5." will
  1693.      delete 5 words.
  1694.  
  1695.    ".
  1696.  
  1697.         The  text  which  was  most  recently input (via a "cw" command, or
  1698.      something similar) is saved in a cut buffer  called  ".  (which  is  a
  1699.      pretty hard name to write in an English sentence).
  1700.  
  1701.    K
  1702.  
  1703.         In  visual  command  mode,  you can move the cursor onto a word and
  1704.      press shift-K to have Elvis run a reference program to look that  word
  1705.      up.  This command alone is worth the price of admission! See the ctags
  1706.      and ref programs.
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.                                     - 26 -
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.    #
  1723.  
  1724.  
  1725.         In visual command mode, you can move the cursor onto a  number  and
  1726.      then  hit ## or #+ to increment that number by 1. To increment it by a
  1727.      larger amount, type in the increment value before hitting the  initial
  1728.      #.  The  number  can  also  be decremented or set by hitting #- or #=,
  1729.      respectively.
  1730.  
  1731.    input
  1732.  
  1733.         You can backspace past the beginning of the line.
  1734.  
  1735.         The arrow keys work in input mode.
  1736.  
  1737.         If you type control-A, then the text that you input  last  time  is
  1738.      inserted.  You  will  remain  in input mode, so you can backspace over
  1739.      part of it, or add more to it. (This is sort of like control-@ on  the
  1740.      real vi, except that control-A really works.)
  1741.  
  1742.         Control-P will insert the contents of the cut buffer.
  1743.  
  1744.         Real  vi can only remember up to 128 characters of input, but Elvis
  1745.      can remember any amount.
  1746.  
  1747.         The ^T and ^D keys can adjust the indent of a line no matter  where
  1748.      the cursor happens to be in that line.
  1749.  
  1750.         You  can  save your file and exit Elvis directly from input mode by
  1751.      hitting control-Z twice.
  1752.  
  1753.         Elvis supports digraphs as a way to enter non-ASCII characters.
  1754.  
  1755.    :set inputmode
  1756.    :se im
  1757.  
  1758.         If you set this flag in your .exrc file, then elvis will  start  up
  1759.      in input mode instead of visual command mode.
  1760.  
  1761.    :set charattr
  1762.    :se ca
  1763.  
  1764.         Elvis  can  display "backslash-f" style character attributes on the
  1765.      screen as  you  edit.  The  following  example  shows  the  recognized
  1766.      atributes:
  1767.             normal \fBboldface\fR \fIitalics\fR \fUunderlined\fR normal
  1768.  
  1769.         NOTE:  you  must  compile  elvis without the -DNO_CHARATTR flag for
  1770.      this to work.
  1771.  
  1772.    :set noexrefresh
  1773.    :se noer
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.                                     - 27 -
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.         Elvis gives you a little more control over how EX mode writes lines
  1789.      to the terminal. In exrefresh mode, each line is individually written;
  1790.      in noexrefresh mode, Elvis writes several lines at  once.  The  latter
  1791.      mode works better on windowing systems.
  1792.  
  1793.    :set sync
  1794.    :se sy
  1795.  
  1796.         After a crash, you can usually recover the altered form of the file
  1797.      from the temporary file that Elvis uses. With the sync  option  turned
  1798.      on,  the  odds  are  shifted a little more in your favor because Elvis
  1799.      will perform a sync() call after each change has been written  to  the
  1800.      temporary file.
  1801.  
  1802.    cursor shape
  1803.  
  1804.         Elvis changes the shape of the cursor to indicate which mode you're
  1805.      in,  if  your  terminal's  termcap  entry   includes   the   necessary
  1806.      capabilities.
  1807.  
  1808.    :set hideformat
  1809.    :se hf
  1810.  
  1811.         This  option hides format control lines. (They are displayed on the
  1812.      screen as blank lines.)
  1813.  
  1814.  
  1815.   _O_m_i_s_s_i_o_n_s
  1816.  
  1817.         The replace mode is a hack.  It  doesn't  save  the  text  that  it
  1818.      overwrites.
  1819.  
  1820.         Long  lines  are  displayed  differently -- where the real vi would
  1821.      wrap a long line  onto  several  rows  of  the  screen,  Elvis  simply
  1822.      displays  part  of  the  line,  and  allows  you  to scroll the screen
  1823.      sideways to see the rest of it.
  1824.  
  1825.         The ":preserve" and ":recover" commands are missing, as is  the  -r
  1826.      flag.  I've  never had a good reason to use ":preserve", and since use
  1827.      of ":recover" is so rare, I decided to  implement  it  as  a  separate
  1828.      program.  There's  no need to load the recovery code into memory every
  1829.      time you edit a file.
  1830.  
  1831.         LISP support is missing.
  1832.  
  1833.         The "@" and ":@" commands are missing.
  1834.  
  1835.         You can't APPEND to a cut buffer. The following DOES NOT WORK:
  1836.             "Ayy
  1837.  
  1838.         Due to naming conventions used for the temporary files,  Elvis  can
  1839.      be creating no more that one new file per directory at any given time.
  1840.      Any number of existing files  can  be  edited  at  the  same  time  on
  1841.      multitasking  computer  systems,  but only one new file can be created
  1842.      simultaneously per directory. To relieve this problem, you would  have
  1843.      to edit tmp.c and virec.c
  1844.  
  1845.                                     - 28 -
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854. _I_n_t_e_r_n_a_l
  1855.  
  1856.         You  don't  need to know the material in this section to use elvis.
  1857.      You only need it if you intend to modify elvis.
  1858.  
  1859.  
  1860.   _T_h_e _t_e_m_p_o_r_a_r_y _f_i_l_e
  1861.  
  1862.         The temporary file is divided into blocks of 1024 bytes each.
  1863.  
  1864.         When elvis starts up, the file is copied into the  temporary  file.
  1865.      Small  amounts  of extra space are inserted into the temporary file to
  1866.      insure that no text lines  cross  block  boundaries;  this  speeds  up
  1867.      processing  and  simplifies  storage  management. The "extra space" is
  1868.      filled with NUL charcters; the input file must not contain  any  NULs,
  1869.      to avoid confusion.
  1870.  
  1871.         The  first  block of the temporary file is an array of shorts which
  1872.      describe the order of the blocks; i.e. header[1] is the  block  number
  1873.      of  the  first block, and so on. This limits the temporary file to 512
  1874.      active blocks, so the largest file you can edit is  about  400K  bytes
  1875.      long. I hope that's enough!
  1876.  
  1877.         When blocks are altered, they are rewritten to a _d_i_f_f_e_r_e_n_t block in
  1878.      the file, and the in-core version  of  the  header  block  is  updated
  1879.      accordingly.  The in-core header block will be copied to the temp file
  1880.      immediately before the next change... or, to undo  this  change,  swap
  1881.      the old header (from the temp file) with the new (in-core) header.
  1882.  
  1883.         Elvis   maintains   another   in-core   array  which  contains  the
  1884.      line-number of the last line in every block. This  allows  you  to  go
  1885.      directly to a line, given its line number.
  1886.  
  1887.  
  1888.   _I_m_p_l_e_m_e_n_t_a_t_i_o_n _o_f _E_d_i_t_i_n_g
  1889.  
  1890.         There are three basic operations which affect text:
  1891.             * delete text   - delete(from, to)
  1892.             * add text      - add(at, text)
  1893.             * yank text     - cut(from, to)
  1894.  
  1895.         To  yank text, all text between two text positions is copied into a
  1896.      cut buffer. The original text is not changed. To copy the text into  a
  1897.      cut  buffer, you need only remember which physical blocks that contain
  1898.      the cut text, the offset into the first block of the start of the cut,
  1899.      the offset into the last block of the end of the cut, and what kind of
  1900.      cut it was. (Cuts may be either character cuts or line cuts; the  kind
  1901.      of  a  cut  affects the way it is later "put".) This is implemented in
  1902.      the function cut().
  1903.  
  1904.         To delete text, you must modify the  first  and  last  blocks,  and
  1905.      remove  any  reference to the intervening blocks in the header's list.
  1906.      The text to be deleted is specified by two marks. This is  implemented
  1907.      in the function delete().
  1908.  
  1909.  
  1910.  
  1911.                                     - 29 -
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.         To   add   text,  you  must  specify  the  text  to  insert  (as  a
  1921.      NUL-terminated string) and the place to insert it  (as  a  mark).  The
  1922.      block  into which the text is to be inserted may need to be split into
  1923.      as many as four blocks, with new intervening blocks needed as  well...
  1924.      or  it  could  be  as  simple  as  modifying  a  single block. This is
  1925.      implemented in the function add().
  1926.  
  1927.         Other interesting functions are paste() (to copy text  from  a  cut
  1928.      buffer  into  the file), modify() (for an efficient way to implement a
  1929.      combined delete/add sequence), and input() (to get text from the  user
  1930.      & insert it into the file).
  1931.  
  1932.         When  text  is  modified, an internal file-revision counter, called
  1933.      "changes", is incremented. This counter is used to detect when certain
  1934.      caches  are  out  of  date. (The "changes" counter is also incremented
  1935.      when we switch to a different file, and also in  one  or  two  similar
  1936.      situations -- all related to invalidating caches.)
  1937.  
  1938.  
  1939.   _M_a_r_k_s _a_n_d _t_h_e _C_u_r_s_o_r
  1940.  
  1941.         Marks  are  places within the text. They are represented internally
  1942.      as a long variable which is split into two bitfields:  a  line  number
  1943.      and  a  character  index.  Line  numbers  start  with 1, and character
  1944.      indexes start with 0.
  1945.  
  1946.         Since line numbers start with 1, it is impossible for a set mark to
  1947.      have a value of 0L. 0L is therefore used to represent unset marks.
  1948.  
  1949.         When  you  do the "delete text" change, any marks that were part of
  1950.      the deleted text are unset, and any marks  that  were  set  to  points
  1951.      after it are adjusted. Similarly, marks are adjusted after new text is
  1952.      inserted.
  1953.  
  1954.         The cursor is represented as a mark.
  1955.  
  1956.  
  1957.   _C_o_l_o_n _C_o_m_m_a_n_d _I_n_t_e_r_p_r_e_t_a_t_i_o_n
  1958.  
  1959.         Colon commands are parsed, and the command name is looked up in  an
  1960.      array  of structures which also contain a pointer to the function that
  1961.      implements the command, and a description of the  arguments  that  the
  1962.      command  can  take. If the command is recognized and its arguments are
  1963.      legal, then the function is called.
  1964.  
  1965.         Each function performs its task; this may cause the  cursor  to  be
  1966.      moved to a different line, or whatever.
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.                                     - 30 -
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.   _S_c_r_e_e_n _C_o_n_t_r_o_l
  1987.  
  1988.         The  screen  is updated via a package which looks like the "curses"
  1989.      library,  but  isn't.  It  is  actually  much  simpler.  Most   curses
  1990.      operations  are  implemented  as  macros  which copy characters into a
  1991.      large I/O buffer, which is then written with a  single  large  write()
  1992.      call as part of the refresh() operation.
  1993.  
  1994.         The  functions  which  modify  text  remember  where  text has been
  1995.      modified;  the  screen  redrawing  function,  redraw(),   needs   this
  1996.      information  to help it reduce the amount of text that is redrawn each
  1997.      time.
  1998.  
  1999.  
  2000.   _P_o_r_t_a_b_i_l_i_t_y
  2001.  
  2002.         To improve portability, Elvis  collects  as  much  system-dependent
  2003.      definitions  as  possible  in the config.h file. This file begins with
  2004.      some  preprocessor  instructions  which  attempt  to  determine  which
  2005.      compiler  and  operating system you have. After that, it conditionally
  2006.      defines some macros and constants for your system.
  2007.  
  2008.         One of the more significant macros is ttyread(buf,n). This macro is
  2009.      used  to  read  characters  from  the keyboard. For UNIX systems, this
  2010.      simply reads bytes from stdin. For MS-DOS and Atari-TOS, ttyread()  is
  2011.      a function defined in curses.c. There is also a ttywrite macro.
  2012.  
  2013.         The  tread() and twrite() macros are versions of read() and write()
  2014.      that are used for text files. On UNIX systems, these are equivelent to
  2015.      read() and write(). On MS-DOS, these are also equivelent to read() and
  2016.      write(), since DOS libraries are generally clever  enough  to  convert
  2017.      newline  characters  automatically.  For  Atari  TOS,  though, the MWC
  2018.      library is too stupid to do this, so  we  had  to  do  the  conversion
  2019.      explicitly.
  2020.  
  2021.         Other  macros  may  substitute index() for strchr(), or bcopy() for
  2022.      memcpy(), or map the (void) data type to (int), or whatever.
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.                                     - 31 -
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052. _C_F_L_A_G_S
  2053.  
  2054.         Elvis uses many preprocessor symbols to control  compilation.  Some
  2055.      of  these  control  the sizes of buffers and such, but the "-DNO_XXXX"
  2056.      options remove small sets of related features.
  2057.  
  2058.         Most Elvis users will probably want to keep all features available.
  2059.      Minix-PC users, though, will have to sacrifice one or two feature sets
  2060.      because otherwise Elvis would be too  bulky  to  compile.  The  "asld"
  2061.      phase  of  the compiler craps out. Interestingly, the full Elvis would
  2062.      probably be able to run under Minix-PC if you could cross-compile  it;
  2063.      under  SCO Xenix the ".text" segment is only about 59k bytes long, and
  2064.      I would expect the Minix-PC version to be about the same.
  2065.  
  2066.  
  2067.   -_D_M__S_Y_S_V, -_D_T_O_S, -_D_O_S_9
  2068.  
  2069.         These flags  tell  the  compiler  that  Elvis  is  being  compliled
  2070.      System-V  UNIX,  ot  Atari TOS, or OS-9/68000, respectively. For other
  2071.      systems, the config.h file can figure it out automatically.
  2072.  
  2073.  
  2074.   -_D_D_A_T_E=\'\"`_d_a_t_e`\"\'
  2075.  
  2076.         DATE should be defined to be a string constant. It  is  printed  by
  2077.      the :version command as the compilation date of the program.
  2078.  
  2079.         It  is  only  used  in  cmd1.c,  and  even  there  you may leave it
  2080.      undefined without causing an urp.
  2081.  
  2082.         The form shown  above  only  works  if  you  use  "eval".  See  the
  2083.      Makefile.
  2084.  
  2085.  
  2086.   -_D_N_B_U_F_S=_1_0
  2087.  
  2088.         Elvis  keeps  most  of  your text in a temporary file; only a small
  2089.      amount is actually stored in RAM. This flag allows you to control  how
  2090.      much  of  the file can be in RAM at any time. The default is 5k bytes;
  2091.      the example above changes that to 10k bytes.
  2092.  
  2093.         More RAM allows global changes to happen a little faster. If you're
  2094.      just making many small changes in one section of a file, though, extra
  2095.      RAM won't help much.
  2096.  
  2097.  
  2098.   -_D_B_L_K_S_I_Z_E=_2_0_4_8
  2099.  
  2100.         This controls the size of blocks that Elvis  uses  internally.  The
  2101.      value  of  BLKSIZE  must be a power of two. The default value is 1024,
  2102.      which allows you to edit files up to almost  512K  bytes  long.  Every
  2103.      time  you  double  BLKSIZE, you quadruple the size of a text file that
  2104.      Elvis can handle, but you  also  cause  the  temporary  file  to  grow
  2105.      faster.
  2106.  
  2107.  
  2108.  
  2109.                                     - 32 -
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.   -_D_T_M_P_D_I_R=\"/_t_m_p\"
  2119.  
  2120.         This  sets  the  default  value  of  the  "directory" option, which
  2121.      specifies where the temporary files should reside. The value of TMPDIR
  2122.      must  be a string, so be sure your value includes the quote characters
  2123.      on each end.
  2124.  
  2125.  
  2126.   -_D_E_X_R_C=\"._e_l_v_i_s_r_c\" -_D_H_M_E_X_R_C=\"_e_l_v_i_s._i_n_i\" -_D_S_Y_S_E_X_R_C=\"/_e_t_c/_e_l_v_i_s_r_c\"
  2127.  
  2128.         This lets you control the names of the initialization files.  Their
  2129.      values must be strings, so be careful about quoting.
  2130.  
  2131.         EXRC  is  the  name  of  the  initialization  file  in  the current
  2132.      directory. Its default value is ".exrc" on UNIX systems -- the same as
  2133.      the real vi. For other systems, check the config.h file.
  2134.  
  2135.         HMEXRC  is  the  name  of  the  initialization  file  in  your home
  2136.      directory.  By  default,  it  is  the  same  as   EXRC.   Elvis   will
  2137.      automatically prepend the name of your home directory to HMEXRC at run
  2138.      time, so don't give a full path name.
  2139.  
  2140.         SYSEXRC is the name of a system-wide initialization file. It has no
  2141.      default  value; if you don't define a value for it, then the code that
  2142.      supports SYSEXRC just isn't compiled. The value of SYSEXRC should be a
  2143.      full pathname.
  2144.  
  2145.  
  2146.   -_D_K_E_Y_W_O_R_D_P_R_G=\"/_u_s_r/_l_o_c_a_l/_r_e_f\"
  2147.  
  2148.         This  flag determines the default value of the "keywordprg" option.
  2149.      Its value must be a string, so be careful about quoting.  The  default
  2150.      value of this flag is "/usr/bin/ref" on UNIX systems.
  2151.  
  2152.  
  2153.   -_D_D_E_B_U_G
  2154.  
  2155.         This adds the ":debug" and ":validate" commands, and also adds many
  2156.      internal consistency checks. It increases  the  size  of  the  ".text"
  2157.      segment by about 5K.
  2158.  
  2159.  
  2160.   -_D_N_O__C_H_A_R_A_T_T_R
  2161.  
  2162.         Permanently  disables the charattr option. This reduces the size of
  2163.      your ".text" segment by about 850 bytes.
  2164.  
  2165.  
  2166.   -_D_N_O__R_E_C_Y_C_L_E
  2167.  
  2168.         Normally, Elvis will  recycle  space  (from  the  tmp  file)  which
  2169.      contains  totally  obsolete  text.  This flag disables this recycling.
  2170.      Without recycling, the ".text" segment is about  1K  smaller  than  it
  2171.      would  otherwise be, but the tmp file grows much faster. If you have a
  2172.      lot of free space on your harddisk, but Elvis is too bulky to run with
  2173.      recycling, then try it without recycling.
  2174.  
  2175.                                     - 33 -
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.         When  using  a  version  of  Elvis  that  has  been  compiled  with
  2185.      -DNO_RECYCLE, you should be careful to avoid making many small changes
  2186.      to  a  file  because each individual change will cause the tmp file to
  2187.      grow by at least  1k.  Hitting  "x"  thirty  times  counts  as  thirty
  2188.      changes,  but  hitting  "30x"  counts  as one change. Also, you should
  2189.      occasionally do a ":w" followed by a ":e" to start with  a  fresh  tmp
  2190.      file.
  2191.  
  2192.  
  2193.   -_D_N_O__S_E_N_T_E_N_C_E
  2194.  
  2195.         Leaves  out  the  "(" and ")" visual mode commands. Also, the "[[",
  2196.      "]]", "{", and "}" commands  will  not  recognize  *roff  macros.  The
  2197.      sections and paragraphs options go away. This saves about 650 bytes in
  2198.      the ".text" segment.
  2199.  
  2200.  
  2201.   -_D_N_O__C_H_A_R_S_E_A_R_C_H
  2202.  
  2203.         Leaves out the visual commands which locate a  given  character  in
  2204.      the  current  line:  "f", "t", "F", "T", "," and ";". This saves about
  2205.      900 bytes.
  2206.  
  2207.  
  2208.   -_D_N_O__E_X_T_E_N_S_I_O_N_S
  2209.  
  2210.         Leaves out  the  :mkexrc  command,  and  the  "K"  and  "#"  visual
  2211.      commands.  Also,  the  arrow  keys  will no longer work in input mode.
  2212.      (Other extensions are either inherent in the design of elvis,  or  are
  2213.      controlled  by  more  specific  flags,  or  are  too  tiny to be worth
  2214.      removing.) This saves about 500 bytes.
  2215.  
  2216.  
  2217.   -_D_N_O__M_A_G_I_C
  2218.  
  2219.         Permanently   disables   the   "magic"   option,   so   that   most
  2220.      meta-characters  in  a  regular  expression are *NOT* recognized. This
  2221.      saves about 3k of space in the ".text" segment,  because  the  complex
  2222.      regular expression code can be replaced by much simpler code.
  2223.  
  2224.  
  2225.   -_D_N_O__S_H_O_W_M_O_D_E
  2226.  
  2227.         Permanently disables the "showmode" option, saving about 250 bytes.
  2228.  
  2229.  
  2230.   -_D_N_O__C_U_R_S_O_R_S_H_A_P_E
  2231.  
  2232.         Normally,  Elvis  tries  to  adjust  the  shape  of the cursor as a
  2233.      reminder of which mode you're in. The -DNO_CURSORSHAPE  flag  disables
  2234.      this, saving about 150 bytes.
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                     - 34 -
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.   -_D_N_O__D_I_G_R_A_P_H
  2251.  
  2252.         To  allow entry of non-ASCII characters, Elvis supports digraphs. A
  2253.      digraph is a single  (non-ASCII)  character  which  is  entered  as  a
  2254.      combination  of  two  other  (ASCII)  characters. If you don't need to
  2255.      input non-ASCII characters, or if your keyboard supports a better  way
  2256.      of  entering  non-ASCII  characters,  then you can disable the digraph
  2257.      code and save about 450 bytes.
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.                                     - 35 -
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316. _T_e_r_m_c_a_p
  2317.  
  2318.         Elvis uses fairly standard termcap capabilities  for  most  things.
  2319.      Some  of  the  keyboard  sequences were borrowed from SCO Xenix, and I
  2320.      invented some of the character attribute names and all of  the  cursor
  2321.      shape names, but other than that there should be no surprises.
  2322.  
  2323.  
  2324.   _R_e_q_u_i_r_e_d _n_u_m_e_r_i_c _c_a_p_a_b_i_l_i_t_i_e_s
  2325.  
  2326.         :co#:   number of columns on the screen (characters per line)
  2327.         :li#:   number of lines on the screen
  2328.  
  2329.  
  2330.   _R_e_q_u_i_r_e_d _s_t_r_i_n_g _c_a_p_a_b_i_l_i_t_i_e_s
  2331.  
  2332.         :ce=:   clear to end-of-line
  2333.         :cl=:   home the cursor & clear the screen
  2334.         :cm=:   move the cursor to a given row/column
  2335.         :up=:   move the cursor up one line
  2336.  
  2337.  
  2338.   _B_o_o_l_e_a_n _c_a_p_a_b_i_l_i_t_i_e_s
  2339.  
  2340.         :am:    auto margins - wrap when a char is written to the last column?
  2341.         :pt:    physical tabs?
  2342.  
  2343.  
  2344.   _O_p_t_i_o_n_a_l _s_t_r_i_n_g _c_a_p_a_b_i_l_i_t_i_e_s
  2345.  
  2346.         :al=:   insert a blank row on the screen
  2347.         :dl=:   delete a row from the screen
  2348.         :cd=:   clear to end of display
  2349.         :ei=:   end insert mode
  2350.         :ic=:   insert a blank character
  2351.         :im=:   start insert mode
  2352.         :dc=:   delete a character
  2353.         :sr=:   scroll reverse (insert a row at the top of the screen)
  2354.         :vb=:   visible bell
  2355.         :ti=:   terminal initialization string, to start full-screen mode
  2356.         :te=:   terminal termination, to end full-screen mode
  2357.  
  2358.  
  2359.   _O_p_t_i_o_n_a_l _s_t_r_i_n_g_s _r_e_c_e_i_v_e_d _f_r_o_m _t_h_e _k_e_y_b_o_a_r_d
  2360.  
  2361.         :kd=:   sequence sent by the <down arrow> key
  2362.         :kl=:   sequence sent by the <left arrow> key
  2363.         :kr=:   sequence sent by the <right arrow> key
  2364.         :ku=:   sequence sent by the <up arrow> key
  2365.         :PU=:   sequence sent by the <PgUp> key
  2366.         :PD=:   sequence sent by the <PgDn> key
  2367.         :HM=:   sequence sent by the <Home> key
  2368.         :EN=:   sequence sent by the <End> key
  2369.  
  2370.  
  2371.  
  2372.  
  2373.                                     - 36 -
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.   _O_p_t_i_o_n_a_l _c_a_p_a_b_i_l_i_t_i_e_s _t_h_a_t _d_e_s_c_r_i_b_e _c_h_a_r_a_c_t_e_r _a_t_t_r_i_b_u_t_e_s
  2383.  
  2384.         :so=: :se=:     start/end standout mode (We don't care about :sg#:)
  2385.         :us=: :ue=:     start/end underlined mode
  2386.         :VB=: :Vb=:     start/end boldface mode
  2387.         :as=: :ae=:     start/end alternate character set (italics)
  2388.         :ug#:           visible gap left by :us=:, :ue=:, :VB=:, or :Vb=:
  2389.  
  2390.  
  2391.   _O_p_t_i_o_n_a_l _c_a_p_a_b_i_l_i_t_i_e_s _t_h_a_t _a_f_f_e_c_t _t_h_e _s_h_a_p_e _o_f _t_h_e _c_u_r_s_o_r
  2392.  
  2393.         The  :cQ=:  string  is  used by elvis immediately before exiting to
  2394.      undo the effects of the other cursor shape strings. If  :cQ=:  is  not
  2395.      given, then all other cursor shape strings are ignored.
  2396.  
  2397.         :cQ=:   normal cursor
  2398.         :cX=:   cursor shape used for reading EX command -- steady underline
  2399.         :cV=:   cursor shape used for reading VI commands -- steady block
  2400.         :cI=:   cursor shape used during VI input mode -- blinking underline
  2401.         :cR=:   cursor shape used during VI replace mode -- blinking block
  2402.  
  2403.  
  2404.   _A_n _e_x_a_m_p_l_e
  2405.  
  2406.         Here's  the  termcap entry I use on my Minix-ST system. Some of the
  2407.      capabilities in it have nothing to do with Elvis. Some can  only  work
  2408.      on my system; I have modified my kernel's screen driver.
  2409.  
  2410.             mx|minix|minixst|ansi:\
  2411.                 :co#80:li#25:bs:pt:\
  2412.                 :cm=\E[%i%d;%dH:up=\E[A:do=^J:nd=\E[C:sr=\EM:\
  2413.                 :cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
  2414.                 :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:im=:ei=:\
  2415.                 :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\
  2416.                 :VB=\E[1m:Vb=\E[m:as=\E[1;3m:ae=\E[m:\
  2417.                 :rs=\E[?5l:\
  2418.                 :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\
  2419.                 :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\
  2420.                 :k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:k0=\EOY:\
  2421.                 :kH=\E[V:kU=\E[U:\
  2422.                 :cQ=\E[k:cX=\E[2;0k:cV=\E[16;0k:cI=\E[2;20k:cR=\E[16;20k:\
  2423.                 :G3=%:GU=&:G4=':GR=(:GC=):GL=*:G2=+:GD=,:G1=-:GH=.:GV=/:
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.                                     - 37 -
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448. _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s
  2449.  
  2450.         Elvis examines several environment variables when it starts up. The
  2451.      values of these  variables  are  used  internally  for  a  variety  of
  2452.      purposes.  You  don't  need  to  define all of these; on most systems,
  2453.      Elvis only requires TERM to be defined. On MS-DOS systems,  even  that
  2454.      is optional.
  2455.  
  2456.  
  2457.   _T_E_R_M, _T_E_R_M_C_A_P
  2458.  
  2459.         TERM  tells Elvis the name of the termcap entry to use. TERMCAP may
  2460.      contain either the entire termcap entry, or the full pathname  of  the
  2461.      termcap file to search through.
  2462.  
  2463.  
  2464.   _T_M_P, _T_E_M_P
  2465.  
  2466.         These only work for MS-DOS and Atari TOS. Either of these variables
  2467.      may be used to  set  the  "directory"  option,  which  controls  where
  2468.      temporary files are stored. If you define them both, then TMP is used,
  2469.      and TEMP is ignored.
  2470.  
  2471.  
  2472.   _E_X_I_N_I_T
  2473.  
  2474.         This variable may contain  a  colon-mode  command,  which  will  be
  2475.      executed after all of the ".exrc" files but before interactive editing
  2476.      begins. NOTE: the real vi allows you to put  multiple  commands  here,
  2477.      separated  by  |  characters.  Elvis doesn't, yet, but you can place a
  2478.      "source" command there to get the same effect.
  2479.  
  2480.  
  2481.   _S_H_E_L_L, _C_O_M_S_P_E_C
  2482.  
  2483.         You can use COMSPEC in MS-DOS, or SHELL in  any  other  system,  to
  2484.      specify  which  shell  should  be  used  for  executing  commands  and
  2485.      expanding wildcards.
  2486.  
  2487.  
  2488.   _H_O_M_E
  2489.  
  2490.         This variable should give the full pathname of your home directory.
  2491.      Elvis  needs  to know the name of your home directory so it can locate
  2492.      the ".exrc" file there.
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.                                     - 38 -
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514. _V_e_r_s_i_o_n_s
  2515.  
  2516.         Elvis currently works under  BSD  UNIX,  AT&T  System-V  UNIX,  SCO
  2517.      XENIX,  Minix,  MS-DOS,  and  Atari  TOS.  This  section of the manual
  2518.      provides special information that applies to each  particular  version
  2519.      of Elvis.
  2520.  
  2521.  
  2522.   _B_S_D _U_N_I_X
  2523.  
  2524.         Use "Makefile.bsd" to make Elvis.
  2525.  
  2526.         The  only  problem  you're  like to have is that both Elvis and the
  2527.      real Vi read initialization commands from a file called  ".exrc",  but
  2528.      the  commands  in  that  file might work on one but not the other. For
  2529.      example, "set keywordprg=/usr/myself/bin/ref" will work for Elvis, but
  2530.      Vi will complain because it doesn't have a "keywordprg" option. If the
  2531.      warning messages annoy you, then you can edit  the  config.h  file  to
  2532.      change  the name of the initialization file ".exrc" to something else,
  2533.      such as ".elvisrc".
  2534.  
  2535.  
  2536.   _S_y_s_t_e_m-_V _U_N_I_X
  2537.  
  2538.         Use "Makefile.s5" to make  Elvis.  If  your  system  uses  terminfo
  2539.      instead  of  termcap,  then  you  will have to edit the Makefile. More
  2540.      detailed instructions are embedded in the Makefile itself.
  2541.  
  2542.         The potential trouble with ".exrc" described  above  for  BSD  UNIX
  2543.      applies to System-V UNIX as well.
  2544.  
  2545.         If  your  system  uses  terminfo, you may have trouble with some of
  2546.      Elvis' extensions because  terminfo  can  only  emulate  the  standard
  2547.      termcap  capabilites  and  some  of  the  extensions  use  nonstandard
  2548.      capabilites. In particular, you can expect the "charattr" option to be
  2549.      almost useless, and the cursor's shape won't change.
  2550.  
  2551.         Elvis uses control-C as the interrupt key, not Delete.
  2552.  
  2553.  
  2554.   _S_C_O _X_e_n_i_x
  2555.  
  2556.         Use  "Makefile.s5" to make Elvis. On '286 systems, you will have to
  2557.      edit the Makefile so that the compiler generates  code  with  separate
  2558.      instruction  &  data segments. More detailed instructions are embedded
  2559.      in the Makefile itself.
  2560.  
  2561.         Other than that,  the  Xenix  version  behaves  like  the  System-V
  2562.      version, so everything mentioned in the System-V section above applies
  2563.      to SCO Xenix.
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.                                     - 39 -
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.   _M_i_n_i_x
  2581.  
  2582.         Use  "Makefile.st"  on  Minix-ST  systems,  and  "Makefile.pc"   on
  2583.      Minix-PC systems. The differences between these two Makefiles are that
  2584.      the ST version uses "*.o" files where the PC version uses "*.s" files,
  2585.      and  the  PC version has some extra flags in CFLAGS to reduce the size
  2586.      of Elvis.
  2587.  
  2588.         Minix-PC users should read the CFLAGS section of this  manual  very
  2589.      carefully.
  2590.  
  2591.         The  temporary files are stored in /usr/tmp. The /usr/tmp directory
  2592.      must exist before you run Elvis, and it must be  readable/writable  by
  2593.      everybody.
  2594.  
  2595.         Elvis uses control-C as the interrupt key, not Delete.
  2596.  
  2597.  
  2598.   _M_S-_D_O_S
  2599.  
  2600.         Elvis was ported to MS-DOS by Guntram Blohm and Martin Patzel.
  2601.  
  2602.         There   are   two  different  Makefiles  for  Elvis  under  MS-DOS.
  2603.      "Elvis.prj" should be used with Turbo-C,  and  "Elvis.mak"  should  be
  2604.      used  with  MSC and Microsoft MAKE. The "Elvis.mak" file may work with
  2605.      MS Quick-C if you change the definition of CC to "CC=  qcl".  I  don't
  2606.      know for sure; I haven't tried it.
  2607.  
  2608.         Elvis  stores  its  temporary  files  in  C:\tmp.  If  this  is not
  2609.      satisfactory, then you should edit the CFLAGS line of your Makefile to
  2610.      change it to something else before compiling. The directory must exist
  2611.      before you can run Elvis.
  2612.  
  2613.         Normally, the TERM environment variable should not be set, or  else
  2614.      it  should be set to "pcbios". This way, Elvis will make calls to BIOS
  2615.      to update the screen. This is the fastest & prettiest  way  to  update
  2616.      the screen.
  2617.  
  2618.         However,  if  your  system is not quite compatible enough, then you
  2619.      can still run Elvis via the ANSI.SYS or NANSI.SYS drivers. Install one
  2620.      of  these  drivers  by  adding  "driver = ansi.sys" to your CONFIG.SYS
  2621.      file, and then define TERM to be either "ansi" or "nansi" by adding  a
  2622.      line  such as "set TERM=ansi" to your AUTOEXEC.BAT file. You must then
  2623.      reboot for these changes to take effect. After that, Elvis will notice
  2624.      the "TERM" setting and use the driver.
  2625.  
  2626.         Under  MS-DOS,  Elvis  has  an  extra ":set" option called "pcbios"
  2627.      which indicates whether the BIOS is being used  directly.  This  is  a
  2628.      "read only" option; you can't use it to switch your interface style in
  2629.      the middle of an edit session.
  2630.  
  2631.         An extra program, called  "wildcard",  is  needed  for  MS-DOS.  It
  2632.      expands wildcard characters in file names.
  2633.  
  2634.  
  2635.  
  2636.  
  2637.                                     - 40 -
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.   _A_t_a_r_i _T_O_S
  2647.  
  2648.         Elvis  was  ported to Atari TOS by Guntram Blohm and Martin Patzel.
  2649.      It is very similar to the MS-DOS version.
  2650.  
  2651.         The Makefile.tos file should be used for TOS. It is intended to  be
  2652.      used with the Mark Williams C compiler.
  2653.  
  2654.         The  TERM  environment  variable should be set to "vt52". The SHELL
  2655.      (not COMSPEC!) variable should be set to the name of  a  line-oriented
  2656.      shell.
  2657.  
  2658.         A  simple shell in included with elvis. Its source is in "shell.c",
  2659.      and the name of the executable  is  "shell.ttp".  This  was  necessary
  2660.      because  the  standard  Atari  software  doesn't  offer any way to set
  2661.      environment variables. The file "profile.sh" should contain a  set  of
  2662.      instructions to be executed when the shell first starts up. An example
  2663.      of this file is included, but you will almost certainly want  to  edit
  2664.      it right away to match your configuration.
  2665.  
  2666.         If you already have a command-line shell, then you'll probably want
  2667.      to continue using it. The shell that comes with elvis is very limited.
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                                     - 41 -
  2704.  
  2705.  
  2706.  
  2707.