home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / FFB.ZIP / FFHLP.ARC / SED.TXT < prev    next >
Encoding:
Text File  |  1987-12-11  |  15.1 KB  |  411 lines

  1.  6.  SED the Editor
  2.  
  3.         SED and Overview
  4.  
  5.         SED is a text editor implemented in Forth, with cursor movement
  6.         key sequences similar to WordStar.
  7.  
  8.                     Glossary of Editor Operations
  9.  
  10.         Copying Lines                           F3 & F5
  11.  
  12.           Lines can be copied from one place in a file to another,
  13.         with the Mark-F3, and Copy Line-F5 commands.  Move to the
  14.         first line of the block of text you wish to copy, and Mark
  15.         the start of the copy with Mark-F3, now move to the place
  16.         where you want to copy the text to, and press Copy-F5 once
  17.         for each line you want to copy.
  18.  
  19.  
  20.         Delete and Un-Delete lines              Control-Y  &  Alt-Y
  21.  
  22.           Lines can be deleted with Ctrl-Y, and un-deleted with
  23.         Alt-Y.  Any lines which are deleted are saved in a line
  24.         delete buffer which currently has room for 50 lines.  This is
  25.         also the number of line deletes which can be un-deleted.
  26.  
  27.  
  28.         Exporting a block of Text               Alt-X and Shift Alt-X
  29.  
  30.           SED can export lines of text to another file.  With Alt-X,
  31.         first go to the first line of text you want to export, and
  32.         press F3 mark to mark the start of the block export.  Then
  33.         move to the last line of text you want to export, and press
  34.         Alt-X. This will cause all of the lines between and including
  35.         the start and end line to be written out to the file
  36.         TEMP.SEQ. To specify a different filename to export to, press
  37.         Shift-Alt-X, instead of Alt-X, and you will be prompted for a
  38.         name to write to.  See also "Importing a File".
  39.  
  40.  
  41.         Exporting to another file               Alt-W
  42.  
  43.           The current edit file can be written out to another file.
  44.         By pressing Alt-W, you will be asked for the name of the file
  45.         to write out to.  The entire file contents in memory will be
  46.         written out to the new filename.  If you want to export a
  47.         small amount of text to another file, you can use the Alt-X
  48.         Export function.
  49.  
  50.         HELP, on line                           F1
  51.  
  52.           Press F1 for on-line help on the various commands
  53.         available.
  54.  
  55.  
  56.  
  57.         Importing a File                        Alt-V
  58.  
  59.           Text which has been exported with the Alt-X (export)
  60.         command to the TEMP.SEQ file can be imported with Alt-V, the
  61.         import command.  If you want to import a file other than
  62.         TEMP.SEQ, you can press Shift-Alt-V, and a window will pop-up
  63.         for you to select a file from.  If you press Esc during the
  64.         import, or while in the file selection window, the import
  65.         operation will be aborted.  See also "Exporting a block of
  66.         Text".
  67.  
  68.  
  69.         Inserting Special characters in SED     Alt-C char
  70.  
  71.           The Alt-C function allows any single character which can be
  72.         generated by the keyboard to be inserted into SED.  Simply
  73.         press Alt-C followed by the key you want to insert.  Function
  74.         keys are mapped to characters above 127, so they will show up
  75.         as graphics characters.
  76.  
  77.  
  78.         Left Margin                             Ctrl-L
  79.  
  80.           The left margin on the screen defaults to column zero, but
  81.         when printed, defaults to 2 spaces, so it is not normally
  82.         necessary to insert a left margin.  However, when TAB is
  83.         pressed, the left margin on screen is expanded by 8
  84.         characters.  Any subsequent lines typed in will maintain this
  85.         margin.  The left margin can be set at any column position.
  86.         Move the cursor to the column where you want the left margin
  87.         set and press Ctrl-L.
  88.  
  89.  
  90.         MACROS and FF                           Alt-M, Alt-1..5
  91.  
  92.           SED does not have macros built into it, but a file is
  93.         provided called MACROS.SEQ, which implements macros in Forth
  94.         that can be used in SED.  These macros work exactly the same
  95.         as they work in ZED.  That is, you use Alt-M to start
  96.         defining a macro, followed by one of the Alt-1 to Alt-5 keys
  97.         for the macro you are defining.  Next you enter any keys you
  98.         want included in the macro, and finally press Alt-M again to
  99.         complete the macro definition.  To perform a macro, simply
  100.         press one of the Alt-1 through Alt-5 keys by it self, and the
  101.         keys saved will be performed.
  102.  
  103.  
  104.         Marker, Page Break  (a down pointing arrow head)
  105.  
  106.           The down pointing arrow head symbol is used by SED to mark
  107.         the first line of a NEW page, so you will notice this symbol
  108.         appears at the left edge of the screen at the top of the
  109.         document.
  110.  
  111.  
  112.         Marker, End of File (an up  pointing arrow head)
  113.  
  114.           The up pointing arrow head symbol is used by SED to mark
  115.         the last line of text in the file.
  116.  
  117.  
  118.         Printing Documents                      Alt-P
  119.  
  120.           Printing can be initiated Alt-P.  It will take you to a
  121.         screen where you can set the printing parameters, like first
  122.         and last page to print, copies to print, etc.  These values
  123.         default to the most common situation, which is to print all
  124.         of a document once.  To start printing, press "P", or press
  125.         ESC to abort.
  126.  
  127.  
  128.         Reading Foreign documents               Alt-K  Tab expansion
  129.  
  130.           If you want to read a text file from an editor which imbeds
  131.         Tabs, you will see this character " " in many places in the
  132.         file when you first start editing it.  If you do see these
  133.         Tab characters, press Alt-K, and these characters will be
  134.         expanded to spaces properly.  This process will increase the
  135.         size of the file somewhat, so if you are doing this to a very
  136.         large file, you may run out of the 64000 character memory
  137.         space available. WordStar document files will need to passed
  138.         through a conversion utility before being edited by SED.
  139.  
  140.           You can import a Forth BLOCK file by specifying the file
  141.         and extension on the file prompt line.  SED will not find any
  142.         line feeds in the file, so it will automatically split the
  143.         file at 64 characters per line  After this is done, trailing
  144.         blanks will be stripped from each line, and trailing blank
  145.         lines will be removed from the file.  The resulting file will
  146.         be much smaller, typically 50 percent or less.  The original
  147.         file is not modified, and the new file is created with the
  148.         extension ".TMP".
  149.  
  150.  
  151.         Replacing Text                          F8-Replace & Alt-F8
  152.  
  153.           After a Search has been done, you can replace the text
  154.         found.  Press F8.  You will be asked for a replacement
  155.         string, which will be used to replace the found text, when
  156.         return is pressed.  To search for the next occurrence of the
  157.         same text, press Alt-F6, and to replace the next found
  158.         occurrence with the same replacement text, press Alt-F8.
  159.  
  160.  
  161.         Replacing All Occurrences of Text        Shift-F8
  162.  
  163.           Having already performed a Search (F6) and Replace (F8)
  164.         once, you can replace all occurrences of search text with
  165.         replacement text by pressing Shift-F8.
  166.  
  167.  
  168.         Searching for Text                      F6-Search & Alt-F6
  169.  
  170.           You can look for any sequence of characters in SED with the
  171.         Search-F6 key.  When F6 is pressed, you are asked to enter a
  172.         text string to look for.  SED will look for that string of
  173.         characters when you press <return>.  When SED searches for
  174.         text, it ignores the case of the letters.  If you want SED to
  175.         look at the CaSe of the text it searches, hold down SHIFT
  176.         while pressing <return>.  This search is much faster.  To
  177.         search for another occurrence of the same text string, press
  178.         Alt-F6 (or SHIFT Alt-F6 if you want only an exact match).
  179.         See also the earlier section on Replacing Text.
  180.  
  181.  
  182.         Searching for Text Backwards            Shift-F6
  183.  
  184.           Having already done a search using F6 above, you can also
  185.         search backwards with Shift-F6, which searches backwards from
  186.         the cursor with a CaSe sensitive search.
  187.  
  188.  
  189.         Selecting a File to Edit
  190.  
  191.           A new file selection mechanism has been added.  When you
  192.         are being asked to enter a new filename, if you press ENTER
  193.         without entering a filename, a window will pop up allowing
  194.         you to select a file from the directory.  If you are in a
  195.         sub-directory when the window appears, then a file named "."
  196.         and a file named ".." will appear at the top of the file
  197.         list.  These files, along with any directories below the
  198.         current directory, will display a graphic "infinity" symbol
  199.         "∞" to the right of the filename.  If you press <return>
  200.         while positioned on the "." name you will select the ROOT
  201.         directory.  The ".." name will pop up one level of directory,
  202.         and any other name with the "infinity" symbol next to it will
  203.         step you down one level to that directory.  You can move
  204.         between files in the list, with the keypad arrow keys, and
  205.         select a file by pressing ENTER.  Escape can be used to abort
  206.         file selection.  While in the pop up file selection mode, you
  207.         can also set the current drive by pressing a letter key
  208.         between A and G.  This drive must exist and have a disk in
  209.         it, or a system error will result.  The path and the current
  210.         drive is displayed in the lower right.  The path can be
  211.         changed by pressing the "\" key, then typing the new path
  212.         followed by the return key.
  213.  
  214.           A filename can be specified on the command line when
  215.         starting SED, and may include a directory specification.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.         Status Line
  223.  
  224.           The top line of the display shows the current edit status,
  225.         starting with INSERT/OVERWRITE status, which is also shown by
  226.         a thicker cursor for insert mode.  The current Column and
  227.         Line number are then displayed, followed by the page number,
  228.         total lines in file and total characters in file.
  229.  
  230.  
  231.         Tab setting                     Alt-T
  232.  
  233.           Set the TAB key to tab to the current column, if you are on
  234.         column 4, TABS will occur at column 4, 8, 12, 16, etc.
  235.  
  236.  
  237.         Wordstar key functions
  238.  
  239.           SED tries somewhat half heartedly to be WordStar
  240.         compatible. The cursor movement keys, Control
  241.         A,S,D,F,E,X,C,R,W and Z have been maintained, as have the
  242.         delete keys Control G,T,Y, and Del.
  243.  
  244.                         Key Definition Index
  245.  
  246.         Control keys
  247.  
  248.         A       Previous word.
  249.         B       ..
  250.         C       Next page, Page Down.
  251.         D       Right one character.
  252.         E       Previous line, Up Line.
  253.         F       Forward, Next word.
  254.         G       Delete the character UNDER the cursor.
  255.         H       Move left one character non-destructively.
  256.         I       Same as TAB.
  257.         J       ..
  258.         K       ..
  259.         L       ..
  260.         M       Like the <return> key.
  261.         N       Split line at cursor.  See also Alt-N (join line).
  262.         O       ..
  263.         P       ..
  264.         Q       ..
  265.         R       Previous page, Page Up.
  266.         S       Left one character.
  267.         T       Delete the word to the right.
  268.         U       Update, save changes up to this moment.
  269.         V       Insert/ Overwrite mode toggle.
  270.         W       Scroll screen down.
  271.         X       Next line, Down Line.
  272.         Y       Cut/Delete the current Line.
  273.         Z       Scroll the screen up.
  274.  
  275.  
  276.  
  277.         Keypad Functions
  278.  
  279.         ESC         Exit SED and Save changes.
  280.         Shift-ESC   Exit SED and Don't save changes.
  281.         Home        Goto beginning of line.
  282.         End         Goto end of line.
  283.         PgUp        Go back towards beginning of document 12 lines.
  284.         PgDn        Go towards end of document 12 lines.
  285.         Ctrl-Home   Go to First line of document.
  286.         Ctrl-End    Goto last line of document.
  287.         Ins         Toggle between Insert and Overwrite mode.
  288.         Del         Delete the character under the cursor.
  289.  
  290.  
  291.         Alternate Keys
  292.  
  293.         A       ..
  294.         B       ..
  295.         C       Insert the next key pressed into the document.
  296.         D       ..
  297.         E       ..
  298.         F       ..
  299.         G       ..
  300.         H       ..
  301.         I       ..
  302.         J       ..
  303.         K       Expand imbedded TAB characters to spaces.
  304.         L       ..
  305.         M       ..
  306.         N       Join Lines, the inverse of Control N.
  307.         O       ..
  308.         P       ..
  309.         Q       ..
  310.         R       ..
  311.         S       ..
  312.         T       Set the TAB key to expand to the current column.
  313.         U       Word Undelete, undeletes the last 10 words or so.
  314.         V       Import a file, pops up a selection window.
  315.         W       Write entire file to a new file.
  316.         X       Export lines from mark to cursor.
  317.         Y       Un-delete lines.
  318.         Z       ..
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.         Function Keys
  333.  
  334.         F1      ..
  335.         F2      ..
  336.         F3      Mark line, for copy lines, and export lines.
  337.         F4      ..
  338.         F5      Get a line from the mark.
  339.         F6      Search, prompts for search text.
  340.         F7      ..
  341.         F8      Replace, prompts for replace text, must do F6 first.
  342.         F9      ..
  343.         F10     ..
  344.  
  345.         Alt-F1  ..
  346.         Alt-F2  ..
  347.         Alt-F3  ..
  348.         Alt-F4  ..
  349.         Alt-F5  ..
  350.         Alt-F6  Search for same text again, no prompt.
  351.         Alt-F7  ..
  352.         Alt-F8  Replace with same text again, no prompt and do Alt-F6.
  353.         Alt-F9  ..
  354.         Alt-F10 ..
  355.  
  356.         Shift-F6
  357.                 Search for text backwards, CaSe sensitive.
  358.         Shift-F8
  359.                 Replace all occurrences, use after F6 and F8.
  360.  
  361.         Shift-Alt-F6
  362.                 Search for same text again, no prompt Case Sensitive.
  363.         Shift-Alt-F8
  364.                 Replace with same text again, no prompt Case Sensitive.
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.         NOTES on F6 and F8
  388.  
  389.           The straight key, F6 or F8 will perform the specified
  390.         operation, with a prompt for a text string parameter.  The
  391.         operation is performed with a case insensitive search.  That
  392.         is, "CaSe" is the same as "case".
  393.  
  394.           The Alt-F6 or Alt-F8 performs the same function, but with
  395.         the same text string as was entered with the non-Alt key.
  396.         Again, the search is case insensitive.
  397.  
  398.           Holding down Shift while pressing return on F6, Alt-F6 or
  399.         Alt-F8 will cause the search to be done CASE SENSITIVE.  That
  400.         is, "CaSe" is NOT the same as "case".
  401.  
  402.           And finally, pressing Shift-F8, WITHOUT ALT, causes a
  403.         global replace all occurrences to be performed.
  404.  
  405.           While the above may seem confusing at first, it provides a
  406.         lot of flexibility and power for search and replace
  407.         operations.  Try these commands on a junk file until you
  408.         become familiar with their operation.
  409.  
  410.  
  411.