home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 313_01 / stevie.doc < prev    next >
Text File  |  1990-04-22  |  33KB  |  1,123 lines

  1.  
  2.  
  3.  
  4.                       STEVIE - An Aspiring VI Clone
  5.  
  6.                           User Reference - 3.71
  7.  
  8.                                Tony Andrews
  9.  
  10.  
  11.  
  12.        1.  _O_v_e_r_v_i_e_w
  13.  
  14.        STEVIE is an editor designed to mimic the interface  of  the
  15.        UNIX  editor  'vi'.  The name (ST Editor for VI Enthusiasts)
  16.        comes from the fact that the editor was  first  written  for
  17.        the  Atari ST. The current version also supports UNIX, Minix
  18.        (ST), MS-DOS, and OS/2, but I've left the  name  intact  for
  19.        now.
  20.  
  21.        This program is the result of many late  nights  of  hacking
  22.        over  the last couple of years.  The first version was writ-
  23.        ten by Tim Thompson and posted  to  USENET.  From  there,  I
  24.        reworked  the  data  structures  completely,  added  LOTS of
  25.        features, and generally improved the overall performance  in
  26.        the process.
  27.  
  28.        I've labelled STEVIE an 'aspiring' vi clone as a warning  to
  29.        those  who  may expect too much. On the whole, the editor is
  30.        pretty complete.  Nearly all of the visual mode commands are
  31.        supported.   And several of the more important 'ex' commands
  32.        are supported as well.  I've tried hard to capture the  feel
  33.        of vi by getting the little things right.  Making lines wrap
  34.        correctly, supporting true operators, and even  getting  the
  35.        cursor  to  land on the right place for tabs are all a pain,
  36.        but really help make the editor feel right.  I've  tried  to
  37.        resist  the  temptation  to deviate from the behavior of vi,
  38.        even where I disagree with the original design.
  39.  
  40.        The biggest problem remaining has to do with the  fact  that
  41.        the  edit  buffer is maintained entirely in memory, limiting
  42.        the size of files that can be edited in  some  environments.
  43.        Other  missing  features  include  named buffers and macros.
  44.        Performance is generally  reasonable,  although  the  screen
  45.        update code could be more efficient.  This is generally only
  46.        visible on fairly slow systems.
  47.  
  48.        STEVIE may be freely distributed.  The  source  isn't  copy-
  49.        righted  or  restricted  in any way. If you pass the program
  50.        along, please include all the documentation and, if  practi-
  51.        cal, the source as well. I'm not fanatical about this, but I
  52.        tried to make STEVIE fairly portable and I'd like to see  as
  53.        many people have access to the source as possible.
  54.  
  55.        The remainder of this document describes  the  operation  of
  56.        the  editor.   This  is  intended  as  a reference for users
  57.        already familiar with the real vi editor.
  58.  
  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.
  142.  
  143.        errorbells  Short: eb, Default: noeb, Type: Boolean
  144.                    Ring bell when error messages are shown.
  145.  
  146.        ignorecase  Short: ic, Default: noic, Type: Boolean
  147.                    Ignore case in string searches.
  148.  
  149.        lines       Short: lines, Default: lines=25, Type: Numeric
  150.                    Number of physical  lines  on  the  screen.  The
  151.                    default  value  actually  depends  on  the  host
  152.                    machine, but is generally 25.
  153.  
  154.        list        Short: list, Default: nolist, Type: Boolean
  155.                    Show tabs and newlines graphically.
  156.  
  157.        modelines   Short: ml, Default: noml, Type: Boolean
  158.                    Enable processing of modelines in files.
  159.  
  160.        number      Short: nu, Default: nonu, Type: Boolean
  161.                    Display lines on  the  screen  with  their  line
  162.                    numbers.
  163.  
  164.        report      Short: report, Default: report=5, Type: Numeric
  165.                    Minimum number of lines to report operations on.
  166.  
  167.        return      Short: cr, Default: cr, Type: Boolean
  168.                    End lines with cr-lf when writing files.
  169.  
  170.        scroll      Short: scroll, Default: scroll=12, Type: Numeric
  171.                    Number of lines to scroll for ^D & ^U.
  172.  
  173.        showmatch   Short: sm, Default: nosm, Type: Boolean
  174.                    When a ), }, or ] is typed, show the matching (,
  175.                    {,  or [ if it's on the current screen by moving
  176.                    the cursor there briefly.
  177.  
  178.        showmode    Short: mo, Default: nomo, Type: Boolean
  179.                    Show on status line when in insert mode.
  180.  
  181.        tabstop     Short: ts, Default: ts=8, Type: Numeric
  182.                    Number of spaces in a tab.
  183.  
  184.        terse       Short: terse, Default: noterse, Type: Boolean
  185.                    This option is currently ignored.   It  is  pro-
  186.                    vided only for compatibility with vi.
  187.  
  188.        tildeop     Short: to, Default: noto, Type: Boolean
  189.                    If set, tilde is an operator.  Otherwise,  tilde
  190.                    acts as normal.
  191.  
  192.  
  193.  
  194.                                   - 3 -
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.        STEVIE                                        User Reference
  203.  
  204.  
  205.  
  206.        wrapscan    Short: ws, Default: ws, Type: Boolean
  207.                    String searches wrap  around  the  ends  of  the
  208.                    file.
  209.  
  210.        vbell       Short: vb, Default: vb, Type: Boolean
  211.                    Use a visual bell, if possible. (novb for  audi-
  212.                    ble bell)
  213.  
  214.        The EXINIT environment variable can be used  to  modify  the
  215.        default values on startup as in:
  216.  
  217.             setenv EXINIT="set sm ts=4"
  218.  
  219.        The 'backup' parameter, if set, causes the editor to  retain
  220.        a  backup of any files that are written. During file writes,
  221.        a backup is always kept for safety until the write  is  com-
  222.        pleted.  At  that  point,  the 'backup' parameter determines
  223.        whether the backup file is deleted.
  224.  
  225.        In environments (e.g. OS/2 or TOS) where lines are  normally
  226.        terminated  by CR-LF, the 'return' parameter allows files to
  227.        be written with only a LF terminator (if  the  parameter  is
  228.        cleared).  This parameter is ignored on UNIX systems.
  229.  
  230.        The 'lines' parameter tells the editor how many lines  there
  231.        are  on  the  screen.  This is useful on systems like the ST
  232.        (or OS/2 machines with an EGA adapter) where various  screen
  233.        resolutions  may  be  used.  By using the 'lines' parameter,
  234.        different screen sizes can be easily handled.
  235.  
  236.  
  237.        4.  _C_o_l_o_n__C_o_m_m_a_n_d_s
  238.  
  239.        Several of the normal 'vi' colon commands are  supported  by
  240.        STEVIE.   Some  commands  may  be  preceded  by a line range
  241.        specification.  For commands that accept a range  of  lines,
  242.        the following address forms are supported:
  243.  
  244.             addr
  245.             addr + number
  246.             addr - number
  247.  
  248.        where 'addr' may be one of the following:
  249.  
  250.             a line number
  251.             a mark (as in 'a or 'b)
  252.             '.' (the current line)
  253.             '$' (the last line)
  254.  
  255.        An address range of "%" is accepted as  an  abbreviation  of
  256.        "1,$".
  257.  
  258.  
  259.  
  260.                                   - 4 -
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.        STEVIE                                        User Reference
  269.  
  270.  
  271.  
  272.        4.1  _M_o_d_e__L_i_n_e_s
  273.  
  274.        Mode lines are a little-known, but often useful, feature  of
  275.        vi.   To use this feature, special strings are placed in the
  276.        first or last five lines  in  a  file.   When  the  file  is
  277.        edited,  these  strings are detected and processed as though
  278.        typed as a colon command.  One instance where  this  can  be
  279.        useful  is  to  set  the  "tabstop"  parameter on a per-file
  280.        basis.  The following are examples of mode lines:
  281.  
  282.             vi:set ts=4 noai:
  283.             ex:45:
  284.  
  285.        Mode lines are characterized by the string "vi" or "ex" fol-
  286.        lowed  by  a  command  surrounded  by colons. Other text may
  287.        appear on the line, and multiple mode lines may be  present.
  288.        No  guarantee  is made regarding the order in which multiple
  289.        mode lines will be processed.
  290.  
  291.        The processing of mode lines is enabled by setting the  "ml"
  292.        parameter.  This  should be done in the "EXINIT" environment
  293.        variable, so that mode line processing is enabled as soon as
  294.        the  editor begins.  By default, mode lines are disabled for
  295.        security reasons.
  296.  
  297.        4.2  _T_h_e__G_l_o_b_a_l__C_o_m_m_a_n_d
  298.  
  299.        A limited form of the global command is supported, accepting
  300.        the following command form:
  301.  
  302.             g/pattern/X
  303.  
  304.        where X may be either 'd' or 'p' to delete  or  print  lines
  305.        that  match  the  given  pattern.  If a line range is given,
  306.        only those lines are checked for a match with  the  pattern.
  307.        If no range is given, all lines are checked.
  308.  
  309.        If  the  trailing  command  character  is  omitted,  'p'  is
  310.        assumed.  In this case, the trailing slash is also optional.
  311.        The current version of the editor does not support the  undo
  312.        operation  following  the  deletion of lines with the global
  313.        command.
  314.  
  315.        4.3  _T_h_e__S_u_b_s_t_i_t_u_t_e__C_o_m_m_a_n_d
  316.  
  317.        The substitute command provides  a  powerful  mechanism  for
  318.        making  more complex substitutions than can be done directly
  319.        from visual mode.  The general form of the command is:
  320.  
  321.             s/pattern/replacement/g
  322.  
  323.  
  324.  
  325.  
  326.                                   - 5 -
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.        STEVIE                                        User Reference
  335.  
  336.  
  337.  
  338.        Each line in the given range (or the  current  line,  if  no
  339.        range  was  given)  is scanned for the given regular expres-
  340.        sion.  When found, the string that matched  the  pattern  is
  341.        replaced with the given replacement string.  If the replace-
  342.        ment  string  is  null,  each  matching  pattern  string  is
  343.        deleted.
  344.  
  345.        The trailing 'g' is optional and, if present, indicates that
  346.        multiple  occurrences  of  'pattern' on a line should all be
  347.        replaced.
  348.  
  349.        Some special sequences are  recognized  in  the  replacement
  350.        string.  The  ampersand  character is replaced by the entire
  351.        pattern that was matched.  For example, the  following  com-
  352.        mand  could be used to put all occurrences of 'foo' or 'bar'
  353.        within double quotes:
  354.  
  355.             1,$s/foo|bar/"&"/g
  356.  
  357.        The special sequence "\n" where 'n' is a digit from 1 to  9,
  358.        is  replaced  by  the  string  the matched the corresponding
  359.        parenthesized expression in the pattern. The following  com-
  360.        mand could be used to swap the first two parameters in calls
  361.        to the C function "foo":
  362.  
  363.             1,$s/foo\(([^,]*),([^,]*),/foo(\2,\1,/g
  364.  
  365.        Like the global command, substitutions can't be undone  with
  366.        this version of the editor.
  367.  
  368.        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
  369.  
  370.        The following table shows the  supported  file  manipulation
  371.        commands  as  well  as  some other 'ex' commands that aren't
  372.        described elsewhere:
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  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.  
  428.        :help           display a command summary
  429.        :ve             show the version number
  430.  
  431.        :sh             run an interactive shell
  432.        :!cmd           run a command
  433.  
  434.        The ":help" command can also be invoked with the <HELP>  key
  435.        on  the  Atari  ST. This actually displays a pretty complete
  436.        summary of the real vi with unsupported  features  indicated
  437.        appropriately.
  438.  
  439.        The commands above work pretty much like they  do  in  'vi'.
  440.        Most  of  the commands support a '!' suffix (if appropriate)
  441.        to discard any pending changes.
  442.  
  443.  
  444.        5.  _S_t_r_i_n_g__S_e_a_r_c_h_e_s
  445.  
  446.        String searches are supported, as in vi, accepting the usual
  447.        regular  expression  syntax.  This was done using a modified
  448.        form of Henry Spencer's regular expression library. I  added
  449.        code outside the library to support the '\<' and '\>' exten-
  450.        sions.  The parameter "ignorecase" can be set to ignore case
  451.        in all string searches.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                   - 7 -
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.        STEVIE                                        User Reference
  467.  
  468.  
  469.  
  470.        6.  _O_p_e_r_a_t_o_r_s
  471.  
  472.        The vi operators (d, c, y, !, <, and >) work as true  opera-
  473.        tors.   The tilde command may also be used as an operator if
  474.        the parameter "tildeop"  has  been  set.  By  default,  this
  475.        parameter is not set.
  476.  
  477.  
  478.        7.  _T_a_g_s
  479.  
  480.        Tags are implemented and a fairly simple version of  'ctags'
  481.        is  supplied  with  the editor. The current version of ctags
  482.        will find functions and macros  following  a  specific  (but
  483.        common) form.  See 'ctags.doc' for a complete discussion.
  484.  
  485.  
  486.        8.  _S_y_s_t_e_m_-_S_p_e_c_i_f_i_c__C_o_m_m_e_n_t_s
  487.  
  488.        The following sections provide additional relevant  informa-
  489.        tion for the systems to which STEVIE has been ported.
  490.  
  491.        8.1  _A_t_a_r_i__S_T
  492.  
  493.        8.1.1  _T_O_S  The editor has been tested in all three  resolu-
  494.        tions,  although  low  and  high  res.  are less tested than
  495.        medium. The 50-line high res. mode can be  used  by  setting
  496.        the  'lines' parameter to 50. Alternatively, the environment
  497.        variable 'LINES' can be set. The editor doesn't actively set
  498.        the  number  of  lines on the screen. It just operates using
  499.        the number of lines it was told.
  500.  
  501.        The arrow keys, as well as the <INSERT>, <HELP>, and  <UNDO>
  502.        keys are all mapped appropriately.
  503.  
  504.        8.1.2  _M_i_n_i_x  The editor  is  pretty  much  the  same  under
  505.        Minix,  but  many  of  the keyboard mappings aren't yet sup-
  506.        ported.
  507.  
  508.        8.2  _U_N_I_X
  509.  
  510.        The editor has been ported to UNIX System  V  release  3  as
  511.        well as 4.2 BSD.  This was done mainly to get some profiling
  512.        data so I haven't put much effort into doing the  UNIX  ver-
  513.        sion  right.   While the termcap routines are supported, the
  514.        editor is still fairly picky about the capabilities it wants
  515.        and makes little effort to do clever things with less intel-
  516.        ligent terminals.
  517.  
  518.        Job control is supported on BSD systems.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                   - 8 -
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.        STEVIE                                        User Reference
  533.  
  534.  
  535.  
  536.        8.3  _O_S_/_2
  537.  
  538.        Make sure 'ansi' mode is on (using the 'ansi' command).  The
  539.        OS/2  console  driver doesn't  support  insert/delete  line,
  540.        so STEVIE bypasses the  driver  and  makes  the  appropriate  
  541.        system  calls  directly.  This  is  all done in the  system-
  542.        specific part of the  editor  so  the  kludge  is  at  least
  543.        localized.
  544.  
  545.        The arrow keys, page up/down and home/end all do what  you'd
  546.        expect. The function keys are hard-coded to some useful mac-
  547.        ros until I can get true support for macros into the editor.
  548.        The current mappings are:
  549.  
  550.             F1      :N <RETURN>
  551.             F2      :n <RETURN>
  552.             F3      :e # <RETURN>
  553.             F4      :rew <RETURN>
  554.             F5      [[
  555.             F6      ]]
  556.             F7      Convert C declaration to pseudo-english (uses cdecl)
  557.             F8      Convert english-style declaration to C (uses cdecl)
  558.             F9      :x <RETURN>
  559.             F10     :help <RETURN>
  560.  
  561.             S-F1    :N! <RETURN>
  562.             S-F2    :n! <RETURN>
  563.  
  564.        The macros for F7 and F8 assume that the "cdecl" program  is
  565.        available.
  566.  
  567.        8.4  _M_S_D_O_S
  568.  
  569.        STEVIE has been ported to MSDOS 3.3 using  the  Microsoft  C
  570.        compiler,  version  5.1.  The keyboard mappings are the same
  571.        as for OS/2.  The only problem with the PC version  is  that
  572.        the inefficiency of the screen update code becomes painfully
  573.        apparent on slower machines.
  574.  
  575.        The DOS version requires the  use  of  an  extended  console
  576.        driver  that  can  insert and delete lines.  The distributed
  577.        code uses "nansi.sys" which seems to be widely available.
  578.  
  579.  
  580.        9.  _M_i_s_s_i_n_g__F_e_a_t_u_r_e_s
  581.  
  582.          1.  The ability to edit files larger  than  the  available
  583.              memory.   This  isn't a problem on the machines I use,
  584.              but it hits the Minix-PC people pretty hard.
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                   - 9 -
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.        STEVIE                                        User Reference
  599.  
  600.  
  601.  
  602.          2.  Macros with support for function keys.
  603.  
  604.          3.  More "set" options.
  605.  
  606.          4.  Many others...
  607.  
  608.  
  609.        10.  _K_n_o_w_n__B_u_g_s__a_n_d__P_r_o_b_l_e_m_s
  610.  
  611.          1.  The yank buffer uses statically allocated  memory,  so
  612.              large  yanks  will  fail.  If  a  delete spans an area
  613.              larger than the yank buffer, the program asks for con-
  614.              firmation  before  proceeding.  That  way, if you were
  615.              moving text, you don't get screwed by the limited yank
  616.              buffer.  You  just  have  to  move smaller chunks at a
  617.              time. All the  internal  buffers  (yank,  redo,  etc.)
  618.              need  to  be  reworked to allocate memory dynamically.
  619.              The 'undo' buffer is now dynamically allocated, so any
  620.              change can be undone.
  621.  
  622.          2.  If you stay in insert mode for a long time, the insert
  623.              buffer  can overflow.  The editor will print a message
  624.              and dump you back into command mode.
  625.  
  626.          3.  The current version of the substitute and global  com-
  627.              mands  (i.e.  ":s/foo/bar"  or  ":g/foo/d")  can't  be
  628.              undone.  This is due to the current design of the undo
  629.              code.   To undo these commands would generally involve
  630.              unreasonable amounts of memory.
  631.  
  632.          4.  Several other less bothersome glitches...
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  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.        11.  _C_o_n_c_l_u_s_i_o_n
  669.  
  670.        The editor has reached a pretty stable state,  and  performs
  671.        well  on  the  systems  I  use  it on, so I'm pretty much in
  672.        maintenance mode now.  There's still plenty to be done;  the
  673.        screen  update  code  is  still  pretty  inefficient and the
  674.        yank/put code is still primitive.  I'm still  interested  in
  675.        bug  reports,  and I do still add a new feature from time to
  676.        time, but the rate of change is way down now.
  677.  
  678.        I'd like to thank Tim Thompson for writing the original ver-
  679.        sion  of  the  editor.  His  program was well structured and
  680.        quite readable. Thanks for giving me a  good  base  to  work
  681.        with.   Thanks also to many users of STEVIE who have sent in
  682.        their changes.  Many of the  changes  I've  received  aren't
  683.        portable  to  all  the systems I support, but I'm working to
  684.        get portable  implementations  integrated  into  the  editor
  685.        where possible.
  686.  
  687.        If you're reading this file, but didn't get the source  code
  688.        for STEVIE, it can be had by sending a disk with return pos-
  689.        tage to the address given below. I can write disks  for  the
  690.        Atari  ST (SS or DS) or MSDOS (360K or 1.2M). Please be sure
  691.        to include the return postage. I don't intend to make  money
  692.        from this program, but I don't want to lose any either.
  693.  
  694.             Tony Andrews       UUCP: uunet!dunike!onecom!raid5!tony
  695.             5902E Gunbarrel Ave.
  696.             Boulder, CO 80301
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  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.        _C_h_a_r_a_c_t_e_r__F_u_n_c_t_i_o_n__S_u_m_m_a_r_y
  735.  
  736.        The following list describes the meaning of  each  character
  737.        that's  used  by  the  editor. In some cases characters have
  738.        meaning in both command  and  insert  mode;  these  are  all
  739.        described.
  740.  
  741.  
  742.        ^@      The null character. Not used in any mode. This char-
  743.                acter may not be present in the file, as is the case
  744.                with vi.
  745.  
  746.        ^B      Backward one screen.
  747.  
  748.        ^D      Scroll the window down one half screen.
  749.  
  750.        ^E      Scroll the screen up one line.
  751.  
  752.        ^F      Forward one screen.
  753.  
  754.        ^G      Same as ":f" command. Displays file information.
  755.  
  756.        ^H      (Backspace) Moves cursor left one space  in  command
  757.                mode.   In  insert  mode,  erases the last character
  758.                typed.
  759.  
  760.        ^J      Move the cursor down one line.
  761.  
  762.        ^L      Clear and redraw the screen.
  763.  
  764.        ^M      (Carriage return) Move to the first non-white  char-
  765.                acter  in  the next line. In insert mode, a carriage
  766.                return opens a new line for input.
  767.  
  768.        ^N      Move the cursor down a line.
  769.  
  770.        ^P      Move the cursor up a line.
  771.  
  772.        ^U      Scroll the window up one half screen.
  773.  
  774.        ^Y      Scroll the screen down one line.
  775.  
  776.        ^[      Escape cancels a pending command  in  command  mode,
  777.                and is used to terminate insert mode.
  778.  
  779.        ^]      Moves to the tag whose name is given by the word  in
  780.                which the cursor resides.
  781.  
  782.        ^`      Same as ":e #" if supported (system-dependent).
  783.  
  784.  
  785.  
  786.  
  787.  
  788.                                   - 12 -
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.        STEVIE                                        User Reference
  797.  
  798.  
  799.  
  800.        SPACE   Move the cursor right on column.
  801.  
  802.        !       The filter operator always operates on  a  range  of
  803.                lines,  passing the lines as input to a program, and
  804.                replacing them with the output of the  program.  The
  805.                shorthand  command  "!!"  can  be  used  to filter a
  806.                number of lines (specified by  a  preceding  count).
  807.                The  command  "!"  is  replaced  by the last command
  808.                used, so "!!!<RETURN>"  runs  the  given  number  of
  809.                lines through the last specified command.
  810.  
  811.        $       Move to the end of the current line.
  812.  
  813.        %       If the cursor rests on a paren '()', brace '{}',  or
  814.                bracket '[]', move to the matching one.
  815.  
  816.        '       Used to move the cursor to a previously marked posi-
  817.                tion,  as in 'a or 'b. The cursor moves to the start
  818.                of the marked line. The special mark  ''  refers  to
  819.                the "previous context".
  820.  
  821.        +       Same as carriage return, in command mode.
  822.  
  823.        ,       Reverse of the last t, T, f, or F command.
  824.  
  825.        -       Move to the first non-white character in the  previ-
  826.                ous line.
  827.  
  828.        .       Repeat the last edit command.
  829.  
  830.        /       Start of a forward  string  search  command.  String
  831.                searches may be optionally terminated with a closing
  832.                slash. To search for a slash use '\/' in the  search
  833.                string.
  834.  
  835.        0       Move to the start of the  current  line.  Also  used
  836.                within counts.
  837.  
  838.        1-9     Used to add 'count' prefixes to commands.
  839.  
  840.        :       Prefix character for "ex" commands.
  841.  
  842.        ;       Repeat last t, T, f, or F command.
  843.  
  844.        <       The 'left shift' operator.
  845.  
  846.        >       The 'right shift' operator.
  847.  
  848.        ?       Same as '/', but search backward.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.                                   - 13 -
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.        STEVIE                                        User Reference
  863.  
  864.  
  865.  
  866.        A       Append at the end of the current line.
  867.  
  868.        B       Backward one blank-delimited word.
  869.  
  870.        C       Change the rest of the current line.
  871.  
  872.        D       Delete the rest of the current line.
  873.  
  874.        E       End of the end of a blank-delimited word.
  875.  
  876.        F       Find a character backward on the current line.
  877.  
  878.        G       Go to  the  given  line  number  (end  of  file,  by
  879.                default).
  880.  
  881.        H       Move to the first non-white char. on the top  screen
  882.                line.
  883.  
  884.        I       Insert before  the  first  non-white  char.  on  the
  885.                current line.
  886.  
  887.        J       Join two lines.
  888.  
  889.        L       Move to the first  non-white  char.  on  the  bottom
  890.                screen line.
  891.  
  892.        M       Move to the first  non-white  char.  on  the  middle
  893.                screen line.
  894.  
  895.        N       Reverse the last string search.
  896.  
  897.        O       Open a new line above the current  line,  and  start
  898.                inserting.
  899.  
  900.        P       Put the yank/delete buffer before the current cursor
  901.                position.
  902.  
  903.        R       Replace characters until an  "escape"  character  is
  904.                received.   Similar  to  insert  mode,  but replaces
  905.                instead of inserting.  Typing a newline  in  replace
  906.                mode  is  the  same as in insert mode, but replacing
  907.                continues on the new line.
  908.  
  909.        T       Reverse search 'upto' the given character.
  910.  
  911.        U       Restore the current line to  its  state  before  you
  912.                started changing it.
  913.  
  914.        W       Move forward one blank-delimited word.
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                                   - 14 -
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.        STEVIE                                        User Reference
  929.  
  930.  
  931.  
  932.        X       Delete one character before the cursor.
  933.  
  934.        Y       Yank the current line. Same as 'yy'.
  935.  
  936.        ZZ      Exit from the editor, saving changes if necessary.
  937.  
  938.        [[      Move backward one C function.
  939.  
  940.        ]]      Move forward one C function.
  941.  
  942.        ^       Move to the first non-white on the current line.
  943.  
  944.        `       Move to the given mark, as with '.  The  distinction
  945.                between the two commands is important when used with
  946.                operators. I support the  difference  correctly.  If
  947.                you  don't know what I'm talking about, don't worry,
  948.                it won't matter to you.
  949.  
  950.        a       Append text after the cursor.
  951.  
  952.        b       Back one word.
  953.  
  954.        c       The change operator.
  955.  
  956.        d       The delete operator.
  957.  
  958.        e       Move to the end of a word.
  959.  
  960.        f       Find a character on the current line.
  961.  
  962.        h       Move left one column.
  963.  
  964.        i       Insert text before the cursor.
  965.  
  966.        j       Move down one line.
  967.  
  968.        k       Move up one line.
  969.  
  970.        l       Move right one column.
  971.  
  972.        m       Set a mark at the current position (e.g. ma or mb).
  973.  
  974.        n       Repeat the last string search.
  975.  
  976.        o       Open a new line and start inserting text.
  977.  
  978.        p       Put the yank/delete buffer after the cursor.
  979.  
  980.        r       Replace a character.
  981.  
  982.  
  983.  
  984.  
  985.  
  986.                                   - 15 -
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.        STEVIE                                        User Reference
  995.  
  996.  
  997.  
  998.        s       Replace characters.
  999.  
  1000.        t       Move forward  'upto'  the  given  character  on  the
  1001.                current line.
  1002.  
  1003.        u       Undo the last edit.
  1004.  
  1005.        w       Move forward one word.
  1006.  
  1007.        x       Delete the character under the cursor.
  1008.  
  1009.        y       The yank operator.
  1010.  
  1011.        z       Redraw the screen with the current line at  the  top
  1012.                (zRETURN), the middle (z.), or the bottom (z-).
  1013.  
  1014.        |       Move to the column given by the preceding count.
  1015.  
  1016.        ~       Invert the case of the current character (if  alpha)
  1017.                and  move  to the right.  If the parameter "tildeop"
  1018.                is set, this command functions as an operator.
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                   - 16 -
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.                            STEVIE - User Guide
  1065.  
  1066.                                  CONTENTS
  1067.  
  1068.  
  1069.         1.  Overview...........................................   1
  1070.  
  1071.         2.  Starting the Editor................................   2
  1072.  
  1073.         3.  Set Command Options................................   2
  1074.  
  1075.         4.  Colon Commands.....................................   4
  1076.             4.1  Mode Lines....................................   5
  1077.             4.2  The Global Command............................   5
  1078.             4.3  The Substitute Command........................   5
  1079.             4.4  File Manipulation Commands....................   6
  1080.  
  1081.         5.  String Searches....................................   7
  1082.  
  1083.         6.  Operators..........................................   8
  1084.  
  1085.         7.  Tags...............................................   8
  1086.  
  1087.         8.  System-Specific Comments...........................   8
  1088.             8.1  Atari ST......................................   8
  1089.             8.2  UNIX..........................................   8
  1090.             8.3  OS/2..........................................   9
  1091.             8.4  MSDOS.........................................   9
  1092.  
  1093.         9.  Missing Features...................................   9
  1094.  
  1095.        10.  Known Bugs and Problems............................  10
  1096.  
  1097.        11.  Conclusion.........................................  11
  1098.  
  1099.        Character Function Summary..............................  12
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                                   - i -
  1119.  
  1120.  
  1121.  
  1122.  
  1123.