home *** CD-ROM | disk | FTP | other *** search
/ PC Consument 1998 January / PCC11998.bin / demos / euphor.exe / ED.DOC < prev    next >
Encoding:
Text File  |  1997-03-07  |  9.7 KB  |  213 lines

  1.            +-----------------------+
  2.            |  The Euphoria Editor  |
  3.            +-----------------------+
  4.  
  5.  usage: ed filename
  6.      ed
  7.  
  8.  Summary
  9.  -------
  10.  After any error, just type "ed", and you'll be placed in the editor, at the 
  11.  line and column where the error was detected. The error message will be at 
  12.  the top of your screen.
  13.  
  14.  .e, .ex and .pro files are displayed in color. Other text files are in mono. 
  15.  You'll know that you have misspelled something when the color does not change
  16.  as you expect. Keywords are blue. Names of routines that are built in to 
  17.  ex.exe appear in magenta. Strings are green, comments are red, most other 
  18.  text is black. Balanced brackets (on the same line) have the same color.
  19.  You can change these colors as well as several other parameters of ed. See 
  20.  "user-modifiable parameters" near the top of ed.ex.
  21.  
  22.  The arrow keys move the cursor left, right, up or down. Most other characters
  23.  are immediately inserted into the file.
  24.  
  25.  In Windows, you can "associate" various types of files with ed.bat. You will 
  26.  then be put into ed when you double-click on these types of files - e.g. 
  27.  .e, .pro, .doc etc. Main Euphoria files ending in .ex might better be
  28.  associated with "ex.exe".
  29.  
  30.  Ed is a multi-file/multi-window editor. Esc c will split your screen so 
  31.  you can view and edit up to 10 files simultaneously, with cutting and
  32.  pasting between them. You can also use multiple edit windows to view and edit 
  33.  different parts of a single file. 
  34.  
  35.  Special Keys
  36.  ------------
  37.  <delete>         Delete the current character above the cursor.
  38.  
  39.  <back-space>     Move the cursor to the left and delete a character.
  40.  
  41.  <control-delete> 
  42.       or        Delete the current line. (<control-delete> is not
  43.  <control-d>      available on all systems.)
  44.  
  45.  <insert>         Re-insert the preceding series of deletes or
  46.           control-deletes before the current character or
  47.           current line.
  48.  
  49.  <control-arrow-left>  Move to the start of the previous word.
  50.  
  51.  <control-arrow-right> Move to the start of the next word.
  52.  
  53.  <home>           Move to the beginning of the current line.
  54.  
  55.  <end>            Move to the end of the current line.
  56.  
  57.  <control-home>   Move to the beginning of the file.
  58.  
  59.  <control-end>    Move to the end of the file.
  60.  
  61.  <page up>        Move up one screen.
  62.  
  63.  <page down>      Move down one screen.
  64.  
  65.  F1 ... F10      Select a new current window. The windows are numbered
  66.            from top to bottom, with the top window on the screen
  67.            being F1.
  68.  
  69.  F12              This is a special customizable command. It is set up
  70.                   to insert a Euphoria comment mark "--" at the start of
  71.                   the current line. You can easily change it to perform
  72.                   any series of key strokes that you like, simply by redefining
  73.                   constant CUSTOM_KEYSTROKES near the top of ed.ex
  74.                   
  75.  Escape Commands
  76.  ---------------
  77.  Press and release the <Esc> key, then press one of the following keys:
  78.  
  79.  h     Get help text for the editor, or Euphoria. The screen is split
  80.       so you can view your program and the help text at the same time. 
  81.  
  82.  c     "Clone" the current window, i.e. make a new edit window that is 
  83.       initially viewing the same file at the same position as the
  84.       current window. The sizes of all windows are adjusted to make room
  85.       for the new window. You might want to use Esc l to get more lines
  86.       on the screen. Each window that you create can be scrolled
  87.       independently and each has its own menu bar. The changes that you
  88.       make to a file will initially appear only in the current window.
  89.       When you press an F-key to select a new window, any changes will
  90.       appear there as well. You can use Esc n to read a new file into 
  91.       any window.
  92.  
  93.  q       Quit (delete) the current window and leave the editor if there are 
  94.       no more windows. You'll be warned if this is the last window used for
  95.       editing a modified file. Any remaining windows are given more space.
  96.  
  97.  s       Save the file being edited in the current window, then quit the 
  98.       current window as q above.
  99.  
  100.  w     Save the file but do not quit the window.
  101.  
  102.  e       Save the file, and then execute it with ex. When the program finishes
  103.      execution you'll hear a beep. Hit Enter to return to the editor. 
  104.      This operation may not work if you are very low on extended memory.
  105.      You can't supply any command-line arguments to the program.
  106.      
  107.  d     Run any DOS command. After the beep, hit Enter to return to the editor.
  108.      You could also use this command to edit another file and then return,
  109.      but Esc c is probably more convenient.
  110.  
  111.  n     Start editing a new file in the current window. Deleted lines/chars 
  112.       and search strings are available for use in the new file.
  113.  
  114.  f       Find the next occurrence of a string in the current window. When
  115.       you type in a new string there is an option to "match case" or
  116.       not. Press y if you require upper/lower case to match. Keep hitting 
  117.       Enter to find subsequent occurrences. Any other key stops the search. 
  118.       To search from the beginning, press <control-Home> before Esc f.
  119.      The default string to search for, if you don't type anything,
  120.      is shown in double quotes.
  121.      
  122.  r     Globally replace one string by another. Operates like f command.
  123.      Keep hitting Enter to continue replacing. Be careful -- there is
  124.      no way to skip over a possible replacement.
  125.      
  126.  l     Change the number of lines displayed on the screen. Only certain
  127.      values are allowed, depending on your video card. Many cards will
  128.      allow 25, 28, 43 and 50 lines. 
  129.  
  130.  ddd     Move to line number ddd. e.g. Esc 1023 Enter would move to 
  131.       line 1023 in the file.
  132.  
  133.  CR      Esc <Enter> will tell you the name of the current file, as well as
  134.        the line and character position you are on, and whether the file 
  135.        has been modified since the last save. If you press Esc and then
  136.        change your mind, it is harmless to just hit Enter so you can go back
  137.        to editing.
  138.  
  139.  Cutting and Pasting
  140.  -------------------
  141.  When you <control-delete> a series of consecutive lines, or <delete> a 
  142.  series of consecutive characters, you create a "kill-buffer" containing 
  143.  what you just deleted. This kill-buffer can be re-inserted by moving the
  144.  cursor and then pressing insert. 
  145.  
  146.  A new kill-buffer is started, and the old buffer is lost, each time you 
  147.  move away and start deleting somewhere else. For example, cut a series of 
  148.  lines with <control-delete>. Then move the cursor to where you want to paste
  149.  the lines and press <insert>. If you want to copy the lines, without 
  150.  destroying the original text, first <control-delete> them, then immediately
  151.  press <insert> to re-insert them. Then move somewhere else and press 
  152.  <insert> to insert them again, as many times as you like. You can also 
  153.  <delete> a series of individual *characters*, move the cursor, and then paste
  154.  the deleted characters somewhere else. Immediately press <insert> after 
  155.  deleting if you want to copy without removing the original characters.
  156.  
  157.  Once you have a kill-buffer, you can type Esc n to read in a new file, or you
  158.  can press an F-key to select a new edit window. You can then insert your kill
  159.  buffer.
  160.  
  161.  Use of Tabs
  162.  -----------
  163.  The standard tab width on MS-DOS is 8 spaces. The editor assumes tab=8 for 
  164.  most files. However, it is more convenient when editing a program for a 
  165.  tab to equal the amount of space that you like to indent. Therefore you will
  166.  find that tabs are set to 4 when you edit Euphoria files (or .c, or .h 
  167.  or .bas files). The editor converts from tab=8 to tab=4 when reading your 
  168.  program file, and converts back to tab=8 when you save the file. Thus your
  169.  file remains compatible with the tab=8 world, e.g. MS-DOS PRINT, EDIT, etc.
  170.  If you would like to choose a different number of spaces to indent, change
  171.  the line at the top of ed.ex that says "constant PROG_INDENT = 4".
  172.  
  173.  Lines longer than 80 characters
  174.  -------------------------------
  175.  Lines longer than 80 are marked with an inverse video character in the
  176.  80th column. Ed will not display past column 80. By deleting the carriage 
  177.  return at the end of a line, you can combine it with the next line to create
  178.  a line longer than 80. You can also break a long line by inserting a 
  179.  carriage return.
  180.  
  181.  Maximum File Size
  182.  -----------------
  183.  Like any Euphoria program, ed can use extended memory. It will edit files 
  184.  that are much larger than what MS-DOS EDIT or Windows Notepad can handle.
  185.  With a huge file, inserting or deleting a line near the beginning of the file
  186.  might take 20 seconds or longer, due to intense swapping activity. Other 
  187.  operations should be reasonably quick.
  188.  
  189.  Non-text Files
  190.  --------------
  191.  ed is designed for editing pure text files, although you can use it to
  192.  view other files. As ed reads in a file, it replaces non-printable 
  193.  characters (less than ASCII 32) with ASCII 254 - small square. If you 
  194.  try to save a non-text file you will be warned about this. (MS-DOS EDIT
  195.  will quietly corrupt a non-text file - do not save!). Since ed opens all
  196.  files as "text" files, the control-Z character (26) will appear to be the
  197.  end of the file.
  198.  
  199.  Windows 95 Long Filenames
  200.  -------------------------
  201.  You can edit existing files that have pathnames with long names in them, 
  202.  however in this release ed will not create *new* files with long names. The 
  203.  name will be truncated to the standard DOS 8.3 length.
  204.  
  205.  Source Code
  206.  -----------
  207.  The complete source code to this editor is in bin\ed.ex and bin\syncolor.e. 
  208.  You are welcome to make improvements. There is a section at the top of
  209.  ed.ex containing "user-modifiable" configuration parameters that you
  210.  may want to adjust. The colors and the cursor size may require adjusting for
  211.  some operating environments.
  212.  
  213.