home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / editor / elvis / differ.doc < prev    next >
Text File  |  1994-01-30  |  9KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. _7.  _D_I_F_F_E_R_E_N_C_E_S _B_E_T_W_E_E_N _E_l_v_i_s & _B_S_D _V_I/_E_X
  8.  
  9.      Elvis is not  100%  compatible  with  the  real  vi/ex.
  10. Elvis  has  many small extensions, some omissions, and a few
  11. features which  are  implemented  in  a  slightly  different
  12. manner.
  13.  
  14. _7._1.  _E_x_t_e_n_s_i_o_n_s
  15.  
  16. Save Configuration
  17.           The :mkexrc command saves  the  current  :set  and
  18.           :map  configurations  in  the ".exrc" file in your
  19.           current directory.
  20.  
  21. Previous File
  22.           The :N or :prev command  moves  backwards  through
  23.           the args list.
  24.  
  25. Center Current Row
  26.           In visual command mode, the (lowercase) "zz"  com-
  27.           mand  will  center the current line on the screen,
  28.           like "z=".
  29.  
  30. Changing Repeat Count
  31.           The default count value for . is the same  as  the
  32.           previous command which . is meant to repeat.  How-
  33.           ever, you can supply a new count if you wish.  For
  34.           example, after "3dw", "." will delete 3 words, but
  35.           "5." will delete 5 words.
  36.  
  37. Previous Text
  38.           The text which was most recently input (via a "cw"
  39.           command,  or  something similar) is saved in a cut
  40.           buffer called ". (which is a pretty hard  name  to
  41.           write in an English sentence).
  42.  
  43. Keyword Lookup
  44.           In visual command mode, you can  move  the  cursor
  45.           onto  a word and press shift-K to have Elvis run a
  46.           reference program to look that word up.  This com-
  47.           mand  alone  is worth the price of admission!  See
  48.           the ctags and ref programs.
  49.  
  50. Increment/Decrement
  51.           In visual command mode, you can  move  the  cursor
  52.           onto  a  number and then hit ## or #+ to increment
  53.           that number by 1.  To increment  it  by  a  larger
  54.           amount, type in the increment value before hitting
  55.           the initial #.  The number can also be decremented
  56.           or set by hitting #- or #=, respectively.
  57.  
  58. Input ModeYou can backspace past the beginning of the line.
  59.  
  60.           The arrow keys work in input mode.
  61.  
  62.  
  63.  
  64.                        June 13, 1992
  65.  
  66.  
  67.  
  68.  
  69.  
  70. 7-2        DIFFERENCES BETWEEN Elvis & BSD VI/EX         7-2
  71.  
  72.  
  73.           If you type control-A,  then  the  text  that  you
  74.           input  last  time is inserted.  You will remain in
  75.           input mode, so you can backspace over part of  it,
  76.           or  add  more  to  it.   (This  is  sort  of  like
  77.           control-@ on the real vi,  except  that  control-A
  78.           really works.)
  79.  
  80.           Control-P will insert  the  contents  of  the  cut
  81.           buffer.
  82.  
  83.           Real vi can only remember up to 128 characters  of
  84.           input, but Elvis can remember any amount.
  85.  
  86.           The ^T and ^D keys can adjust the indent of a line
  87.           no  matter  where the cursor happens to be in that
  88.           line.
  89.  
  90.           You can save your file  and  exit  Elvis  directly
  91.           from input mode by hitting control-Z twice.
  92.  
  93.           Elvis supports digraphs as a  way  to  enter  non-
  94.           ASCII characters.
  95.  
  96. Start in Input Mode
  97.           If you ":set inputmode" in your .exrc  file,  then
  98.           Elvis  will  start  up  in  input  mode instead of
  99.           visual command mode.
  100.  
  101. Visible Fonts
  102.           With   ":set   charattr",   Elvis   can    display
  103.           "backslash-f"  style  character  attributes on the
  104.           screen as you edit.  The following  example  shows
  105.           the recognized atributes:
  106.  
  107.                normal      \fBboldface\fR      \fIitalics\fR
  108.           \fUunderlined\fR normal
  109.  
  110.           NOTE:  you  must   compile   Elvis   without   the
  111.           -DNO_CHARATTR flag for this to work.
  112.  
  113. File Syncing
  114.           After a crash, you can usually recover the altered
  115.           form  of  the  file  from  the temporary file that
  116.           Elvis uses -- unless the temporary file  was  cor-
  117.           rupted.
  118.  
  119.           UNIX systems  use  a  delayed-write  cache,  which
  120.           means  that  when Elvis tries to write to the tem-
  121.           porary file, the information might still be in RAM
  122.           instead  of  on the disk.  A power failure at that
  123.           time would cause  the  in-RAM  information  to  be
  124.           lost.   UNIX's  sync()  call  will  force all such
  125.           information to disk.
  126.  
  127.  
  128.  
  129.  
  130.                        June 13, 1992
  131.  
  132.  
  133.  
  134.  
  135.  
  136. 7-3        DIFFERENCES BETWEEN Elvis & BSD VI/EX         7-3
  137.  
  138.  
  139.           MS-DOS and Atari TOS don't write a  file's  length
  140.           to  disk until that file is closed.  Consequently,
  141.           the temporary file would appear to be 0 bytes long
  142.           if  power  failed  when we were editing.  To avoid
  143.           this problem, a sync() function has  been  written
  144.           which  will  close  the  temporary  file  and then
  145.           immediately reopen it.
  146.  
  147. Cursor Shape
  148.           Elvis changes the shape of the cursor to  indicate
  149.           which  mode  you're in, if your terminal's termcap
  150.           entry includes the necessary capabilities.
  151.  
  152. Hide nroff Lines
  153.           Th ":set hideformat"  option  hides  nroff  format
  154.           control  lines.  (They are displayed on the screen
  155.           as blank lines.)
  156.  
  157. Compiler Interface
  158.           Elvis is clever enough to parse the error messages
  159.           emitted  by  many compilers.  To use this feature,
  160.           you should collect your compiler's error  messages
  161.           into a file called "errlist"; Elvis will read this
  162.           file, determine which source file caused the error
  163.           messages, start editing that file, move the cursor
  164.           to the line where  the  error  was  detected,  and
  165.           display  the  error  message  on  the status line.
  166.           Nifty!
  167.  
  168. Visible Text Selection
  169.           In visual command mode, 'v' starts visibly select-
  170.           ing  characters  and  'V' starts visibly selecting
  171.           whole lines.  The character or line where the cur-
  172.           sor  is located becomes one endpoint of the selec-
  173.           tion.  You can then use the standard cursor  move-
  174.           ment commands to move the cursor to the other end-
  175.           point, and then press one of the operator commands
  176.           (c/d/y/</>/!/=/\).  The operator will then immedi-
  177.           ately be applied to the selected text.
  178.  
  179. Pop-up Menu Operator
  180.           The '\' key is a new operator, similar  in  opera-
  181.           tion to the c/d/y/</>/! operators It conjures up a
  182.           menu, from which you can select any of  the  other
  183.           operators plus a few other common commands.
  184.  
  185. Preset Filter Operator
  186.           The '=' key is another new operator.  It is  simi-
  187.           lar  to  the  '!'  operator, except that while '!'
  188.           asks you to type in a filter  command  each  time,
  189.           '='  assumes  it  should  always  run  the command
  190.           stored in the _e_q_u_a_l_p_r_g option.
  191.  
  192. Move to a Given Percentage
  193.  
  194.  
  195.  
  196.                        June 13, 1992
  197.  
  198.  
  199.  
  200.  
  201.  
  202. 7-4        DIFFERENCES BETWEEN Elvis & BSD VI/EX         7-4
  203.  
  204.  
  205.           The '%' movement key can now  accept  an  optional
  206.           count.   Without  a count, the '%' key still moves
  207.           to a matching  parenthesis  like  it  always  did.
  208.           With  a count somewhere between 1 and 100, though,
  209.           it moves the cursor to approximately a given  per-
  210.           centage of the way through the file.  For example,
  211.           typing "50%" will move the cursor to the middle of
  212.           the file.
  213.  
  214. Regular Expressions
  215.           In regular expressions, several new forms of  clo-
  216.           sure  operators  are  supported: \{_n}, \{_n,_m}, \+,
  217.           and \?.
  218.  
  219. _7._2.  _O_m_i_s_s_i_o_n_s
  220.  
  221.      The replace mode is a hack.  It doesn't save  the  text
  222. that it overwrites.
  223.  
  224.      Long lines are displayed differently -- where the  real
  225. vi  would  wrap a long line onto several rows of the screen,
  226. Elvis simply displays part of the line, and  allows  you  to
  227. scroll the screen sideways to see the rest of it.
  228.  
  229.      The ":preserve" and ":recover"  commands  are  missing.
  230. So  is  the  -r  flag.   I've never had a good reason to use
  231. ":preserve", and  since  ":recover"  is  used  so  rarely  I
  232. decided  to  implement it as a separate program.  There's no
  233. need to load the recovery code into memory  every  time  you
  234. edit a file, I figured.
  235.  
  236.      LISP support is missing.  However, the = key  is  still
  237. an  operator  that  reformats lines of text.  By default, it
  238. reformats lines by sending them through the _f_m_t filter,  but
  239. you could write your own LISP beautifier and configure elvis
  240. to use it.  Key mappings  could  take  care  of  most  other
  241. differences.  Auto-indent is the only thing that is irrecov-
  242. erably lost.
  243.  
  244.      Autoindent mode acts a little different from  the  real
  245. vi, anyway.  It doesn't handle ^^D or 0^D correctly.  On the
  246. other hand, it _d_o_e_s allow ^D and ^T to be used  anywhere  in
  247. the line, to adjust the indentation for the whole line.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                        June 13, 1992
  263.  
  264.  
  265.