home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / STVI369G.ZIP / STEVIE.MAN < prev    next >
Text File  |  1990-10-26  |  30KB  |  1,229 lines

  1.  
  2.  
  3.  
  4.            STEVIE - An Aspiring VI Clone
  5.  
  6.            User Reference - 3.69a
  7.  
  8.             Tony Andrews
  9.  
  10.  
  11.  
  12.  
  13. 1.  _O_v_e_r_v_i_e_w
  14.  
  15. STEVIE is an editor designed to mimic the interface  of  the
  16. UNIX  editor  'vi'.  The name (ST Editor for VI Enthusiasts)
  17. comes from the fact that the editor was  first    written  for
  18. the  Atari ST. The current version also supports UNIX, Minix
  19. (ST), MS-DOS, and OS/2, but I've left the  name  intact  for
  20. now.
  21.  
  22. This program is the result of many late  nights  of  hacking
  23. over  the  last  couple  of  years.   The  first version was
  24. written by Tim Thompson and posted to USENET. From there,  I
  25. reworked  the  data  structures  completely,  added  LOTS of
  26. features, and generally improved the overall performance  in
  27. the process.
  28.  
  29. I've labelled STEVIE an 'aspiring' vi clone as a warning  to
  30. those  who  may expect too much. On the whole, the editor is
  31. pretty complete.  Nearly all of the visual mode commands are
  32. supported.   And several of the more important 'ex' commands
  33. are supported as well.    I've tried hard to capture the    feel
  34. of vi by getting the little things right.  Making lines wrap
  35. correctly, supporting true operators, and even    getting  the
  36. cursor    to  land on the right place for tabs are all a pain,
  37. but really help make the editor feel right.  I've  tried  to
  38. resist    the  temptation  to deviate from the behavior of vi,
  39. even where I disagree with the original design.
  40.  
  41. The biggest problem remaining has to do with the  fact    that
  42. the  edit  buffer is maintained entirely in memory, limiting
  43. the size of files that can be edited in  some  environments.
  44. Other  missing    features  include  named buffers and macros.
  45. Performance is generally  reasonable,  although  the  screen
  46. update code could be more efficient.  This is generally only
  47. visible on fairly slow systems.
  48.  
  49. STEVIE    may  be  freely  distributed.    The   source   isn't
  50. copyrighted  or  restricted  in  any  way.  If    you pass the
  51. program along, please include all the documentation and,  if
  52. practical, the source as well. I'm not fanatical about this,
  53. but I tried to make STEVIE fairly portable and I'd  like  to
  54. see as many people have access to the source as possible.
  55.  
  56. The remainder of this document describes  the  operation  of
  57. the  editor.   This  is  intended  as  a reference for users
  58. already familiar with the real vi editor.
  59.  
  60.  
  61.  
  62.             - 1 -
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. STEVIE                          User Reference
  71.  
  72.  
  73.  
  74. 2.  _S_t_a_r_t_i_n_g__t_h_e__E_d_i_t_o_r
  75.  
  76. The following command line forms are supported:
  77.  
  78. stevie [file ...]   Edit the specified file(s)
  79.  
  80. stevie -t tag        Start at the location of the given tag
  81.  
  82. stevie + file        Edit file starting at end
  83.  
  84. stevie +n file        Edit file starting a line number 'n'
  85.  
  86. stevie +/pat file   Edit file starting at pattern 'pat'
  87.  
  88. If multiple files are given on the command line  (using  the
  89. first  form),  the  ":n" command goes to the next file, ":N"
  90. goes backward in the list, and ":rew" can be used to  rewind
  91. back to the start of the file list.
  92.  
  93.  
  94. 3.  _S_e_t__C_o_m_m_a_n_d__O_p_t_i_o_n_s
  95.  
  96. The ":set" command works as usual to  set  parameters.    Each
  97. parameter  has    a  long  and  an abbreviated name, either of
  98. which may be used. Boolean parameters are set as in:
  99.  
  100.      set showmatch
  101.  
  102. or cleared by:
  103.  
  104.      set noshowmatch
  105.  
  106. Numeric parameters are set as in:
  107.  
  108.      set scroll=5
  109.  
  110. Several parameters may be set with a single command:
  111.  
  112.      set novb sm report=1
  113.  
  114. To see the status of all parameters use ":set  all".  Typing
  115. ":set"    with  no  arguments  will show only those parameters
  116. that have been changed.   The  supported  parameters,  their
  117. names,    abbreviations,    defaults, and descriptions are shown
  118. below:
  119.  
  120. autoindent  Short: ai, Default: noai, Type: Boolean
  121.         When in insert mode, start new lines at the same
  122.         column  as    the  prior  line. Unlike vi, you can
  123.         backspace over the indentation.
  124.  
  125.  
  126.  
  127.  
  128.             - 2 -
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. STEVIE                          User Reference
  137.  
  138.  
  139.  
  140. backup        Short: bk, Default: nobk, Type: Boolean
  141.         Leave a backup on  file  writes.   (During    file
  142.         writes,  a    backup    is  always  kept  for safety
  143.         anyway, until the write is completed.   At    that
  144.         point, the 'backup' parameter determines whether
  145.         the backup file is deleted.)
  146.  
  147. color        Short:  co,  Default:  system-dependent,   Type:
  148.         Numeric
  149.         Change  the  screen  color    (video    attributes).
  150.         There  is  a  system-dependent  mapping  between
  151.         numbers and colors.  (For instance, in MSDOS  we
  152.         use   the    BIOS-type   attributes    for  CGA  or
  153.         monochrome screens in alphanumeric mode.)
  154.  
  155. errorbells  Short: eb, Default: noeb, Type: Boolean
  156.         Ring bell when error messages are shown.
  157.  
  158. ignorecase  Short: ic, Default: noic, Type: Boolean
  159.         Ignore case in string searches.
  160.  
  161. lines        Short: lines, Default: lines=25, Type: Numeric
  162.         Number of physical    lines  on  the    screen.  The
  163.         default  value  and  possible settings depend on
  164.         the host machine.  The default value  is  25  on
  165.         most systems.
  166.  
  167. list        Short: list, Default: nolist, Type: Boolean
  168.         Show tabs and newlines graphically.
  169.  
  170. modelines   Short: ml, Default: noml, Type: Boolean
  171.         Enable processing of modelines in files.
  172.  
  173. number        Short: nu, Default: nonu, Type: Boolean
  174.         Display lines on  the  screen  with  their    line
  175.         numbers.
  176.  
  177. report        Short: report, Default: report=5, Type: Numeric
  178.         Minimum number of lines to report operations on.
  179.  
  180. return        Short: cr, Default: cr, Type: Boolean
  181.         End lines with cr-lf when writing files.
  182.  
  183. scroll        Short: scroll, Default: scroll=12, Type: Numeric
  184.         Number of lines to scroll for ^D & ^U.
  185.  
  186. showmatch   Short: sm, Default: nosm, Type: Boolean
  187.         When a ), }, or ] is typed, show the matching (,
  188.         {,    or [ if it's on the current screen by moving
  189.         the cursor there briefly.
  190.  
  191.  
  192.  
  193.  
  194.             - 3 -
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. STEVIE                          User Reference
  203.  
  204.  
  205.  
  206. showmode    Short: mo, Default: nomo, Type: Boolean
  207.         Show on status line when in insert mode.
  208.  
  209. tabstop     Short: ts, Default: ts=8, Type: Numeric
  210.         Number of spaces in a tab.
  211.  
  212. tagstack    Short: tg, Default: notg, Type: Boolean
  213.         If set, the tag command :ta is  "stacked";    that
  214.         is, the place from which it was called is pushed
  215.         onto a stack.  A new command ":untag" goes    back
  216.         to that place, and pops the tag stack.
  217.  
  218. terse        Short: terse, Default: noterse, Type: Boolean
  219.         This  option  is  currently  ignored.    It   is
  220.         provided only for compatibility with vi.
  221.  
  222. tildeop     Short: to, Default: noto, Type: Boolean
  223.         If set, tilde is an operator.  Otherwise,  tilde
  224.         acts as normal.
  225.  
  226. wrapscan    Short: ws, Default: ws, Type: Boolean
  227.         String searches wrap  around  the  ends  of  the
  228.         file.
  229.  
  230. vbell        Short: vb, Default: vb, Type: Boolean
  231.         Use  a  visual  bell,  if  possible.  (novb  for
  232.         audible bell)
  233.  
  234. The EXINIT environment variable can be used  to  modify  the
  235. default values on startup as in:
  236.  
  237.      setenv EXINIT="set sm ts=4"
  238.  
  239. In environments (e.g. OS/2 or TOS) where lines are  normally
  240. terminated  by CR-LF, the 'return' parameter allows files to
  241. be written with only a LF terminator (if  the  parameter  is
  242. cleared).  This parameter is ignored on UNIX systems.
  243.  
  244. The 'lines' parameter tells the editor how many lines  there
  245. are  on  the  screen.  This is useful on systems like the ST
  246. (or OS/2 machines with an EGA adapter) where various  screen
  247. resolutions  may  be  used.  By using the 'lines' parameter,
  248. different screen sizes can be easily handled.
  249.  
  250.  
  251. 4.  _C_o_l_o_n__C_o_m_m_a_n_d_s
  252.  
  253. Several of the normal 'vi' colon commands are  supported  by
  254. STEVIE.   Some    commands  may  be  preceded  by a line range
  255. specification.    For commands that accept a range  of  lines,
  256. the following address forms are supported:
  257.  
  258.  
  259.  
  260.             - 4 -
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. STEVIE                          User Reference
  269.  
  270.  
  271.  
  272.      addr
  273.      addr + number
  274.      addr - number
  275.  
  276. where 'addr' may be one of the following:
  277.  
  278.      a line number
  279.      a mark (as in 'a or 'b)
  280.      '.' (the current line)
  281.      '$' (the last line)
  282.  
  283. An address range of "%" is accepted as    an  abbreviation  of
  284. "1,$".
  285.  
  286. 4.1  _M_o_d_e__L_i_n_e_s
  287.  
  288. Mode lines are a little-known, but often useful, feature  of
  289. vi.   To use this feature, special strings are placed in the
  290. first or last five lines  in  a  file.     When  the  file  is
  291. edited,  these    strings are detected and processed as though
  292. typed as a colon command.  One instance where  this  can  be
  293. useful    is  to    set  the  "tabstop"  parameter on a per-file
  294. basis.    The following are examples of mode lines:
  295.  
  296.      vi:set ts=4 noai:
  297.      ex:45:
  298.  
  299. Mode lines are characterized by  the  string  "vi"  or    "ex"
  300. followed  by  a command surrounded by colons. Other text may
  301. appear on the line, and multiple mode lines may be  present.
  302. No  guarantee  is made regarding the order in which multiple
  303. mode lines will be processed.
  304.  
  305. The processing of mode lines is enabled by setting the    "ml"
  306. parameter.  This  should be done in the "EXINIT" environment
  307. variable, so that mode line processing is enabled as soon as
  308. the  editor begins.  By default, mode lines are disabled for
  309. security reasons.
  310.  
  311. 4.2  _T_h_e__G_l_o_b_a_l__C_o_m_m_a_n_d
  312.  
  313. A limited form of the global command is supported, accepting
  314. the following command form:
  315.  
  316.      g/pattern/X
  317.  
  318. where X may be either 'd' or 'p' to delete  or    print  lines
  319. that  match  the  given  pattern.  If a line range is given,
  320. only those lines are checked for a match with  the  pattern.
  321. If no range is given, all lines are checked.
  322.  
  323.  
  324.  
  325.  
  326.             - 5 -
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. STEVIE                          User Reference
  335.  
  336.  
  337.  
  338. If  the  trailing  command  character  is  omitted,  'p'  is
  339. assumed.  In this case, the trailing slash is also optional.
  340. The current version of the editor does not support the    undo
  341. operation  following  the  deletion of lines with the global
  342. command.
  343.  
  344. 4.3  _T_h_e__S_u_b_s_t_i_t_u_t_e__C_o_m_m_a_n_d
  345.  
  346. The substitute command provides  a  powerful  mechanism  for
  347. making    more complex substitutions than can be done directly
  348. from visual mode.  The general form of the command is:
  349.  
  350.      s/pattern/replacement/g
  351.  
  352. Each line in the given range (or the  current  line,  if  no
  353. range    was   given)   is  scanned  for  the  given  regular
  354. expression.  When found, the string that matched the pattern
  355. is  replaced  with  the  given    replacement  string.  If the
  356. replacement string is null, each matching pattern string  is
  357. deleted.
  358.  
  359. The trailing 'g' is optional and, if present, indicates that
  360. multiple  occurrences  of  'pattern' on a line should all be
  361. replaced.
  362.  
  363. Some special sequences are  recognized    in  the  replacement
  364. string.  The  ampersand  character is replaced by the entire
  365. pattern  that  was  matched.   For  example,  the  following
  366. command  could    be  used  to put all occurrences of 'foo' or
  367. 'bar' within double quotes:
  368.  
  369.      1,$s/foo|bar/"&"/g
  370.  
  371. The special sequence "\n" where 'n' is a digit from 1 to  9,
  372. is  replaced  by  the  string  the matched the corresponding
  373. parenthesized  expression  in  the  pattern.  The  following
  374. command  could    be  used to swap the first two parameters in
  375. calls to the C function "foo":
  376.  
  377.      1,$s/foo\(([^,]*),([^,]*),/foo(\2,\1,/g
  378.  
  379. Like the global command, substitutions can't be undone    with
  380. this version of the editor.
  381.  
  382. 4.4  _F_i_l_e__M_a_n_i_p_u_l_a_t_i_o_n__C_o_m_m_a_n_d_s
  383.  
  384. The following table shows the  supported  file    manipulation
  385. commands  as  well  as    some other 'ex' commands that aren't
  386. described elsewhere:
  387.  
  388.  
  389.  
  390.  
  391.  
  392.             - 6 -
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. STEVIE                          User Reference
  401.  
  402.  
  403.  
  404. :w        write the current file
  405. :wq        write and quit
  406. :x        write (if necessary) and quit
  407. ZZ        same as ":x"
  408.  
  409. :e file         edit the named file
  410. :e!        re-edit the current file, discarding changes
  411. :e #        edit the alternate file
  412.  
  413. :w file         write the buffer to the named file
  414. :x,yw file    write lines x through y to the named file
  415. :r file         read the named file into the buffer
  416.  
  417. :n        edit the next file
  418. :N        edit the previous file
  419. :rew        rewind the file list
  420.  
  421. :f        show the current file name
  422. :f name         change the current file name
  423. :x=        show the line number of address 'x'
  424.  
  425. :ta tag         go to the named tag
  426. ^]        like ":ta" using the current word as the tag
  427. :untag        go back to place from which ":ta" was called
  428.  
  429. :help        display a command summary
  430. :ve        show the version number
  431.  
  432. :sh        run an interactive shell
  433. :!cmd        run a command
  434.  
  435. The commands above work pretty much like they  do  in  'vi'.
  436. Most  of  the commands support a '!' suffix (if appropriate)
  437. to discard any pending changes.
  438.  
  439.  
  440. 5.  _H_e_l_p_F_a_c_i_l_i_t_y
  441.  
  442. The ":help" command can also be invoked with the <HELP>  key
  443. on  the Atari ST and the F1 key on MSDOS and OS/2 PCs.    This
  444. actually displays a pretty complete summary of the  real  vi
  445. with  unsupported features indicated appropriately.  Certain
  446. features controlled by "set"  parameters  will    have  varied
  447. displays  on  the Help screens, to correspond to the current
  448. setting of their parameters.
  449.  
  450. The  help  screens  (there  are  multiple  screens)  can  be
  451. traversed  using "reasonable" keystrokes.  For instance, any
  452. key that would take you "down" in the vi editor,  will    take
  453. you   to   the    next  help  screen  in    the  help  facility.
  454. Similarly, "up" commands  will    take  you  to  the  previous
  455.  
  456.  
  457.  
  458.             - 7 -
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. STEVIE                          User Reference
  467.  
  468.  
  469.  
  470. screen.  The  screens are numbered, and any numeric key will
  471. take you to the  corresponding    screen.   The  first  screen
  472. (screen 0) is a table of contents for the help screens.
  473.  
  474.  
  475. 6.  _S_t_r_i_n_g__S_e_a_r_c_h_e_s
  476.  
  477. String searches are supported, as in vi, accepting the usual
  478. regular  expression  syntax.  This was done using a modified
  479. form of Henry Spencer's regular expression library. I  added
  480. code  outside  the  library  to  support  the  '\<' and '\>'
  481. extensions.  The parameter "ignorecase" can be set to ignore
  482. case in all string searches.
  483.  
  484.  
  485. 7.  _O_p_e_r_a_t_o_r_s
  486.  
  487. The vi operators (d, c,  y,  !,  <,  and  >)  work  as    true
  488. operators.   The  tilde  command  may  also  be  used  as an
  489. operator  if  the  parameter  "tildeop"  has  been  set.  By
  490. default, this parameter is not set.
  491.  
  492.  
  493. 8.  _T_a_g_s
  494.  
  495. Tags are implemented and a fairly simple version of  'ctags'
  496. is  supplied  with  the editor. The current version of ctags
  497. will find functions and macros    following  a  specific    (but
  498. common) form.  See 'ctags.doc' for a complete discussion.
  499.  
  500. A non-standard but useful variant of tags is the  "stacking"
  501. of calls to the ':ta' command.    When tag-stacking is enabled
  502. (with ':set tg'), stevie remembers (and stacks) the position
  503. from  which  any  tag  call  is  made.     In this mode, a new
  504. ':untag' command returns to the remembered position and pops
  505. the  stack.   Also  while  in  the tagstack mode, the Ctrl-^
  506. keystroke  has    a  somewhat  different    effect.   Before  it
  507. switches  to  edit the alternate file (its normal function),
  508. it checks to see if the tag stack  is  empty,  and  does  an
  509. ':untag' if not empty.
  510.  
  511.  
  512. 9.  _S_y_s_t_e_m_-_S_p_e_c_i_f_i_c__C_o_m_m_e_n_t_s
  513.  
  514. The   following   sections   provide   additional   relevant
  515. information for the systems to which STEVIE has been ported.
  516. (WARNING: If you compile Stevie for, or port Stevie to, your
  517. favorite   environment,   don't  forget  to  edit  ENV.H  to
  518. correspond to the target environment.)
  519.  
  520.  
  521.  
  522.  
  523.  
  524.             - 8 -
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. STEVIE                          User Reference
  533.  
  534.  
  535.  
  536. 9.1  _A_t_a_r_i__S_T
  537.  
  538. 9.1.1  _T_O_S   The  editor  has  been  tested  in  all   three
  539. resolutions, although low and high res. are less tested than
  540. medium. The 50-line high res. mode can be  used  by  setting
  541. the  'lines' parameter to 50. Alternatively, the environment
  542. variable 'LINES' can be set. The editor doesn't actively set
  543. the  number  of  lines on the screen. It just operates using
  544. the number of lines it was told.
  545.  
  546. The arrow keys, as well as the <INSERT>, <HELP>, and  <UNDO>
  547. keys are all mapped appropriately.
  548.  
  549. 9.1.2  _M_i_n_i_x  The editor  is  pretty  much  the  same  under
  550. Minix,     but  many  of    the  keyboard  mappings  aren't  yet
  551. supported.
  552.  
  553. 9.2  _U_N_I_X
  554.  
  555. The editor has been ported to UNIX System  V  release  3  as
  556. well as 4.2 BSD.  This was done mainly to get some profiling
  557. data so I haven't  put    much  effort  into  doing  the    UNIX
  558. version  right.   While  the termcap routines are supported,
  559. the editor is still fairly picky about the  capabilities  it
  560. wants  and makes little effort to do clever things with less
  561. intelligent terminals.
  562.  
  563. 9.3  _O_S_/_2
  564.  
  565. This port was done because the editor that  comes  with  the
  566. OS/2 developer's kit really stinks. Make sure 'ansi' mode is
  567. on (using the 'ansi'  command).   The  OS/2  console  driver
  568. doesn't  support  insert/delete line, so STEVIE bypasses the
  569. driver and makes  the  appropriate  system  calls  directly.
  570. This  is  all done in the system-specific part of the editor
  571. so the kludge is at least localized.
  572.  
  573. The arrow keys, page up/down and home/end all do what  you'd
  574. expect.  The  function    keys  are  hard-coded to some useful
  575. macros until I can get true  support  for  macros  into  the
  576. editor. The current mappings are:
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.             - 9 -
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. STEVIE                          User Reference
  599.  
  600.  
  601.  
  602.      F1    Help
  603.      F2    Next file (:n)          Shift-F2    discard changes (:n!)
  604.      F3    Previous file (:N)          Shift-F3    discard changes (:N!)
  605.      F4    Alternate file (:e #)      Shift-F4    discard changes (:e! #)
  606.      F5    Rewind file list (:rew)    Shift-F5    discard changes (:rew!)
  607.      F6    Next function (]])          Shift-F6    Prev. function ([[)
  608.      F8    Global subst. (:1,$s/)
  609.      F9    Convert cdecl to English   Shift-F9    Convert English to cdecl
  610.      F10   Save & quit (:x)          Shift-F10 discard changes (:q!)
  611.  
  612. Function keys F9 and Shift-F9 assume  the  presence  of  the
  613. cdecl program.
  614.  
  615. 9.4  _M_S_D_O_S
  616.  
  617. STEVIE has been ported to MSDOS 3.3 using (1) the  Microsoft
  618. C  compiler,  version  5.1,  and  (2)  the  Borland  Turbo C
  619. compiler, version 2.0.
  620.  
  621. The keyboard mappings are the same as for  OS/2.   The    only
  622. problem  with the PC version is that the inefficiency of the
  623. screen update code  becomes  painfully    apparent  on  slower
  624. machines.   (In  Rev  3.69a,  there  are a couple of ways in
  625. which screen I/O is significantly speeded up.)
  626.  
  627. There are two  DOS  versions:  one  that  uses    an  extended
  628. console  driver,  and  another    that uses the BIOS directly.
  629. The  extended-console-driver   version     works     well    with
  630. "nansi.sys",  which  is widely available shareware.  It does
  631. not work well with the "ANSI.SYS" driver included as part of
  632. MSDOS  (at  least through the 3.30 version).  In order to be
  633. independent of the console driver, you may compile with BIOS
  634. #defined;  this  uses  the  BIOS as the exclusive screen I/O
  635. mechanism.   (Note  that  it   is   somewhat   slower    than
  636. nansi.sys.)
  637.  
  638. The  color  settings  are  the    video  attributes  for     the
  639. alphanumeric  modes  of  the  CGA  and    monochrome displays.
  640. While these make most sense in binary or hex, they  must  be
  641. entered  in  decimal.  The reference table below gives a few
  642. common values:
  643.  
  644.      07    White on black       Initial default
  645.      23    White on blue
  646.      30    Bright yellow on blue   My favorite
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.             - 10 -
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. STEVIE                          User Reference
  665.  
  666.  
  667.  
  668. 10.  _M_i_s_s_i_n_g__F_e_a_t_u_r_e_s
  669.  
  670.   1.  The ability to edit files larger    than  the  available
  671.       memory.    This  isn't a problem on the machines I use,
  672.       but it hits the Minix-PC people pretty hard.
  673.  
  674.   2.  Macros with support for function keys.
  675.  
  676.   3.  More "set" options.
  677.  
  678.   4.  Many others...
  679.  
  680.  
  681. 11.  _K_n_o_w_n__B_u_g_s__a_n_d__P_r_o_b_l_e_m_s
  682.  
  683.   1.  The yank buffer uses statically allocated  memory,  so
  684.       large  yanks  will  fail.  If  a    delete spans an area
  685.       larger than the yank  buffer,  the  program  asks  for
  686.       confirmation  before proceeding. That way, if you were
  687.       moving text, you don't get screwed by the limited yank
  688.       buffer.  You  just  have    to  move smaller chunks at a
  689.       time. All the internal buffers (yank, redo, etc.) need
  690.       to  be  reworked    to  allocate memory dynamically. The
  691.       'undo' buffer is now  dynamically  allocated,  so  any
  692.       change can be undone.
  693.  
  694.   2.  If you stay in insert mode for a long time, the insert
  695.       buffer  can overflow.  The editor will print a message
  696.       and dump you back into command mode.
  697.  
  698.   3.  The current  version  of    the  substitute  and  global
  699.       commands    (i.e.  ":s/foo/bar"  or ":g/foo/d") can't be
  700.       undone.  This is due to the current design of the undo
  701.       code.   To undo these commands would generally involve
  702.       unreasonable amounts of memory.
  703.  
  704.   4.  Several other less bothersome glitches...
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.             - 11 -
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. STEVIE                          User Reference
  731.  
  732.  
  733.  
  734. 12.  _C_o_n_c_l_u_s_i_o_n
  735.  
  736. The editor has reached a pretty stable state,  and  performs
  737. well  on  the  systems    I  use    it on, so I'm pretty much in
  738. maintenance mode now.  There's still plenty to be done;  the
  739. screen    update    code  is  still  pretty  inefficient and the
  740. yank/put code is still primitive.  I'm still  interested  in
  741. bug  reports,  and I do still add a new feature from time to
  742. time, but the rate of change is way down now.
  743.  
  744. I'd like to thank Tim  Thompson  for  writing  the  original
  745. version  of  the editor. His program was well structured and
  746. quite readable. Thanks for giving me a    good  base  to    work
  747. with.    Thanks also to many users of STEVIE who have sent in
  748. their changes.    Many of the  changes  I've  received  aren't
  749. portable  to  all  the systems I support, but I'm working to
  750. get portable  implementations  integrated  into  the  editor
  751. where possible.
  752.  
  753. If you're reading this file, but didn't get the source    code
  754. for  STEVIE,  it  can  be  had by sending a disk with return
  755. postage to the address given below. I can  write  disks  for
  756. the  Atari  ST (SS or DS) or MSDOS (360K or 1.2M). Please be
  757. sure to include the return postage. I don't intend  to    make
  758. money  from  this  program,  but  I  don't  want to lose any
  759. either.
  760.  
  761.      Tony Andrews         UUCP: onecom!wldrdg!tony
  762.      5902E Gunbarrel Ave.
  763.      Boulder, CO 80301
  764.  
  765.      3.69a Additions from
  766.      Dave Tutelman         UUCP: pegasus.att.com!dmt
  767.      Larry Shurr (The BIOS implementation)
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.             - 12 -
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. STEVIE                          User Reference
  797.  
  798.  
  799.  
  800. _C_h_a_r_a_c_t_e_r__F_u_n_c_t_i_o_n__S_u_m_m_a_r_y
  801.  
  802. The following list describes the meaning of  each  character
  803. that's    used  by  the  editor. In some cases characters have
  804. meaning in both command  and  insert  mode;  these  are  all
  805. described.
  806.  
  807.  
  808. ^@    The null character.  Not  used    in  any  mode.    This
  809.     character  may not be present in the file, as is the
  810.     case with vi.
  811.  
  812. ^B    Backward one screen.
  813.  
  814. ^D    Scroll the window down one half screen.
  815.  
  816. ^E    Scroll the screen up one line.
  817.  
  818. ^F    Forward one screen.
  819.  
  820. ^G    Same as ":f" command. Displays file information.
  821.  
  822. ^H    (Backspace) Moves cursor left one space  in  command
  823.     mode.    In  insert  mode,  erases the last character
  824.     typed.
  825.  
  826. ^J    Move the cursor down one line.
  827.  
  828. ^L    Clear and redraw the screen.
  829.  
  830. ^M    (Carriage  return)  Move  to  the  first   non-white
  831.     character  in  the  next  line.  In  insert  mode, a
  832.     carriage return opens a new line for input.
  833.  
  834. ^N    Move the cursor down a line.
  835.  
  836. ^P    Move the cursor up a line.
  837.  
  838. ^U    Scroll the window up one half screen.
  839.  
  840. ^Y    Scroll the screen down one line.
  841.  
  842. ^[    Escape cancels a pending command  in  command  mode,
  843.     and is used to terminate insert mode.
  844.  
  845. ^]    Moves to the tag whose name is given by the word  in
  846.     which the cursor resides.
  847.  
  848. ^`    Same as ":e #" if supported (system-dependent).
  849.  
  850.  
  851.  
  852.  
  853.  
  854.             - 13 -
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. STEVIE                          User Reference
  863.  
  864.  
  865.  
  866. SPACE    Move the cursor right one column.
  867.  
  868. !    The filter operator always operates on    a  range  of
  869.     lines,    passing the lines as input to a program, and
  870.     replacing them with the output of the  program.  The
  871.     shorthand  command  "!!"  can  be  used  to filter a
  872.     number of lines (specified by  a  preceding  count).
  873.     The  command  "!"  is  replaced  by the last command
  874.     used, so "!!!<RETURN>"    runs  the  given  number  of
  875.     lines through the last specified command.
  876.  
  877. $    Move to the end of the current line.
  878.  
  879. %    If the cursor rests on a paren '()', brace '{}',  or
  880.     bracket '[]', move to the matching one.
  881.  
  882. '    Used to move  the  cursor  to  a  previously  marked
  883.     position,  as  in  'a or 'b. The cursor moves to the
  884.     start of the marked line. The special mark '' refers
  885.     to the "previous context".
  886.  
  887. +    Same as carriage return, in command mode.
  888.  
  889. ,    Reverse of the last t, T, f, or F command.
  890.  
  891. -    Move  to  the  first  non-white  character  in     the
  892.     previous line.
  893.  
  894. .    Repeat the last edit command.
  895.  
  896. /    Start of a forward  string  search  command.  String
  897.     searches may be optionally terminated with a closing
  898.     slash. To search for a slash use '\/' in the  search
  899.     string.
  900.  
  901. 0    Move to the start of the  current  line.  Also    used
  902.     within counts.
  903.  
  904. 1-9    Used to add 'count' prefixes to commands.
  905.  
  906. :    Prefix character for "ex" commands.
  907.  
  908. ;    Repeat last t, T, f, or F command.
  909.  
  910. <    The 'left shift' operator.
  911.  
  912. >    The 'right shift' operator.
  913.  
  914. ?    Same as '/', but search backward.
  915.  
  916.  
  917.  
  918.  
  919.  
  920.             - 14 -
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. STEVIE                          User Reference
  929.  
  930.  
  931.  
  932. A    Append at the end of the current line.
  933.  
  934. B    Backward one blank-delimited word.
  935.  
  936. C    Change the rest of the current line.
  937.  
  938. D    Delete the rest of the current line.
  939.  
  940. E    End of the end of a blank-delimited word.
  941.  
  942. F    Find a character backward on the current line.
  943.  
  944. G    Go to  the  given  line  number  (end  of  file,  by
  945.     default).
  946.  
  947. H    Move to the first non-white char. on the top  screen
  948.     line.
  949.  
  950. I    Insert before  the  first  non-white  char.  on  the
  951.     current line.
  952.  
  953. J    Join two lines.
  954.  
  955. L    Move to the first  non-white  char.  on  the  bottom
  956.     screen line.
  957.  
  958. M    Move to the first  non-white  char.  on  the  middle
  959.     screen line.
  960.  
  961. N    Reverse the last string search.
  962.  
  963. O    Open a new line above the current  line,  and  start
  964.     inserting.
  965.  
  966. P    Put the yank/delete buffer before the current cursor
  967.     position.
  968.  
  969. R    Replace characters until an  "escape"  character  is
  970.     received.   Similar  to  insert  mode,    but replaces
  971.     instead of inserting.  Typing a newline  in  replace
  972.     mode  is  the  same as in insert mode, but replacing
  973.     continues on the new line.
  974.  
  975. T    Reverse search 'upto' the given character.
  976.  
  977. U    Restore the current line to  its  state  before  you
  978.     started changing it.
  979.  
  980. W    Move forward one blank-delimited word.
  981.  
  982.  
  983.  
  984.  
  985.  
  986.             - 15 -
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. STEVIE                          User Reference
  995.  
  996.  
  997.  
  998. X    Delete one character before the cursor.
  999.  
  1000. Y    Yank the current line. Same as 'yy'.
  1001.  
  1002. ZZ    Exit from the editor, saving changes if necessary.
  1003.  
  1004. [[    Move backward one C function.
  1005.  
  1006. ]]    Move forward one C function.
  1007.  
  1008. ^    Move to the first non-white on the current line.
  1009.  
  1010. `    Move to the given mark, as with '.  The  distinction
  1011.     between the two commands is important when used with
  1012.     operators. I support the  difference  correctly.  If
  1013.     you  don't know what I'm talking about, don't worry,
  1014.     it won't matter to you.
  1015.  
  1016. a    Append text after the cursor.
  1017.  
  1018. b    Back one word.
  1019.  
  1020. c    The change operator.
  1021.  
  1022. d    The delete operator.
  1023.  
  1024. e    Move to the end of a word.
  1025.  
  1026. f    Find a character on the current line.
  1027.  
  1028. h    Move left one column.
  1029.  
  1030. i    Insert text before the cursor.
  1031.  
  1032. j    Move down one line.
  1033.  
  1034. k    Move up one line.
  1035.  
  1036. l    Move right one column.
  1037.  
  1038. m    Set a mark at the current position (e.g. ma or mb).
  1039.  
  1040. n    Repeat the last string search.
  1041.  
  1042. o    Open a new line and start inserting text.
  1043.  
  1044. p    Put the yank/delete buffer after the cursor.
  1045.  
  1046. r    Replace a character.
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.             - 16 -
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. STEVIE                          User Reference
  1061.  
  1062.  
  1063.  
  1064. s    Replace characters.
  1065.  
  1066. t    Move forward  'upto'  the  given  character  on  the
  1067.     current line.
  1068.  
  1069. u    Undo the last edit.
  1070.  
  1071. w    Move forward one word.
  1072.  
  1073. x    Delete the character under the cursor.
  1074.  
  1075. y    The yank operator.
  1076.  
  1077. z    Redraw the screen with the current line at  the  top
  1078.     (zRETURN), the middle (z.), or the bottom (z-).
  1079.  
  1080. |    Move to the column given by the preceding count.
  1081.  
  1082. ~    Invert the case of the current character (if  alpha)
  1083.     and  move  to the right.  If the parameter "tildeop"
  1084.     is set, this command functions as an operator.
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.             - 17 -
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.             STEVIE - User Guide
  1131.  
  1132.               CONTENTS
  1133.  
  1134.  
  1135.  1.  Overview                1
  1136.  
  1137.  2.  Starting the Editor        2
  1138.  
  1139.  3.  Set Command Options        2
  1140.  
  1141.  4.  Colon Commands            4
  1142.      4.1  Mode Lines            5
  1143.      4.2  The Global Command        5
  1144.      4.3  The Substitute Command    6
  1145.      4.4  File Manipulation Commands    6
  1146.  
  1147.  5.  Help                7
  1148.  
  1149.  6.  String Searches            8
  1150.  
  1151.  7.  Operators                8
  1152.  
  1153.  8.  Tags                8
  1154.  
  1155.  9.  System-Specific Comments        8
  1156.      9.1  Atari ST            9
  1157.      9.2  UNIX                9
  1158.      9.3  OS/2                9
  1159.      9.4  MSDOS                10
  1160.  
  1161. 10.  Missing Features            11
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.                - i -
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. 11.  Known Bugs and Problems        11
  1180.  
  1181. 12.  Conclusion                12
  1182.  
  1183. Character Function Summary        13
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.                - ii -
  1229.