home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1558 / simped.doc < prev    next >
Text File  |  1990-12-28  |  9KB  |  329 lines

  1.  
  2.  
  3.  
  4.      simped()                    Unix SysV                       simped()
  5.  
  6.  
  7.  
  8.      Name
  9.           simped - a simple, bbs style editor.
  10.  
  11.  
  12.      Syntax
  13.           simped [-a] [-p] [filename]
  14.           (Note: only one file may be specified at a time)
  15.  
  16.       -a Causes the editor to always come up in append mode. This
  17.       fits nicely with the first 15 lines listed on entry. (Note:
  18.       the number of lines listed is configurable).
  19.  
  20.           -p Compatibility for postnews/inews. Because of the way
  21.       blank lines are stored by simped, inews deletes the first
  22.       line of text. This option will add a line with two dashes
  23.       "--" at the end of the header provided by postnews.
  24.  
  25.           Example for calling simped from a menu:
  26.  
  27.       EDITOR="/.../simped -p"; export EDITOR
  28.       postnews
  29.       EDITOR=".../simped"; export EDITOR
  30.  
  31.      Description
  32.           simped is a simple line oriented editor for use by people
  33.           who don't want to spend time learning a more flexible
  34.           editor like ed, ex or vi. It was designed with the intent
  35.           that useful work could be done immediately and without
  36.           reading this manual page or any of the online help.
  37.  
  38.           In keeping it simple much flexibility is lost. In an effort
  39.           to recover some of this and allow simped to act as a bridge
  40.           to more flexible editors, some commands may be wholly or 
  41.           partially entered on a single line instead of a separate
  42.           line for each portion of a command.
  43.  
  44.           For example: those commands that require line numbers may
  45.           be entered one of two ways:
  46.  
  47.           Command? d <RETURN>            (delete a line)
  48.           Line number: 1 <RETURN>
  49.           -or-
  50.           Command? d1 <RETURN>
  51.  
  52.           Also an extra editing command (Modify) has been added which
  53.           (once learned) makes editing much easier. Though there is
  54.           no complement to this command in any Unix editor, it does
  55.           regain some editing flexibility.
  56.  
  57.      Program entry
  58.           If no file is named on the command line, or the file is a
  59.           new file, an introductory message is printed and the user
  60.           is placed directly into input mode with the prompt:
  61.  
  62.             1> _
  63.  
  64.      simped   64                      Page 1                       simped
  65.  
  66.  
  67.  
  68.      simped()                    Unix SysV                       simped()
  69.  
  70.  
  71.           If the file exists, the last half page of text is listed
  72.           and the:
  73.  
  74.           Options: S)ave and quit, A)bort/cancel, L)ist text, E)dit line,
  75.                    I)nsert line, D)elete line, C)ontinue, M)odify, H)elp
  76.  
  77.           Command? _
  78.  
  79.           prompt is displayed, unless the -a option is specified, then
  80.       the user is dropped directly into C)ontinue mode.
  81.  
  82.           The number of lines listed is set at compile time by the
  83.           #define'd value PAUSE.
  84.  
  85.      Input mode
  86.           While in input mode characters typed in are placed in a
  87.           buffer. If the text being typed in spills over the end of
  88.           the line, it is automatically moved to the next line and 
  89.           typing continues uninterrupted.
  90.  
  91.           Entering a <RETURN> on a line by itself will exit input
  92.           mode and display the command prompt.
  93.  
  94.           If you want a blank line, enter a space and <RETURN>.
  95.  
  96.           The length of the lines is set at compile time by the
  97.           #define'd value LINELEN.
  98.  
  99.      Command options:
  100.  
  101.           * S)ave and quit 
  102.  
  103.             Saves the file and quits the editor.
  104.             No options.
  105.  
  106.           * A)bort/cancel
  107.  
  108.             Verifies that no save is to be done and then abandons any
  109.             editing that was done.
  110.             No options.
  111.  
  112.           * List text
  113.  
  114.             Lists the text entered, pausing every half page or so. The
  115.             number of lines listed is set at compile time.
  116.  
  117.             Options: A starting line number may be entered. A return
  118.                      will start listing at line 1.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.      simped   130                     Page 2                       simped
  131.  
  132.  
  133.  
  134.      simped()                    Unix SysV                       simped()
  135.  
  136.  
  137.           * Edit line
  138.  
  139.             Substitute old text for new text on a line. 
  140.  
  141.             Example 1:
  142.  
  143.             Command? e <RETURN>
  144.             Line number: 1 <RETURN>
  145.  
  146.               1> A line of text
  147.  
  148.             Old text: f t <RETURN>
  149.             New text: f modified t <RETURN>
  150.  
  151.               1> A line of modified text
  152.  
  153.             (returns to the command prompt)
  154.  
  155.  
  156.             Example 2:
  157.  
  158.             Command? e1/f t/f modified t/
  159.  
  160.               1> A line of modified text
  161.  
  162.             (returns to the command prompt)
  163.  
  164.             To insert characters at the beginning of a line, enter
  165.             nothing for the "Old text:" and the characters to be
  166.             inserted for the "New text:".
  167.  
  168.             To delete characters, enter them in the "Old text:" and
  169.             nothing in the new text.
  170.  
  171.             Entering nothing in both "Old text:" and "New text:" will
  172.             result in no change.
  173.           
  174.           * Insert line
  175.  
  176.             Insert lines of text BEFORE the line number specified. The
  177.             user is dropped into 'insert mode'.
  178.  
  179.             Option: The line number you want the inserted text to
  180.                     appear BEFORE.
  181.  
  182.           * Delete line
  183.            
  184.             Delete a line. The line will be printed and you must enter
  185.             a 'y' for the line to be deleted.
  186.  
  187.             Option: The line number you want deleted.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.      simped   196                     Page 3                       simped
  197.  
  198.  
  199.  
  200.      simped()                    Unix SysV                       simped()
  201.  
  202.  
  203.  
  204.           * Continue
  205.  
  206.             Continue entry. Drops the user into input mode AFTER the
  207.             last line in the file.
  208.  
  209.             No options.
  210.  
  211.           * Help
  212.  
  213.             An online source of information about commands.
  214.  
  215.           * Modify
  216.  
  217.             This is a multi-use editing function added in a effort
  218.             to regain some of the flexibility lost in making this
  219.             editor simple.
  220.             
  221.             Option: The line number you want to modify.
  222.  
  223.             This command can:
  224.  
  225.               - replace text
  226.               - put blanks in place of characters
  227.               - delete text
  228.               - insert text
  229.  
  230.             The line is printed and and the cursor is placed under the
  231.             first character on the next line. Changes are made by placing
  232.             one or more of the available options below the portion of
  233.             the line.
  234.  
  235.             OPTION              EXPLANATION
  236.             ------              -----------
  237.             ^text#              Inserts the characters between the '^'
  238.                                 and the '#' BEFORE the character
  239.                                 pointed to by the '^'. Inside the '^'
  240.                                 and the '#', both the '&' and the '^'
  241.                                 are treated as regular characters.
  242.  
  243.           ^#                Inserts a # before the ^ (special case)
  244.  
  245.                #                (When not the first character after a
  246.                                 '^') causes the character above it to
  247.                                 be deleted and the space closed.
  248.  
  249.                &                Replaces the character above it with a
  250.                                 blank space.
  251.  
  252.             (space)             No effect.
  253.  
  254.             ANY OTHER CHARACTER WILL REPLACE THE CHARACTER ABOVE IT!
  255.             ========================================================
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.      simped   262                     Page 4                       simped
  263.  
  264.  
  265.  
  266.      simped()                    Unix SysV                       simped()
  267.  
  268.  
  269.             Example:
  270.  
  271.             Command? m1 <RETURN>
  272.  
  273.                1> Thos sentence isstoobbe mortifd
  274.             edit>   i  ^is the ####  #&     d   ^ie#
  275.  
  276.                1> This is the sentence to be modified
  277.  
  278.             Command? _
  279.  
  280.  
  281.  
  282.      Bugs
  283.  
  284.      If the terminal erase character is set to something other than
  285.      ^H (\010) like DEL, hitting a BS will place a ^H in the text.
  286.  
  287.  
  288. /*
  289.  * Copyright (C) 1990 by Jay Konigsberg.
  290.  *
  291.  * Permission to use, copy, modify, and distribute this  software  and  its
  292.  * documentation is hereby  granted,  provided  that  the  above  copyright
  293.  * notice appear in all copies  and that  both  the  copyright  notice  and
  294.  * this permission notice appear in supporting documentation. This software
  295.  * is provided "as is" without express or implied  warranty.  However,  the
  296.  * author retains all Copyright priviliges and rights  to  renumeration  if
  297.  * this software is sold.
  298.  */
  299.  
  300. (Translation: you may use this software freely, but if you sell it, I get
  301. some money. The amount depends on the selling price).
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.      simped   328                     Page 5                       simped
  329.