
Introduction
============

    I recommend reading this in the editor rather than printing it, so you may prefer to
    uncheck Syntax Colouring on the Options menu before continuing, if you want.

    This editor is designed to be very easy to use, with standard keystrokes, and a very
    shallow learning curve, yet with a powerful range of options and tools in easy reach.
        
    Context-sensitive help and keyboard reference cards are only a keystroke (F1) away.

    Most editing functions can also be found on the File, Edit, and Tool menus.

    A more detailed manual (this text) is displayed via the Help, Contents menu option,
    and can be quickly navigated by searching (Ctrl F) or Tools, Quick jump (Ctrl Q).

    The editor is free and is distributed with the full source code.

    The current release is quite complete except for some Help menu entries.

    Before starting the tutorial, one quick reference to the CSM key on the keyboard:
    Below the right-hand shift key most keyboards have a key with a small dropdown menu and an
    arrow button. I do not know what this is properly called but I shall refer to it as the
    Context Sensitive Menu key or the CSM key for short. It pulls up the same menu that is
    displayed by right clicking with the mouse, so if there is no such key all is not lost.
    Although not heavily used it is hard to describe mid-flow of talking about something else,
    so now you know what is meant by "CSM key (see intro)" in the rest of this document.

    Press Page Down to continue to the tutorial.

    


Tutorial
========

    Press F1 to see a quick definition of the function or procedure under the cursor (if it
    is recognised) or a reference card showing the common edit keys. (As documented below.)
    
    Check you can use the cursors, cut, paste, mouse selection, etc. Right click on the text
    area to pop-up a context sensitive menu or use the CSM key (see intro).

    Use File, New/Open or drag a file onto the edit area to open a second edit pane.
    Note that most menu commands have keyboard shortcuts for the entries you use all the time.

    A tab bar appears whenever there is more than one file open. Left Click on a tab to switch
    to that file, or use Ctrl Page Up and Ctrl Page Down to move along the tab bar.
    Right click for file operations. This menu is also displayed for the current open tab when
    Ctrl+CSM (see intro) is pressed.

    TIP: The Open and Save As dialogues from the File menu and "another tab" pop-up use
    different starting directories. Suppose the files project\editor.exw, personal\test3.exw,
    and common\file.e are open at the same time. To open a file that is known to be in the
    same directory as one of those three files, right clicking on the appropriate tab and
    selecting open from the drop-down menu will start the open file dialogue in that directory.
    This is much quicker than using the directory dropdown in the standard windows open file
    dialogue. Alternatively use Ctrl Page Up/Down to make the appropriate tab uppermost and
    then use Ctrl O to open a file from that directory.
    The open option on the File menu uses the directory from the current (top) file tab.
    
    When editing several files a small asterisk sometimes appears on the tab bar entry.
    This is a reminder that the most recent changes have not yet been saved.
    When there are more files on the tab bar than will fit across the screen, small red buttons
    are shown which allow the tabbar to be scrolled left and right.


Context-specific help
=====================

    When syntax colouring is enabled on the Options menu, the following line should 
    display different colours for recognised functions:

        openWindow(find(right(op),windowlist),Normal) --open "right" window for operation

    Place the cursor anywhere on "openWindow(" or ",Normal)" and press F1.
    A window appears describing openWindow as a win32lib procedure taking two parameters,
    along with a short description of the procedure (when available).

    Place the cursor anywhere on "find(" or ",windowlist)" and press F1.
    A window appears describing find as a builtin function, parameters and description.

    Place the cursor anywhere on "right(op)" and press F1.
    If a global procedure, function, or type "right" is locally defined, and the header
    file glocal.exh has been (re-)built via the Tools, Parse for context help option,
    then a window appears showing a description of right as a locally defined routine,
    along with details of the parameters it takes, and, if written in the appropriate
    source, a brief description of the procedure. See Parse for Context.., section 6.3

    Three buttons are shown on the context help window:
        Examine code (disabled for builtin routines), which opens the appropriate source
        and jumps to the routine [Note: uses the line number as saved when "Parse for 
        context" was last run.]
        Close - self explanatory, and
        Keyboard help, which displays a window showing a summary of the function keys.
         (the latter is displayed when no routine help can be found).

    TIP: a routine defined in the same source is quicker found using Tools/Quick jump.
    See also section 6.5, Help.

Faster navigation
=================

    Press Ctrl+Q or use the Tools/Quick Jump function on the main menu to bring up a 
    list of routines (all or global), or sections (underlined document headers).
    Double click on an entry in the list or cursor to it and press return.

    The Quick jump window opens with All checked for files ending in exw, ew, e, ex, exu, eu,
    and with Sections checked for all other files.
    
    Going back to the edit window, Ctrl+Right and Ctrl+Left jump to the start of the 
    next/previous word respectively. Double click on a word, or with the word already 
    under the cursor, press Ctrl+W to quickly select an entire word.

    Press Ctrl+F3 to find the first place this word appears in the file. Note that if the
    cursor does not appear to move, that is because the cursor is already on the first 
    occurence of the word. Press Ctrl+Shift+F3 to find the next occurence of the selected
    word if you are not interested in any prior occurences. 
    F3 finds the next instance of a word or phrase previously registered as the search 
    target by Ctrl+F3, Ctrl+Shift+F3 or Edit/Find. Shift F3 similarly finds the prior.

    If the word is not on the screen use the Edit/Find option (Ctrl+F) and type the word
    manually into the find dialogue window.
    
    To find symbols or punctuation such as {0} you will need to manually select an example
    or enter the text directly into the find dialogue window.
    
    Press Ctrl+Home to jump to the start of the file, Ctrl+End the last line.

    That should be enough to get you started. The next few pages contain some advanced
    tips, with embedded examples to experiment with while reading.


Advanced - Find in Files
========================

    Suppose you have a global variable which is not being set properly, and/or need to
    know where and how it is being used, or have a word or phrase you need to look up.

    Either block the selected variable name/word/phrase by cursoring to it and pressing
    Ctrl W or double click on it or select it with the mouse, then select Find in Files
    from the Tools menu (Alt T, F), or initially select the Find in Files option and then
    enter the name/text directly into the "Find what" field in the window which appears.

    Three directory options are shown below the "Find what" field:
    
    Current directory (taken from the current file). Select this option to search the current
    directory and all subdirectories.
    
    Euphoria Files? Select this option to search all files in the euphoria installation
    directory, including documentation, utilities (bin), demos, and include files.

    Euphoria Includes? Select this option (mutually exclusive with the above option) to 
    restrict the search of the Euphoria installation files to the include directory, namely
    only those program code files/routines the application can include/invoke.
    
    The results are placed in ex.err and each instance can be automatically jumped to by 
    cursoring to it and pressing F12.
    
    For a quick example, try this on "F12" now.

    Note that the "fuzzy match" algorithm used may return some unexpected results, such as
    lFuncDef[1][2] as "f", [, "1", ][, "2" might or might not be of interest.
    A fuller description of this function can be found in section 6.3 [Hint: use Ctrl Q]


Auto Completion
===============

    The Auto Completion feature can be enabled or disabled on the Options menu.

    The following autocompletions occur when typing begins in column 1:

        [con]stant              [int]eger           [seq]uence
        [proc]edure()           [fun]ction()        [type]()
        end procedure           end function        end type

    integer and sequence also autocomplete when entering function or procedure parameters.

    The following autocompletions occur when typing on a line of only TABs:

        [for] to do             [if] then           [wh]ile do      [pri]ntf(1,"",{})
        end for                 end if              end while

    The cursor is left in the most natural position to continue typing, ie before "()",
    "to", "then", or "do".  Return skips the trailing part of the last autocompletion,
    ie leaves "do", "()", "then" on the preceding line. A second attempt breaks the line.

    Characters between [] shown above are the minimum number of characters required to
    trigger the autocompletion. However, if the entire word is keyed, the result is the
    same as the editor automatically skips any matching autocompletion characters.
    Note: Keying "procdecode" will produce "procedure decode()", however "procencode"
    will produce "procedure ncode()" as the matching autocompletion "e" is skipped.
    Instead type a space, eg "proc encode", to produce the expected result in all cases.

    Backspace on a tab inserts "else", a second "elsif then", third deletes the elsif then
    and subsequent backtabs delete text as normal.


    Undo and backspace reverse the autocompletion action. For example to code "funds=0"
    staring in column 1 you must key "fun<undo>ds=0". Avoid typing code in column 1 and 
    do not use variables beginning "if", "for", or "wh" to prevent this.

    Note that indentation is not automatically provided on the second line of function and
    procedure templates to allow local variables to be entered first.

    On the right are the minimum keys required to enter this program:

function fact(integer i)                    funfact<right>inti<right><Enter>
    if i<=1 then                            <tab>ifi<=1<Enter>
        return 1                            return 1<Enter>
    else                                    <backspace><Enter>
        return i*fact(i-1)                  return i*fact(i-1)
    end if
end function



    To familiarise yourself with the operation of autocompletion, try entering the keys
    shown above right in the space above. If nothing happens check Options,AutoComplete.

    Note that trailing ) of function is dragged to next line by <Enter> because it is
    not part of the last autocompletion, integer .

    This example shows that the code requiring 91 keystrokes to enter manually can be
    entered with only 51 keystrokes, a saving of nearly 45%. There is also much less
    chance of a missing end if/for/while/procedure/function.

    This feature should be disabled while writing non-Euphoria program source code.



Advanced: tips & tricks - working with words from the keyboard (no mouse or menus required)
=======================

    This is what I do when in a hurry :-)

    You might use something like the following to skip cases already examined, in this
    case this is just some temporary test code (which skips a particular value precisely
    once, rather than every occurence). Lets add 20 to it.

    integer fiftyfour, thirtyfive, thirtythree, thirty
    fiftyfour=54 thirtyfive=35 thirtythree=33 thirty=30
    ...
        if length(hash[i])>hiczg then
            if 0 then
            elsif length(hash[i])=fiftyfour then fiftyfour=0
            elsif length(hash[i])=thirtyfive then thirtyfive=0
            elsif length(hash[i])=thirtythree then thirtythree=0
            elsif length(hash[i])=thirty then thirty=0
            else hiczg=length(hash[i]) hiczgi=i end if              
        end if

    Move the cursor to the elsif thirty line. Duplicate it by pressing Ctrl D.
    Use Ctrl left/right to get to the nearest thirty, press Ctrl W then type twenty.
    Block and copy the twenty you just typed by keying Ctrl W then Ctrl C.
    Use Ctrl right/left to get to the other thirty on that line, replace it by keying
    Ctrl W then Ctrl V. Move up to the variable declaration/assignment lines, hit End.
    Add ", " Ctrl V, then " " Ctrl V "=20" respectively.

    You will need to practise that before it starts to feel natural.
    But when you do get used to it, it is a very quick way of working.



Advanced: tips & tricks - keyboard macros
=======================

    Suppose you wish to extend some data with additional info, say field length:
    
    fields={"name",
            "address and postcode",
            "phone",
            "status (a=active,s=suspended)",
            "balance",
            "sales rep",
            ...

    First, move to the insertion point, say by searching for , (comma) or keying Down, End.
    Type in "20" at the end of the "name" line. You realise that a comma, Down, End are 
    needed on every line, so assign a macro to F8: press Alt T, M, F8 to begin recording.
    Now enter the comma Down End and press F8 again to end the recording.

    The cursor should now be after "address", type 30 then press F8 to replay the macro.
    Now just key 15 F8 1 F8 and so on until all the extra fields have been added.

    Hints are displayed in the status line (if active) during macro deinition/record.

    TIPS: Always complete one edit by hand to make sure the search register, clipboard etc
          are correctly pre-loaded if need be.
          Start the macro record just after the variable part has been entered, finish the
          macro record with cursor to next place or F3 (find next), rather than at the start
          or in the middle when possible.
          Cancel highlit text after F3 within the macro by keying Esc or cursor if needed.

    See also the fuller definition of Macro in section 6.3

    
Reference Section
=================

1. Basic Editing Keys
=====================

    The following table lists all the function keys used in the editor.
    Press F1 when editing to show a quick reference popup of these key usage tables.
    You do NOT have to remember this table. The idea is that you may start remembering some
    of these if you use them everyday. With the exception of the basic movement keys you can
    perform all these operations from the menus as explained fully later in this manual.

    NOTE: Asterisked(*) entries need work on them (either have a known bug or have not been
          implemented at all). This * notation is used throughout the manual.

    Basic Movement keys
    ===================
     Home       Jump to Start of line           Ctrl+Home       Top of file
     End        Jump to End of line             Ctrl+End        End of file
     Page Up    Screen up                       Ctrl+Page Up    Next file in Tabbar
     Page Down  Screen down                     Ctrl+Page Down  Prev file in Tabbar
     Up         up one line                     Ctrl+Up         scroll up 1 line
     Down       down one line                   Ctrl+Down       scroll down 1 line
     Left       left one character              Ctrl+Left       word left
     Right      right one character             Ctrl+Right      word right

    Shift+Home/End/PageUp/PageDown/Up/Down/Left/Right perform block selection.

    Ctrl+Tab increases the indent, Shift+Tab decreases it (single line &/or block).

    Ctrl+Shift+PageUp/PageDown moves the current file along the tabbar. This allows
    related files to be moved next to each other for quicker switching.

    

    Function keys
    =============
     F1         Help                        Shift+F1                Ctrl+F1
     F2                                     Shift+F2                Ctrl+F2
     F3         Find Next                   Shift+F3 Find Prior     Ctrl+F3         Find First
     F4         Next Difference             Shift+F4                Ctrl+F4
     F5         Run                         Shift+F5                Ctrl+F5         Param.Run
     F6                                     Shift+F6                Ctrl+F6
     F7                                     Shift+F7                Ctrl+F7
     F8                                     Shift+F8                Ctrl+F8
     F9         Comment                     Shift+F9 Uncomment      Ctrl+F9
     F10        [Windows menu]              Shift+F10               Ctrl+10
     F11                                    Shift+F11               Ctrl+11
     F12        Jump to Error               Shift+F12               Ctrl+12
     Backspace  Delete left                 Shift+Backspace         Ctrl+Backspace
     Insert     INS/OVR*                    Shift+Insert    *       Ctrl+Insert     Comment*
     Delete     Delete                      Shift+Delete    *       Ctrl+Delete     Uncomment*
     CSM        Edit pop-up                 Shift+CSM               Ctrl+CSM        Tab pop-up
     Esc        Cancel selection            Shift+Esc               Ctrl+Esc
     Tab        Insert Tab char             Shift+Tab Dec Indent    Ctrl+Tab        Inc Indent

    For completeness only, note that undocumented combinations are not necessarily completely
    inoperative, eg Ctrl+F1, Shift+F1, and Ctrl+Shift+F1 all behave as F1 (display the help).

    Backspace is the large <--- key above return.
    The CSM key is described in the introduction to the manual.
    Control+Shift Up/Down scroll by five lines.
    If the "Use Insert and Delete for copy/paste" option is checked, then shift Delete = cut,
    control shift Delete = cut append, control Insert = copy, control shift Insert = copy 
    append, and shift Insert is paste.



    Find keys summary:
    =================
          key             finds what          target
        F3              Next occurence      previous search target.
        Shift+F3        Previous ""         previous search target.
        Ctrl+F3         First occurence     selected text or previous search target.
        Ctrl+Shift+F3   Next occurence      selected text or previous search target.
    
    1) If the control key is not pressed the current text selection is ignored.
    2) It would be more consistent for Ctrl+Shift+F3 to find prior, however the usual case
        of being on a procedure, function, or variable definition, then automatically 
        there cannot be any preceding references, so next is more logical and useful.

    This allows more natural cut/copy/paste/comment/indent operations.


    Menu keys:
    ==========

    Select entries from the menu using Alt F, E, T, O, or H.
    Alt space opens the system menu. Alt F4 closes the application.

    Note: About ALT and Windows menus
    Press the Alt key and release it. You should notice a depressed button effect around
    "File" on the menu bar signifying the menu now has "focus" rather than the edit area.
    This is a standard Windows behaviour. Some keystrokes (especially the function keys)
    will be ignored. Press Alt again (or esc) to return focus to the edit area.
    A similar behaviour occurs with F10 (though Derek may amend win32lib to change this)





    Control [letter] Keys
    =====================
    Ctrl                                        Ctrl
     A      Select All                           N      Open New
     B                                           O      Open
     C      Copy                                 P      Print
     D      Duplicate Line                       Q      Quick Jump
     E                                           R
     F      Find/Replace                         S      Save
     G                                           T
     H      = to backspace[1]                    U
     I      [1]                                  V      Paste
     J      [1]                                  W      Select Word
     K      [1]                                  X      Cut
     L      [1]                                  Y      Redo
     M      = to return[1]                       Z      Undo

   ([1] Programming note: Historically, Ctrl H,I,J,K,L,M have been used for left/delete, 
    tab, down, up, right, and return keys. Evidently on the IBM PC two of them still are.)

    Ctrl Shift C and Ctrl Shift X perform Copy and Cut but extend the clipboard rather
    than replace the clipboard contents.









2. Screen Layout
================

    The system menu is opened by clicking on the program icon (top left) or pressing Alt space.
    It contains the standard windows entries for restore, move, size, minimise, maximise, & 
    close.

    The title bar contains the name and path of the file currently being edited.

    To the right of the title are the standard windows buttons for minimise, restore/maximise
    and close.

    Below the title bar is a menu bar which is described fully in part 6.

    When more than one file is open a tab bar appears immediately below the menu bar to allow
    rapid switching between the files being edited. This is described fully in part 5.

    The main part of the screen is occupied by the edit area which shows the text of the file
    currently being edited. A full description can be found in part 4.

    Lastly, at the bottom of the screen there is an optional status bar, detailed in the next
    section.

    You can drag and drop files onto the edit screen or the icon to open them for editing.









3. The Status Bar
=================

    At the bottom of the window is an optional status bar.
    The display can be toggled on and off using the Options, Status bar menu entry. It shows:

    Line and column. Blank if no file is open

    INS for Insert mode (*OVR for Overstrike mode is planned for a future release).

    Hex value under cursor. Blank on an empty file or at end of line.

    Date in the format Monday 23/9/2002.

    Time in the format 12:59pm.

    Message area.


















4. The Edit Area
================

    The edit area covers the main part of the screen.
    Firstly, it is important to understand what "focus" is.
    If a pop-up window appears, for example search/replace, open file, etc. it is common sense
    that anything you type will happen in the new window until it is closed.
    However the menus and the edit area are always on screen at the same time, so which 
    responds to your keystrokes can occasionally confuse.
    It is possible, using the mouse, to switch the focus to the main window. For example
    key Ctrl F to open the find window, then click on the main window. The title bars should
    change colour to show you which window has focus. Either click on the title bar or
    press Ctrl F again to force the focus back to the top window.

    Press the Alt key and release it. You should notice a depressed button effect around "File"
    on the menu bar. This signifies that the menu now has "focus" rather than the edit area.
    This is a standard windows behaviour. Some keystrokes (especially the function keys) will
    be ignored. Press Alt again (or esc) to return focus to the edit area.

    Mouse handling
    ==============
    Left click anywhere in the edit area to move the cursor to that point.
    Hold the left mouse button down and drag the mouse to select text. This can also be
    done with shift- up, down, left, right, home, end, page up and page down keys.
    Files may be dragged onto the edit pane to open them for editing.

    Edit Area Pop-up menu
    =====================

    This menu appears when the right mouse button is clicked within the edit area, or when the
    CSM key (see introduction) is pressed. The options are:

    Cut (Ctrl X)

        Deletes the currently selected text and places it on the system clipboard.

        This option is disabled if there is no currently selected text.

    Cut Append (Ctrl Shift X)

        Deletes the currently selected text and adds it to the existing clipboard contents.

        This option is disabled if there is no currently selected text.

    Copy (Ctrl C)

        Places a copy of the currently selected text on the system clipboard.

        This option is disabled if there is no currently selected text.

    Copy Append (Ctrl Shift C)

        Adds a copy of the currently selected text to the existing clipboard contents.

        This option is disabled if there is no currently selected text.

    Paste (Ctrl V)

        Inserts a copy of the contents of the system clipboard into the current file.

        This option is disabled if the system clipboard is empty.

    Comment

        Converts each line in the selected blocked text into comments by placing "--" at
        the start of each line. This occurs even if the line is already a comment, so that
        the uncomment operation described next can return the text to its original state.

        Note: the start and end of blocked text can be deceptive when the cursor is in 
        column 1 because no characters are highlighted on that line. Often, therefore the
        comment routine appears to be commenting one more line than it should. There are no
        plans to alter this behaviour.

        This option is disabled if there is no currently selected text.
                    
    Uncomment

        Removes leading "--" from the start of each line in the selected block of text.
        See also: Comment

        The uncomment option will also the remove single ">" or "<" at the start of the 
        lines from a block selected text area. These are inserted into the text by the 
        file comparison tool described later in this section. 

        I have also found in some cases that mailing list replies contain ">"-prefixed code
        and this function can be useful to quickly remove them in the same way.

        Note: the same deceptive block handling described in Comment occurs.
        
        This option is disabled if there is no currently selected text.
            
    Increase Indent (Ctrl Tab)

        Inserts a tab character at the start of each line of the selected text.

        This is useful when an additional if, for or while statement has been added around
        existing lines of code.

        Note: the same deceptive block handling described in Comment occurs.

        This option is disabled if there is no currently selected text.

    Decrease Indent (Shift Tab)

        Removes a tab character from the start of each line of the selected text.

        This is useful when a surrounding if, for or while statement has been removed from
        around existing lines of code.

        Note: the same deceptive block handling described in Comment occurs.

        This option is disabled if there is no currently selected text.

    Undo (Ctrl Z)

        Reverses the last amendment made to the file.

        The undo function does not currently handle the reversal of actions performed on
        more than line such as block delete, comment, etc. In these cases it reverses the
        changes one line at a time.

        This option is disabled if there are no actions which can be undone.
            
    Redo (Ctrl Y)

        Reverses the last undo command.

        This option is disabled if the last command was not undo or redo or there are no more
        undo actions to reverse.

    Find First (Ctrl F3)

        Finds the first occurence of the selected text in the current file.

        Note: If the currently selected text already is the first instance of that text in
        the current file, then this function will obviously appear to do nothing.

        This option is disabled if no text is currently selected.


    Find Next (Ctrl Shift F3)

        Finds the next occurence of the selected text in the current file.

        This option is disabled if no text is currently selected.


5. The Tab Bar
==============

    A tab bar appears whenever there is more than one file open. Left Click on a tab to switch
    to that file, or use Ctrl Page Up and Ctrl Page Down to move along the tab bar.
    If needed, Ctrl Shift Page Up and Ctrl Shift Page Down can be used to change the order of
    files on the tab bar, eg placing related files next to one another.
    Right click for file operations. This menu is also displayed for the current open tab when
    Ctrl+CSM (see intro) is pressed.

    TIP: The Open and Save As dialogues from the File menu and "another tab" pop-up use
    different starting directories. Suppose the files project\editor.exw, personal\test3.exw,
    and common\file.e are open at the same time. To open a file that is known to be in the
    same directory as one of those three files, right clicking on the appropriate tab and
    selecting open from the drop-down menu will start the open file dialogue in that directory.
    This is much quicker than using the directory dropdown in the standard windows open file
    dialogue. Alternatively use Ctrl Page Up/Down to make the appropriate tab uppermost and
    then use Ctrl O to open a file from that directory.
    The open option on the File menu uses the directory from the current (top) file.
    
    When editing several files a small asterisk sometimes appears on the tab bar entry.
    This is a reminder that the most recent changes have not yet been saved.

    When there are more files on the tab bar than will fit across the screen, small red buttons
    are shown which allow the tabbar to be scrolled left and right.
    
    Tab bar menus
    =============
    A tab bar menu is displayed when you right click on a tab or press Ctrl+CSM key (see intro)
    The options are:

      New

        Opens a new empty file.

      Open

        Brings up the standard windows Open dialogue which allows you to specify the file 
        name or select a file and/or change directory.

      ReOpen

        Discards any changes made to the file and reloads a fresh copy from disk.

      Save

        Saves the file. If the file is untitled it prompts as per Save As.

      Save As

        Brings up the standard windows Save As dialogue which allows you to specify the file
        name or select a file and/or change directory.

      Close

        Closes the current open file. If it has not been saved since the last changes were 
        made a reminder is shown asking whether to save the file with the options Yes, which
        saves the file before closing it, No, which discards the changes and closes the file
        or Cancel which leaves the file open and returns to normal edit mode.

    At first sight the tab bar menu appears to duplicate the functions available on the main 
    menu (see section 6), and indeed, on the current tab they function identically.

    However if you right click on a background tab, there is a subtle, but useful difference.
    The default directory for file open, new, and save as is taken from that tab rather than
    the current open tab which happens when you use the main menu. This can save a great deal 
    of effort if you edit or regularly refer to files in several different directories.

    Instead of right clicking with the mouse you can Ctrl Page Up/Down to an appropriate tab
    before opening a file to get this benefit.


    
6. Menus
========

6.1 File
========

    New (Ctrl N)
        Opens a new empty file. The file tab bears the legend [untitled] until the user
        invokes Save As (see below).

    Open (Ctrl O)
        Brings up the standard windows Open dialogue which allows you to specify the file 
        name or select a file and/or change directory.

    Close
        Closes the current open file. If it has not been saved since the last changes were 
        made a reminder is shown asking whether to save the file with the options Yes, which
        saves the file before closing it, No, which discards the changes and closes the file
        or Cancel which leaves the file open and returns to normal edit mode.

        This option is disabled if there are no open files.
            
    Save (Ctrl S)
        Saves the file. If the file is untitled it prompts as per Save As.

        This option is disabled if there are no open files.
            
    Save As
        Brings up the standard windows Save As dialogue which allows you to specify the file
        name or select a file and/or change directory.

        This option is disabled if there are no open files.
            
    Print (Ctrl P)
        Brings up the standard windows print dialogue allowing you to select a printer and 
        change the printer properties if required, select the pages to print and the number
        of copies.
        
*       There is currently no way to set the margins, headers or footers, or print preview.

        This option is disabled if there are no open files.

*   Recent files (eg as per the IDE)

    Exit
        Closes the editor, automatically saving all files which have been amended since they
        were last saved.


6.2 Edit
========

    Undo (Ctrl Z)
        Reverses the last amendment made to the file.

        The undo function does not currently handle the reversal of actions performed on
        more than line such as block delete, comment, etc. In these cases it reverses the
        changes one line at a time.*

        Currently limited to 60 actions by "constant ACTIONLISTSIZE = 60" in action.e
        This should be increased on an individual needed/available memory basis.
        [Ed: if anyone really wants, I can easily make this amendable from Options menu]

        This option is disabled if there are no actions which can be undone.
            
    Redo (Ctrl Y)
        Reverses the last undo command.

        This option is disabled if the last command was not undo or redo or there are no more
        undo actions to reverse.
            
    Cut (Ctrl C)
        Deletes the currently selected text and places it on the system clipboard.

        This option is disabled if there is no currently selected text.

    Copy (Ctrl C)
        Places a copy of the currently selected text on the system clipboard.

        This option is disabled if there is no currently selected text.

    Paste (Ctrl V)
        Inserts a copy of the contents of the system clipboard into the current file.

        This option is disabled if the system clipboard is empty.
            
    Select All (Ctrl A)
        Block selects the entire contents of the file for cutting, copying, overpasting,
        or deleting. Please use this option with caution.
        
    Select Word (Ctrl W)
        Block selects the word under or to the immediate left or right of the cursor.
        Note: a word must be at least two characters long to be selected in this manner.
        
    Comment
        Converts each line in the selected blocked text into comments by placing "--" at
        the start of each line. This occurs even if the line is already a comment, so that
        the uncomment operation described next can return the text to its original state.

        Note: the start and end of blocked text can be deceptive when the cursor is in 
        column 1 because no characters are highlighted on that line. This is more deceptive
        when the block starts on a blank line since it is obvious where the block really
        ends (namely at the flashing cursor) but not where it starts. Often, therefore the
        comment routine appears to be commenting one more line than it should. There are no
        plans to alter this behaviour.
        
        This option is disabled if there is no currently selected text.
        
    Uncomment
        Removes leading "--" from the start of each line in the selected block of text.
        See also: Comment

        The uncomment option will also the remove single ">" or "<" at the start of the 
        lines from a block selected text area. These are inserted into the text by the 
        file comparison tool described later in this section. 

        Note: in this latter case, if the first line begins with ">" then any following
        non-blank lines which also begin with ">" will have that character removed,
        up to but not including any line beginning with "<" or any subsequent lines.
        This prevents accidentally leaving a single "<" line behind in the merged code.
        This is also true vice versa (ie for "<" & ">" instead of ">" & "<").

        Note2: the same deceptive block handling described in Comment occurs.
        
        This option is disabled if there is no currently selected text.
            
    Increase Indent (Ctrl Tab)
        Inserts a tab character at the start of each line of the selected text.

        This is useful when an additional if, for or while statement has been added around
        existing lines of code.

        Note: the same deceptive block handling described in Comment occurs.

        This option is disabled if there is no currently selected text.

    Decrease Indent (Shift Tab)
        Removes a tab character from the start of each line of the selected text.

        This is useful when a surrounding if, for or while statement has been removed from
        around existing lines of code.

        Note: the same deceptive block handling described in Comment occurs.

        This option is disabled if there is no currently selected text.

    Find (Ctrl F)
        Opens a window allowing a text string to be searched for to be entered.

        If a block of text is selected (all on one line) then that is used as the new 
        target, rather than any previously entered string.

        Check boxes allow for an exact case (upper or lower) match, or to start the search 
        from the top of the file.

        The find dialogue also allows the entry of a string to replace each occurence of
        the selected text, either one at a time via the replace button or all occurences
        from the current position to the end of file via the replace all button. Note that
        the find next button must be used and an occurence of the find string matched 
        before the replace single item button can be clicked.

        This option is disabled if there are no open files.

        Using the keyboard in ComboBox fields.
        ======================================
            For an example of a ComboBox field see the find function (Ctrl F).
            A ComboBox is also used in Compare and Find in Files.

            If the string shown is not what needs to be searched for, type in a new string,
            press Ctrl+V to paste the contents of the clipboard, use cursor up and down to
            scroll one at a time through previous search entries, or click on the button or
            press Alt+Downarrow to display the previous entries in a list. Note: in the very
            last case, Alt+Downarrow, the cursors can be used to move to the required entry 
            but the entry should be selected using the Tab key rather than the Return key.
            Similarly, to cancel the drop-down use Alt+Uparrow rather than the Escape key,
            which terminates the entire search process.


    Find Next (F3)
        Finds the next occurence of the string entered in the find dialogue or set via the 
        find first option described below.

        Note: this function ignores any selected text; see Find First (Ctrl F3) and/or
        Find Next Selected (Ctrl Shift F3) to search on selected text.
        
        This option is disabled if there are no open files.

    Find Prior (Shift F3)
        Finds the previous occurence, otherwise identical to find next just described.
        
    Find First (Ctrl F3)
        If text from a single line is selected, it overrides any text previously entered 
        in the find dialogue window.
        
        It then finds the first occurence in the file of the string to be search for.

        Note: if the selected (blocked) word or phrase happens to be the first instance
        of that text in the file, the find first function may appear to do nothing. It has,
        however, done exactly what was asked. Check the spelling.

        This option is disabled if there are no open files.

    Find Next Selected (Ctrl Shift F3)
        This function behaves exactly as find first, namely overriding the previous search
        target with selected text, if any, but continues from the current cursor position
        rather than starting from the top of the file.

    Next Difference (F4)
        Moves to the next line in the file beginning with ">" or "<". For use with the 
        (directory) compare function, see below.


6.3 Tools
=========

    Run (F5)
    ========
        Saves the file if it has been altered since the last time it was saved or opened,
        and attempts to run it as a Euphoria program, or using the system browser if the
        file ends in .htm or .html.

        If the option Load ex.err after Run error? is checked, the editor uses system_exec()
        to execute the program to wait for a result code to see if the ex.err file must be
        loaded and processed. This means that during the execution of the application, the
        editor becomes unresponsive, and is in fact minimised to the system tray.

        If the option Load ex.err after Run error? is unchecked, the editor remains active
        during the execution of the application. Note however, it becomes the programmers
        responsibility to ensure that they do not invoke several copies of the application
        without first closing down any previous versions.
        
        If an error occurs during the execution of the program, the ex.err file can be  
        automatically loaded when control returns to the editor as stated above, or the user
        can simply press F12 to load it, and then jump to the line of code causing the error 
        using the Jump to Error function (also F12) described below.

        This option is disabled if there are no open files.

    Parameterised Run (Ctrl F5)
    ===========================
        Builds the run string which would be executed if F5 was keyed, but before running it
        prompts the user to edit it, for example to add parameters.

        Previous commands run in this manner can be selected from the combo drop-down.

        The following standard commands are usually available on any Windows system:
            calc        - calculator
            charmap     - standard MS character maps
            clipbrd     - clipboard viewer
            command     - open a dos prompt
            explorer    - windows explorer
            iexplore    - internet explorer
            notepad     - notepad
            write       - wordpad

        TIP: When the Run window is opened, the whole of the command string is initially
        selected. To add parameters, press End first.


    Jump to Error (F12)
    ===================
        If the current file tab is not ex.err, that file is opened. Otherwise, providing
        the cursor is on a line which contains <file path and name>:line the appropriate
        file is opened and the line indicated highlighted on the screen.

        This greatly speeds up the process of tracking down a bug.

        TIP: if most of the entries in ex.err relate to a particular file, and you are 
        likely to need to press F12 on several of the "...called from" lines, then move
        the ex.err tab closer to that file using Ctrl Shift Page Up/Page Down.

        The F12 key also works in a similar manner to process the results from a find in
        files operation, which, for this very reason, are written to ex.err.

        Double clicking on a line in ex.err behaves the same as pressing F12.

        NOTE: If the invoked application changes the current directory (eg by opening a
        file with the standard windows dialogue), then the ex.err file will be written to
        that directory, and not the one the editor expects to find it in.
        
        This option is disabled if there are no open files.

    Bind
    ========
        This function creates shrouded or shrouded and bound versions of the program.
        A shrouded program still requires the Euphoria interpreter to be installed,
        whereas a bound program does not and is therefore more suitable for general 
        distribution.
        
        This option is only available when a registered version of Euphoria is installed.

        Please read the official notes in Euphoria\doc\bind.html

        The Bind function can only be run on EXW and EX files.  

        This option is disabled if there are no open files.

    Compare
    =========
        Use this option to find the differences between two versions of a file.
        
        Lines from the first file which cannot be found in the second file, because they have
        been deleted or modified, are prefixed ">" to denote deletion/amendment.
        Likewise lines from the second file with "<" to denote line insertion/amendment.
        All unchanged lines are included in the output with no prefix. For example:

            puts(1,"This line is unchanged,")
            <puts(1,"this line now has no spelling mistake,")
            >puts(1,"this line had a speling mistake,")
            puts(1,"and this line is unchanged as well")

        NOTE: Typically, "<" can be read as lines modified or inserted in the new file (as
        entered in the filename field, see below), and ">" as lines modified or deleted from 
        the main development version (as shown in the titlebar).
        However, you should pause a moment to check which way round these will actually be,
        especially if, for example, you open the recently emailed/downloaded files and then
        select the main development file, they will be the other way round (as opposed of
        course to starting with files in the main directory and comparing them with files
        in an "updates" directory).

        Obviously, when a file has been modified by programmer1 and programmer2, then ">"
        would imply that either programmer1 has inserted the line in file1 or programmer2 has
        deleted it from file2, both being equally possible, and vice-versa for "<" lines.

        The output is designed to be edited directly and saved over the original file once
        all differences (> and < prefixes) have been manually edited out as required.
        Use Edit/Next Difference or F4 to jump to the next difference between the files.

        Occasionally, compare reports two apparently identical lines as being different.
        It may be the line length, try blocking both lines to check for trailing spaces.
        It may also be a tab/space discrepancy. Select Tools, Show Tabs (see below) to 
        check this. Once the difference has been accepted, uncheck the Show Tabs option.
        One other case noted: if file one contains [three spaces, if], and file two has 
        been changed to [tab, if], then the inclusion of "<" and ">" characters to show
        differing lines means that ["<",three spaces,if] may be automatically converted
        to ["<",tab,if] by file load. In that case, you must look at the original lines
        which clearly show the change.

        Minor differences of tab/space between two files can be removed prior to file
        compare by Formatting and saving both files.

        The Compare dialogue appears when the Compare option from the Tools menu is selected.

        Before selecting the menu option, ensure that the first of the two files to be compared
        is open in the topmost (active) file tab. Please start from the main project directory
        rather than an updated file just received.
        
        The fields and buttons displayed are:
        
        Directory. If this this the first time during this edit session that the file
        comparison routine has been used, this defaults to the directory of the file being
        compared against, and the default focus is set on the Browse button (see below).
        If the function has been used previously in this session, and a file from a 
        different directory has been selected, that directory becomes the default value for 
        this field and, provided a same name file exists in that directory, the default 
        focus is set on the Compare button (see below).

        Filename. This always defaults to the same as the file being compared against (ie the
        active tab when the Tools Compare menu entry was invoked).
        
        NOTE: While it is perfectly OK to type values into the Directory and Filename fields,
        they are intended more for visual confirmation, either when the second and subsequent
        use of the comparison function tries to "guess" which file to compare against, or 
        after the Browse function has been successfully used to select a file.

        Overwrite? Check this box to cause the results to be placed directly into the
        original open file. If this box is left unchecked a new file tab "[untitled]"
        is opened with the results of the comparison. See "Reviewing.." below.

        Note: selecting the overwrite checkbox is not entirely sensible when the Autosave
        function is enabled. The problems this might cause are discussed further in section
        6.4. A warning message is displayed when the user attempts to set
        this checkbox when autosave is enabled. Note also that when autosave is enabled,
        the overwrite checkbox is automatically cleared each time compare is run.

        Rename? Check this box to cause the file shown in the Directory and Filename fields
        above (as opposed to that in the window header) to be renamed when processing is
        complete. The first charcter of the file extension is reduced by one, so, for example,
        the file edit.ew becomes edit.dw (from the original idea of "e"uphoria ==> "d"one).
        Another example would be index.htm becomes index.gtm.
        In this way it is easy to perform a quick visual check that all files in a temporary
        directory have been processed.

        Browse. This button invokes the standard file open dialogue. When a file is selected,
        the directory and filename fields are automatically updated, the selected file is
        opened in the background, and the focus is moved to the Compare button.

        Compare. This button performs the file comparison. When the comparison is complete a 
        window appears showing the number of differences found and a second chance to set or
        unset the Overwrite and Rename checkboxes. Note that if no differences are found, 
        the overwrite checkbox is disabled and no result file is generated.
        The second file is closed and, provided at least one difference has been found, then
        depending on the setting of the overwrite checkbox the results are pasted back to the
        original open file or a new "[untitled]" tab opened to contain the comparison results.

        Note: when the compare function is invoked, the default focus will always be on either
        the Browse or the Compare button, depending on whether a different directory has been
        previously selected. Further, the focus is only set to the Compare button when the 
        file indicated in the Directory and Filename fields actually exists.


        ===WARNING===:
        Opening an "updates" file first and then invoking Compare is likely to give
        counter-intuitive results and is strongly discouraged.
        It will also close and/or rename the file in the main project directory and leave
        open and/or overwrite the wrong file, namely the one in the temporary directory.

        Reviewing the results and Completing the edit
        =============================================
        
        When the comparison is complete, depending on whether the overwrite checkbox was
        ticked, the results of the comparison are shown ready for reviewing and editing
        either in the original file tab, or in a new [untitled] tab. 

        Press F4 to jump to the next insertion or deletion detected in the file.

        Inserted/Deleted blocks (non-interleaved) of "<" and ">" can be removed by selecting
        the block and using the uncomment command either from the CSM (see intro) or Edit menu.
                    
        If the overwrite checkbox was left unchecked, to return the results to the original
        file the following commands are needed:
        
            Ctrl A to select the whole file
            Ctrl X to put it all on the clipboard
            Close the file Alt F, C and select original file tab
            Ctrl A to select the whole file
            Ctrl V to replace with the clipboard contents
            Ctrl S to save the file

        Alternatively these commands can be invoked from the File & Edit menus, one at a time.


    Progress window and performance notes:
    ======================================
        File comparison is far more complicated than most people imagine. (See plan9.e)
        The casual reader is invited to skip this section which is only relevant when
        comparing files over 1000 lines long with at least 400 changes.
        It is far easier to merge small updates more often than make one big update once
        in a while, and of course much easier to test the changes made.

        If the local copy of the file has only minor changes, or none at all, it is usually
        easier to manually apply a few changes made locally to a recently recieved copy 
        which has been heavily updated. A wise project manager will keep copies of all files
        they know other people are working on.

        If the comparison process is still running after a few seconds a progress window
        will appear showing some internal estimations of progress. These are:

        Width. The width of the search band in the edit graph now being checked.
        This should grow steadily, although it will of course slow down as the band to
        be searched gets wider.

        Stretch. This is the closest approximation to a "percentage complete" indicator.
        However, since some parts of the files being compared may be nearly identical,
        while other parts may be very different, it does not move at a constant rate.

        Complexity. This is a simple figure indicating the current number of nodes found
        in the portion of the edit graph so far. This is clearly the most expensive part
        of file comparison. As a rule of thumb if this figure exceeds ten million the 
        program is unlikely to complete. Press the cancel button (see below) and use one
        of the alternative suggestions listed below.

        Edit distance. This shows the current minimum number of differences there are
        between the two files. Again, if this is initially very large (say 3000), then
        both: 1) the comparison is unlikely to complete and 2) the results of the file
        comparison are at best very difficult to use if not actually useless (from the
        practical point of view: How do you suddenly add 3000 changes to a program in
        one go and expect the result to work or be worth having?)

        A cancel button is present to permit the user to interrupt a particularly long
        comparison, or if they notice there are already more than say 2,000 differences
        and are therefore no longer interested in the results.

        NOTE: Especially if the complexity has already reached a large value, it may 
        take two or three minutes for the cancel button to take effect.
        [Programming note: The time consuming part of the cancel is executing the line
         stack={} at the end of plan9.e, when stack contains say 10 million nodes, it
         simply takes a while to free the allocated memory.]

        The user should be aware that a comparison of say versions 0.55.5 and 0.57.9 of 
        win32lib.ew, that is, comparing a 22,452 line file with a 25,664 line file where
        there are [an estimated] 16,074 changed lines, is unlikely to ever complete.
        [Editors note: I have no problem or shame that my program has severe trouble
         undertaking such a formidable task, and no plans to improve or excuse it.]
        The algorithm was selected from a shortlist of 14 as it gave the best [optimal]
        results, but not necessarily as quickly as some of the other programs reviewed.
        It does however process files with few differences (<400) very quickly.

        If you experience any [unexpected] problems (on a particular file that is) using
        the inbuilt Compare, then please make a copy of the files, post a query to the 
        mailing list, and if asked, forward a copy of the offending files to whoever asks 
        for them. Please do not post large attachments to the mailing list.

        Recommended links:
        By far the best alternative, if you have access to a unix or linux system, is the
        diff command, although the output is a little terse. This program has been widely
        used, enhanced and optimised over the last two decades or more and will easily
        process the win32lib example shown above, producing a rather large and, although 
        technically correct, almost completely useless result in under 2 seconds.
        On windows try http://www.accurev.com/ftp/free/tkdiff/diff.exe
        Nicer windows GUI programs are:
        ExamDiff: http://www.prestosoft.com/examdiff/examdiff.htm
        Or: http://www.componentsoftware.com/products/csdiff/intro.htm
        Or: http://winmerge.sourceforge.net/
        This is very nice but incomplete at time of writing (edit composite does not work):
        http://lifelines.sourceforge.net/Ethel/index.html - search for diff.
        Ricardo Forno has posted a set of five comparison programs to the RDS site
        (www.rapideuphoria.com), one of which should work!
        You may also wish to try the windows built-in FC command from a dos prompt,
        however to date I have not encountered any example where this performs as well as
        let alone better than the inbuilt compare function.
        I can also make available d5ff.ex if needed.

        The compare option is disabled if there are no open files.

    Directory Compare
    =================
        Use this option to quickly process a set of updates to a project which have been
        stored in a secondary/temporary directory.
        
        The underlying methodology is similar to the Compare option which the user should be
        familiar with before using this function. See also below for a field-by-field
        description of this function.
        
        Before the Directory Compare function is invoked, the current file tab should be
        any file from the main project directory (from now on referred to as <initial>).

        Enter the directory path where the updated or modified files are held or use the
        browse button to select any file in that directory (from now on the <target>).

        The <target> directory is remembered for the duration of the edit session.

        Once a different <target> is shown in the first field of the Directory Compare
        window, the Filename field, initially blank, shows the first of any same-named
        files found in both <initial> and <target> and the focus automatically moved to
        the Compare button.

        When the Compare button is pressed, the indicated Filename is opened in both
        directories and a file comparison performed, with the Overwrite? checkbox
        functioning as explained in the Compare option above.

        Additionally, as each file is compared, the version in <target> is optionally
        renamed (depending on the setting of the Rename? checkbox) as follows:

            .e .ex .ew .eu .exw .exu become .d .dx .dw .du .dxw .dxu

        on the basis that "e"uphoria ==> "d"one. Subsequently, opening files in the 
        relevant directory(ies) will not naturally show files with those extensions.
        (They will show when the Files of Type drop-down is changed to all files.)
        In practice, the first letter of the extension is reduced by one, rather than 
        explicitly changing an "e" to a "d", so eg .xyz will become .wyz

        The Directory Compare window is closed and the results of the single file
        comparison are shown in the <initial>Filename tab or a new [untitled] tab as
        explained above for the standard Compare function.

        Once the differences have been examined, edited as required, and saved, the
        Directory Compare option should be re-invoked to process the next file.
        When no further files exist which can be automatically compared, then when
        the Directory Compare window is opened the Filename field will display as 
        blank and the focus will be set to the Browse button instead of Compare.

        At this point you should check the temporary directory for any files which have
        not been renamed and hence cannot have been properly processed yet.

        By default the Browse button will list the contents of <target> at this point.
        
        ===WARNING===:
        Opening an updated file in the temporary directory and then invoking Directory
        Compare is likely to give counter-intuitive results and is strongly discouraged.
        It will also close the file in the main project directory and leave open and/or
        overwrite the wrong file, namely the one in the temporary directory.

        Processing of nested directories.
            The casual reader is invited to skip this section. When neither <initial>
            or <target> contain any sub-directories then obviously the following does
            not apply.

            If <target> is recognised as a sub-directory of <initial> then it is 
            skipped when scanning <initial> for suitable files to process.
            
            If <target> has any sub-directories with no equivalent in <initial> their
            contents are ignored.

            If both <initial> and <target> contain one or more sub-directories then
            only matching sub-directories are compared against each other.
            
            However, if <target> contains no sub-directories, but <initial> does, then
            a recursive scan of <initial> is performed with the following two exclusions
            applying to duplicate filenames detected in the <initial> sub-tree:
            
            One: If a file exists in the root directory of <initial> then any files with
            the same name found in any sub-directory of <initial> are ignored.

            Two: If two files with the same name are found in different sub-directories
            of <initial> then BOTH are ignored (when <target> has no sub-directories).

            When a file is detected which is in the same sub-directory of both <initial>
            and <target> then the relative directory path as well as the filename is 
            shown in the Filename field.

            If the above is not sufficient for your requirements then may I recommend 
            the following link: Beyond Compare: http://www.scootersoftware.com/
    
        
    Directory Compare (again, this time explained field-by-field)
        The Directory Compare dialogue appears when you select the Directory Compare option
        from the Tools menu.

        The fields and buttons displayed are:
        
        Directory. If this is the first time during this edit session that the file
        comparison routine has been used, this is shown as blank and the default focus is
        set on the Browse button (see below).
        If the function has been used previously in this session, and a file from a 
        different directory has been selected, that directory becomes the default value for 
        this field.
        
        Filename. Once a directory has been selected, this display-only field shows the
        first same-name file common to the project directory (as shown in the window header)
        and the temporary directory (as shown in the Directory field). If no such file can
        be found, the field is displayed blank and the focus is placed on the Browse button
        otherwise the default focus is set on the Compare button (see below).

        Overwrite? Check this box to cause the results to be placed directly into the
        original open file. If this box is left unchecked a new file tab "[untitled]"
        is opened with the results of the comparison. See "Reviewing.." above.

        Rename? This box is checked by default. If left checked, files from the directory
        shown in the field above are renamed after being processed, by reducing the first
        letter of the filename extension by one, for example Edit.exw becomes Edit.dxw,
        changes.htm becomes changes.gtm.
        This behaviour allows the Directory Compare function to be re-invoked after 
        processing each file and files already processed to be skipped, and also allows
        the temporary directory to be visually checked once all edits are complete.

        This field is repeated on the "number of differences" confirmation window.

        Browse. This button invokes the standard file open dialogue. When a file is 
        selected, however, only the directory information is retained. 
        If any same-name file is detected, the focus moves to the Compare button.

        Compare. This button performs a single file comparison as indicated by the 
        contents of the Filename field.

        If no differences are found, the user is informed, any temporary files opened are
        closed and focus returns to the directory compare window with the next same-name
        file, if any, displayed in the filename field so the user may continue processng
        the remainder of the directory.

        When differences are found, the results are presented as per the Compare function.

        To complete the task of comparing all files in the target directory, the user must
        re-invoke the directory compare function after editing and saving changes to each 
        individual file pair.

        The directory compare option is disabled if there are no open files.

        
    Find in Files
    =============
        The Find in Files window is displayed when the Find in Files option is selected
        from the Tools Menu. The fields and buttons displayed are:

        Find what. The contents of this field default to the currently selected text,
        provided only text from a single line is highlit. Previous search targets can be 
        selected from the drop-down list, see "Using the keyboard in ComboBox fields."
        
            Current directory. (default checked). Select this option to search the current
            directory (taken from the file tab currently selected).

            Sub-Directories. (default checked). Select this option to recursively search
            all sub-directories of the current directory.
        
            Euphoria files. (default unchecked). Select this option to search the EUDIR
            directory, which contains bin/demo/doc/html/include/register & tutorial.
        
            Euphoria includes. (default checked). Select this option to search the EUINC
            directory, ie files your program may include. This option may not be checked
            at the same time as the wider scope of Euphoria files.

        File selections on the right hand side of the window are:

            Standard files. Files ending with e, ex, ew, exw, eu, and exu.
            Documentation. Plain text and .doc files.
            Html files. Self explanatory.
            Skip files. Binary files - executables, picture, sound, movie etc files.
            Unknown files. Self explanatory.
            Win32lib files. Self explanatory.
            All files. Self explanatory.

        Go. Click on this button when you have entered the required search target and
        selected the required options.

        When this function completes, the results are written to ex.err in the current
        directory and this file is automatically (re)opened. Press F12 on any line to 
        open (if required) and jump to the occurence found.

        Naturally it is perfectly acceptable to delete lines already processed in the 
        ex.err file and if necessary resume later. For longer, more difficult edits, it
        would be wise to save the results in a temporary file just in case first test 
        run of a modified application crashes and wipes out the results of the search.
        Obviously should that happen you need to cut and paste the (remaining) results
        back into ex.err to restore the F12 jump to line ability.

        A warning message box appears after every 200 matches found, at which point the
        user can choose to continue the search or cancel it.

        Note: matching is case-insensitive and usually punctuation and white spaces
        are effectively ignored, unless they are present in the search string, in which
        case they must be present for a match to occur.

        If too many results are being returned, try using a leading or trailing space,
        however note that neither will match [target] or (target).

        NOTE: find in files operates on the directory. Changes made in the editor but
        not saved to disk (as indicated by an asterisk ("*") after the filename in the
        title and tab bars) are not searched or accounted for.
        Hence if you have inserted ten lines at the start of, say files.e, a match may
        be reported on line 980 when the editor verion has it on line 990.
        
        This option is disabled if there are no open files.


    Macro
    ========
        A very basic keystroke macro facility. There are no conditional tests, no loops,
        no macro edit facility, just a learn mode and replay. Only a single macro is
        available.*

        When the option is selected, the status bar shows the message:

            Enter keystroke to modify
        
        At this point you should select a key, eg F8. Please refer to the tables in section 1
        of this guide for suitable keys to use. There is no check that you are not redefining 
        a standard keystroke.*

        The status bar (if shown: check "Status bar" entry on Options menu) changes to:

            Perform edit action then press macro key again.

        For example, you might now press the following keys:

            Home (ensure cursor is in column 1)
            Downarrow (move to next line)
            Ctrl-right (move to 1st non-blank space)
            Shift-Home (block select all leading whitespace)
            Tab (replace it with a single tab character)

        Then press F8 again to signal the end of learn mode. Now each time you press F8
        again the editor behaves as if you had pressed the above five key combinations.

        It is common to use the search and paste functions as part of a macro. In general,
        you should perform the first of many repeated editing operations "by hand" which
        will naturally pre-load the search and clipboard as required.
        
        It is usually better to finish the macro by moving to the next line or occurence
        than it is to start the macro with F3 or cursor movement.

        Another example where macro is useful is when creating eg:

        constant winlist={LINE2,LINE3,LINE4,LINE5,LINE6,LINE7,LINE8,LINE9}

        Note: The macro function is not designed to incorporate/suppress pop-up dialogue.*
            This includes: the tab menu, the edit menu, the find window (as opposed to find 
            first & find next), new, open, save, save as, print, compare, directory compare,
            find in files, macro, quick jump, option settings, or help.
[not implemented:]
*           Special handling of edit options such as paste from either the main menu or edit
            area right-click menu during learn mode saves the keyboard shortcut rather than 
            actually opening the menu when the macro is replayed.[not implemented]*

        This option is disabled if there are no open files.


    Quick Jump
    ==========
        This option lists All routines, Global routines only, or Sections.

        A filter can be entered to restrict the displayed entries to those containing the
        specified string.

        All routines lists any definition within the current source of a type, function, or
        procedure.
        
        Global routines displays a subset of that list, namely global definitions.

        Sections is used for Documentation and lists any line which is followed by
        underlines of "=" or "-" marks.  Note that sections underlined with fewer than ten
        equal signs or minus signs may be omitted, as will any case where the underline
        is followed by further text on the same line (including spaces and tabs).

        A line such as =-=-=-=-=-=- does not count as a section underline in this respect.

        Sections can also be used to set bookmarks. Simply underline any (non-blank) line
        (use '-' in code so it is treated as a comment by the interpreter). Remember to 
        enter at least ten minus signs.

        The special cases "end procedure" and "end function" are deliberately omitted 
        unless there is additional text at the end of the line.
        
        Press Alt-A, Alt-G, or Alt-S to switch the display between All, Global and Sections.
        The focus is automatically returned to the main list.

        Select the required entry with the cursor keys and press Enter or double click an
        entry with the mouse to view the corresponding code/documentation.

        Escape clears the Quick Jump window without changing the cursor position in the 
        file being edited.

        The routines window can be resized or scrolled as needed.
        
        This option is disabled if there are no open files.


    ReFormat
    ========
        The Reformat window is displayed when the reformat option is selected from the
        Tools menu. It allows you to view third-party code in a layout more to your liking,
        check where missing or superfluous end statements are, etc.
        The fields displayed are:

        Tab settings:
            The average user most probably will not wish to change these settings from
            their default, the hint "The default settings are recommended" is shown to 
            reflect this. The settings available are:
            
            Toplevel. This controls the initial number of leading spaces for lines of code
            outside of procedure, function, and type definitions. 1 to 8 permitted.
    
            Routines. This controls the initial number of leading spaces for lines of code
            within procedure, function, and type definitions. 1 to 8 permitted.
    
            Increment. This controls the additional number of leading spaces for lines of
            code surrounded by if, for, and while constructs (both at toplevel and within
            routines). 1 to 8 permitted.

            The default is taken from the tab width setting, see Options, Colours.
            (That is, a tab width setting of 4 defaults the above to 4,4,4).


        Break lines at column. (default 94).
            "Tokens" such as strings, operators, reserved words, identifiers, etc are
            checked before printing to see if they will fit on the current line before
            the specified column. If not, they are written to a new line.

        OK: begins the formatting process, explained in detail below.

        
        Note: The first use of this function may "mangle" indentation somewhat.
              All changes can be quickly reversed using Undo (Ctrl Z)
              However, you may still wish to make a backup before first using.
              Second and subsequent usage should make very few unexpected changes.


        Formatting recalculates the indentation of function, procedure, and type definitions,
        as well as if, for, and while code blocks contained both within such definitions and
        at the top level. Variable definitions are moved to column 1.

        It strips multiple and trailing blank spaces.

        Indentation of comments is preserved as far as possible. For example in:
                if a =  1 then          -- initial status
                    if b=1 then             -- opening
                    elsif   b=2 then        -- validating
                    elsif b=3        then   -- processing
                    elsif       b=4 then    -- closedown
                    end if
                end if
            The program tries to preserve the relative indent of:
                    -- initial status
                        -- opening
                        -- validating
                        -- processing
                        -- closedown
            however some odd spacing as exampled above may defeat this on first usage
            as it repositions the comments in the same relative position to moved code.
            This is not a problem when the whole block of code is moved uniformly, unless
            some comments would then exceed the line break setting so may be shuffled left.

        Brace matching is used to calculate data/parameter indentation: eg

        a=b(c,
        d(e,
        f
        )
        )

            becomes:

        a=b(c,
            d(e,
              f
             )
           )

        Brace matching occurs for (,[,{,),], and }.
        The program validates that closing brace matches opening, eg ([)] is an error.

        Errors also include missing closing quotation marks, excess, missing, or mismatched
        end statements, misplaced else statements (ie no immediately surrounding if statement)
        and illegal characters. The output line is prefixed with ">" in column 1 and can be 
        quickly located by pressing F4. The total number of errors found together with a 
        summary of what sorts of error were detected is displayed before continuing.
        Press return or click OK to paste the results back to file, press escape or click
        cancel to abandon the reformat operation.

        Additionally, the file is checked to ensure it is a program file by, after skipping
        initial comments and blank lines, the first keyword is one of: if,for,while,function,
        procedure, type, global, include, with, without, atom, integer, sequence, or object.
        If not, the reformat option is aborted.

        Dangling then, and, do, or, and comma (',') are wrapped up/down accordingly.
        (Unless a comment has been placed inbetween.)
        The resulting file may therefore contain fewer lines than the original.

        Long lines are split according to the break at column parameter described above.
        The resulting file may therefore contain more lines than the original.
        
        Blank lines are preserved.

        
        NOTE: code of the form:
        ----
             pText = pText[1 .. lTextStart - 1] &
                     kHTMLEscapes[i] &
                     pText[lTextStart + length(kSpecialEscapes[i]) .. length(pText)])
        
        is by default formatted to:
        
            pText = pText[1 .. lTextStart - 1] &
            kHTMLEscapes[i] &
            pText[lTextStart + length(kSpecialEscapes[i]) .. length(pText)]
        
        TIP: add brackets and it formats to:
        ---
            pText = ( pText[1 .. lTextStart - 1] &
                      kHTMLEscapes[i] &
                      pText[lTextStart + length(kSpecialEscapes[i]) .. length(pText)]
                    )
        
        It does not change the meaning of the code, and it won't get mangled again by 
        subsequent reformats.
        
        
        Known problems:
        1): The following will not be recognised & there are no plans to change that:
            end --comment
            function/type/...
        2): some linebreaks occur late, eg (with three leading tabs left out for clarity)

elsif toktype=SYMBOL and toklen=1 and token[1]=',' and stacklim=1 and length(pending) then

            is formatted to:

elsif toktype=SYMBOL and toklen=1 and token[1]=',' and stacklim=1 and length(
                                                                             pending
                                                                            ) then

            it would of course be better to break the line nearer the middle...
            If you manually split the line say at the third and, subsequent reformat
            operations will preserve it.

        3): I have committed my own worst sin: you cannot change the tab settings from
            the keyboard. I can see no elegant way to change this.

        Lines beginning with ">" and "<" are assumed to be remaining differences from
        running the compare function from the tools menu. To permit F4 to continue to find the
        next difference, these are left beginning in column 1 irrespective of the currently
        suggested indentation level by the surrounding code. In practice, they will be left-
        aligned; eg:
        
                if test then
        <           some code
        >           some other code
                end if
        
        will become:
        
                if test then
        < some code
        > some other code
                end if
        
        Given there is an outstanding manual edit required on such lines (before the program
        could possibly be run without generating an error from the interpreter/compiler),
        there are no plans to alter this behaviour in any way.
        

        The Reformat option is disabled if there are no open files.


    Parse for context sensitive help
    ================================

        When this option is selected, the current directory and all sub-directories, and the 
        Euphoria/Include directory are scanned for global procedures, functions, and types.
        These are saved, along with file names, in the files win32lib.exh and glocal.exh
        in the same directory as editor.exw/exe.

        Descriptive comments are assumed to be those beginning in column 1, preceding the 
        routine definition in win32lib but following the routine definition for all other 
        sources.

        The files win32lib.exh, glocal.exh, and builtin.exh are read during start-up and used
        for syntax colouring, and also the corresponding details are displayed when F1 is 
        pressed on a recognised routine name.

        The updated files are automatically re-loaded and used for any newly entered or 
        edited lines, however some items may be incorrectly colourised on already open files.
        For an individual line you can just insert and delete a character to correct this,
        to update all files it is quickest just to exit the editor and restart it.
        A warning message appears to this effect after successfully running this function.

        Please note that this function should not be run on partially completed sources which
        trigger syntax errors when run with the interpreter, otherwise the partly out of date
        but otherwise useful information in glocal.exh may be temporarily lost, until such a
        point as all syntax errors in the source files have been eliminated.

        NOTE: context specific help is not recommended on low-power machines. It will run
        adequately on a 233MHz PC with 48MB of ram, but on that spec incurs a ten second
        start-up penalty and up to five seconds load penalty on large files. Context specific
[*]     help is implicitly disabled by the colour settings in force, see below.*

        NOTE2: global variables are not currently recognised, only global procedures, types,
        and functions. At this moment, analysing the current file for local variables, types,
        procedures, functions, and constants is not practical due to performance limitations.


        This option is disabled if there are no open files.


    Show Tabs
    =========

        Setting this option displays tabs highlit. This can be useful to determine why,
        for example, compare files reports two identically-looking lines as different.

        Famously, the unix make utility (and hence any Windows port) requires tabs
        rather than spaces in the control file to work properly. Hence in some cases it
        remains important to identify spaces and tabs as different.

        NOTE: This is a quick diagnostic aid, it is not supposed to be left set for any
        length of time. It is a tool not a setting, that is why it is on the Tools menu
        not the Options menu. In particular, strings containing a tab (which they never
        should) get shown partly string colour, tab highlit, rest of string in normal
        colour, then closing quote and remainder of line incorrectly in string colour.
        Also, highlighting and unhighlighting tabs reverts them to normal colour.
        There are no plans to alter either behaviour.

        This option is not preserved between editor settings.


6.4 Options
===========

    Auto Completion. See detailed explanation in the introduction.

    Backup
        When this option is selected a window appears with the following options:
        
        Autosave interval in seconds.
            Set this value to zero to disable autosave.
            Otherwise the currently open (top) file tab is saved as often as specified.
            On small files the delay is genuinely unnoticeable, but a larger file, say 
            win32lib.ew will freeze for 3 or 4 seconds at every save.
            Suggested values are: 300 (5 mins), 600 (10 mins), 1200 (20 mins).
        
        Autosave on tab switch.
            If this option is set, files are automatically saved whenever a different
            file tab is opened, either by opening another file, clicking on another tab,
            or pressing Ctrl PageUp/PageDown.

        In all cases, which files have and have not been saved since the last change
        can clearly be seen by the absence or presence of an asterisk next to the file
        name in the file tab and in the main title bar.

        Note that new files, with [untitled] in the file tab, are not automatically
        saved until after the user has given the file a proper name using the File,
        Save As function.

        NOTE: One function I have found can be quite dangerous to use with Autosave
        switched on is the Overwrite checkbox of file and directory compare.
        In other words, if you accidentally compare not this week's updates to a file
        (sent to you by someone else working on the project) but instead select one
        which is several months old, the results of the file comparison are to the 
        program absolutely accurate, but of no use whatsoever to you. What you clearly
        do not want is that being written back to disk automatically.
        A message box is shown when these settings are detected during compare.

[not implemented]
*       Backup directory
            Enter a full or relative pathname to store backup copies of your work.
            If the specified directory contains no directories a prompt appears asking
            for the number of backup cycles to create. This creates a directory of
            the form:
            
                    C:\backup\cycle1\
                             \cycle2\
                             \cycle3\
            
            In this scheme, the fourth backup will be placed in the cycle1 subdirectory
            and overwrite the first backup. Backup cycles are advanced by manual saving
            (Ctrl S or File,Save), and by exiting the editor, not by autosave. Autosave
            overwrites at most one backup cycle entry per edit session/manual save.

            Backup files are created with the same filename as the original.
            Notes: Enter "backup" as a relative pathname to create a backup subdirectory
            in every directory worked in. Note that attempting to use eg "..\..\backup" 
            to keep backups separate will place backups for, say, project\GUI\taskbar.e
            in project\backups which is unlikely to be the intent and is therefore
            discouraged.
            Using a relative pathname also causes the number of backup cycles to create
            prompt to appear each time a file in a different directory is opened, and 
            clutters the workspace by having a backup directory in every directory of
            the project. On the other hand, a single central backup does mean that all
            backups of commonly named files from project1, for example readme.txt, are 
            overwritten when work starts on project2.

            If the backup directory field is left blank no backups are maintained.
            
        List/Restore
            Press this button to open a list of dates, times and file sizes of recent
            backups of the currently open file. Click on an entry or cursor to it and 
            press Enter, confirm the restore in the warning window which appears, and 
            the selected backup will be restored to the current open file.
            Note that a restore operation will advance the backup cycle to permit the 
            version immediately prior to the restore operation to later be restored,
            should it become necessary.
                

        STANDARD DISCLAIMER: DO NOT RELY ON THIS MECHANISM TO PRESERVE IMPORTANT FILES! 
        ALWAYS MAKE A COPY OF VALUABLE DATA ON REMOVEABLE MEDIA, AND IDEALLY, STORE
        THESE IN A DIFFERENT BUILDING. REMEMBER, NO COMPUTER PROGRAM CAN PROTECT AGAINST
        POWER SURGES, HARD DISK FAILURE, FIRE, FLOOD, OTHER ACTS OF GOD, AND USER ERROR.


    Colours
        When this option is selected a window appears allowing the user to set the
        colours for syntax highlighting, font size, tabwidth, and bold.

        Select an entry in the word type list (keywords, builtins, other, symbol,
        brace, string, comment, win32lib, glocal, Background, Highlight text, 
        Highlight back[ground], Cursor) and click on one of the available colours
        in the palette to the right.

        The preview area is updated to show the changes.

        Note that if you accidentally set the background colour to be the same as a
        colour already used for a different word type, or vice versa, the latter is
        automatically changed to the first unused colour so that the text does not
        become totally invisible.
        
        The preview area is also changed when the font size, tab width, or bold 
        settings are changed.

        NOTE: win32lib and glocal (locally defined global routines) can require large
        files to be loaded on startup. On a 233MHz PC with 48MB of ram, this can be as
        much as ten seconds initial penalty plus up to five seconds when opening a large
        file. If needed, this time penalty (along with the benefits of extra colouring 
        and Context Sensitive help) can be removed by setting the colours for win32lb
        and/or glocals to the same as "other" (ie the third entry in the list, as opposed
        to "same as each other").

    Files
        When this option is selected a window appears allowing the following settings
        to be changed:

        Restore files on open?
            When this option is checked, the editor saves a list of all open files in
            the editor.ini file and these are automatically re-opened the next time
            the editor is invoked.

        Auto save files on exit?
            When this option is checked, the standard "save changes to xxx?" dialogue
            does NOT appear for each file modified but not saved, instead the changes
            are saved automatically, with no warning.
            Personally, I recommend this option is left unchecked.

        Load ex.err after error run? (see manual)
            If this option is checked, the editor tries to detect when the invoked 
            program has terminated in error. To achieve this, it must wait for a result
            code (from system_exec()) and hence the editor becomes inoperative until the
            invoked application terminates. The editor is also made invisible while it
            is inactive. If the invoked program fails in error, the appropriate ex.err 
            file is automatically loaded and displayed in the editor.

            NOTE: when this option is checked it is not possible to use the editor in any
            way, for example to examine the code or say correct a minor spelling mistake,
            until the invoked application is closed.
            
            If this option is left unchecked (the default), the editor remains active, but
            performs no special handling when an error occurs in the invoked application.
            To open the ex.err file the programmer must key F12.

            NOTE: when this option is unchecked it becomes very easy to accidentally leave 
            several copies of the application being developed all running at the same time.
            It is the programmers responsibility to close each instance before continuing
            to edit the application sources.
            
            Whether the editor has automatically opened the ex.err file or the user has
            keyed F12 after an error has occured, the user can simply press F12 on any line 
            with a filename and line number in it to open (if necessary) the indicated file
            and jump to the line on which the error occured.

            When the cause of the error appears to be in a calling routine, the user can
            simply return to the ex.err file tab, cursor down to the next "...called from"
            entry and press F12 on that line to jump directly to the file and line shown.

        Replace tabs with spaces when saving file?
            Setting this option guarantees that the file will look the same when loaded
            into another editor with different tab settings.

            Leading spaces are always replaced with tabs when loading files.


    Horizontal Scroll bar
        When this option is checked, and the current file contains a line which is
        too wide to fit completely on the screen (whether or not that line is 
        currently visible on the screen), a horizontal scroll bar is shown.

    Single Instance
        When this option is checked(recommended), the editor checks to make sure no
        other copy of the editor is running in memory. If a copy of the editor is 
        already running, it passes a message to that copy to open the selected file
        (if any) and forces that copy to the foreground.

        TIP: Place a shortcut to the editor on the windows start menu. In my case I have
        already associated .exw files with c:\euphoria\bin\exw.exe so my shortcut is 
        just C:\editor\editor.exw; if that does not work on your system you may need to 
        enter C:\euphoria\bin\exw.exe C:\editor\editor.exw. Put a shortcut key to it by
        amending properties, in my case I chose ctrl-alt-E. Pressing that shortcut key
        now automatically finds and switches to the editor which is quite handy when
        there are several other programs running.
        

*   References[not implemented]
        When this option is checked, the location of various help documents can be
        defined...

        
    Status bar
        When this option is checked a status bar is shown at the bottom of the window.
        The contents are described in detail above, in section 3 of this document.


    Syntax Colouring
        Select this option to toggle the syntax colouring on and off.
        This may make text files such as this document easier to read.
    

6.5 Help
========

*    NOTE: These entries are defined using Options, References. The default entries are:

    Context/Keyboard (F1)
    =====================
        When context-sensitive help has been previously built (using the Parse for context
        Sensitive Help option on the tools menu), and a suitable context can be found from
        the current cursor position, a definition of the routine is displayed with:

            The full path and name of the defining source,
            procedure, type, or function,
            The list of parameters,
            Any descriptive comments found in the source (those beginning in column 1, in
            the case of win32lib preceding the routine definition, for all other sources
            following the routine definition).

        and three buttons:

            Examine code (disabled for builtin routines), which opens the appropriate source
            and jumps to the routine.
            Close - self explanatory, and
            Keyboard help, which displays a window showing a summary of the function keys.

        Keyboard help, that is a simple summary of keystrokes and their editing function,
        is displayed initially when no context specific help is found.

        The context sensitive and keyboard help screen can be resized or scrolled as needed.

        Note that context-sensitive help only examines the current line, so for example:

            void=message_box("Program has finished doing whatever it was doing, \n\r" &
                             "and therefore this message has appeared to tell the \n\r"&
                             "user about something or other",
                             "Message from the program",
                             MB_ICONEXCLAIMATION + MB_OK)

        If you cannot offhand remember the MB_ combination you need, cursor up four lines
        before pressing F1.

        See also Parse for Context Sensitive Help in section 6.3.

    Euphoria Reference Manual
    =========================
        Opens the html version of the euphoria language manual in the system web browser.
        Note that environment variable EUDIR must be correctly set for this to work.
                            
    Editor Manual
    ==============
        Displays this text, as located in the directory the editor program itself has been
        run from.

    Recent User Contributions
    =========================
        Invokes http://www.rapideuphoria.com/contrib.htm in your web browser.
        This allows you to search for example code contributed by Euphoria users.
    
    Search Mailing List Archive
    ===========================
        Invokes http://www.rapideuphoria.com/listserv.htm in your web browser.
        This allows you to search the mailing list archive of over 45,000 messages posted
        in the last 6 years.

    w32Hflags
    =========
        Lists some win32lib constants and their values. If you press backtab, cursor to the
        required constant and press Enter, the selected flag will be placed in the clipboard
        [Ed: improvements are possible; suggestions are welcome!]
        
    About
    =====
        Displays credits and copyright information


7. Windows Integration
======================

    This section details changes that can be made to a standard Windows installation
    to enhance the integration with the editor. There are no plans at present to
    automate these changes.

    Disclaimer.
    ==========
        As with the editor itself, and doubly for these changes, there is no liability
        for damage or consequential loss any of the following actions may cause.

        This information has been taken from the Euphoria mailing list, where no
        disagreement was posted in reply, which indicates no-one had any problems
        following the advice given. However they have not been tested by me.

    File associations
    =================
        [In win98 this can also be done manually: Explorer, View, Folder Options, File Types]
        Paste the following text into a new file and save it as Eu.reg:
REGEDIT4

[HKEY_CLASSES_ROOT\.e]
@="Eu DOS include"

[HKEY_CLASSES_ROOT\EU DOS include\DefaultIcon]
@="C:\\Euphoria\\BIN\\Ex.exe,1"

[HKEY_CLASSES_ROOT\EU DOS include\shell\open\command]
@="C:\\Euphoria\\bin\\exw.exe C:\\Editor\\Editor.exw \"%1\""



[HKEY_CLASSES_ROOT\.ex]
@="Eu DOS program"

[HKEY_CLASSES_ROOT\EU DOS program\DefaultIcon]
@="C:\\Euphoria\\BIN\\Ex.exe,1"

[HKEY_CLASSES_ROOT\EU DOS program\shell\open\command]
@="C:\\Euphoria\\bin\\ex.exe \"%1\""

[HKEY_CLASSES_ROOT\EU DOS program\shell\edit\command]
@="C:\\Euphoria\\bin\\exw.exe C:\\Editor\\Editor.exw \"%1\""

[HKEY_CLASSES_ROOT\EU DOS program\shell\bind\command]
@="C:\\Euphoria\\bin\\bind.exe \"%1\""



[HKEY_CLASSES_ROOT\.ew]
@="Eu Win include"

[HKEY_CLASSES_ROOT\EU Win include\DefaultIcon]
@="C:\\Euphoria\\BIN\\Exw.exe,1"

[HKEY_CLASSES_ROOT\EU Win include\shell\open\command]
@="C:\\Euphoria\\bin\\exw.exe C:\\Editor\\Editor.exw \"%1\""



[HKEY_CLASSES_ROOT\.exw]
@="Eu Win program"

[HKEY_CLASSES_ROOT\EU Win program\DefaultIcon]
@="C:\\Euphoria\\BIN\\Exw.exe,1"

[HKEY_CLASSES_ROOT\EU Win program\shell\open\command]
@="C:\\Euphoria\\bin\\exw.exe \"%1\""

[HKEY_CLASSES_ROOT\EU Win program\shell\edit\command]
@="C:\\Euphoria\\bin\\exw.exe C:\\Editor\\Editor.exw \"%1\""

[HKEY_CLASSES_ROOT\EU Win program\shell\bind\command]
@="C:\\Euphoria\\bin\\bindw.exe \"%1\""


        Change the directories C:\\Euphoria and C:\\Editor to match those you have installed
        the euphoria runtime and the editor to. Note that double backslashes are required.
        If you have installed the bound executable, rather than the source/shrouded version,
        you will need to change eg "C:\\Euphoria\\bin\\exw.exe C:\\Editor\\Editor.exw" to
        just "C:\\Editor\\Editor.exe" or the equivalent.
        Simply double click on the file in explorer to update the registry.

        With these registry entries in place, RunDemos (distributed with win32lib) should
        invoke the editor rather than wordpad when right clicking on an example.
        [mods posted 18/11/02, asked for inclusion in next release of win32lib]

        Additionally drag editor.exw onto the start button, to add a new entry to the start
        menu, and amend it (right click, properties) to change the shortcut key to Ctrl Alt 
        E. With single instance handling enabled, that key combo will start up or return to 
        the editor automatically no matter what program is currently running.


    The Euphoria system variables EUDIR and EUINC
    =============================================
        These should be set automatically by the installation of the Euphoria Interpreter.
        If they have not been, then the editor will not be able to find the bind and/or
        shroud routines, the program you are writing will not be able to find many of the
        standard builtin functions that come with euphoria, and the editor will not be able 
        to open the euphoria reference manual automatically.
        After creating a bootable floppy containing a backup of C:autoexec.bat, look for 
        and if necessary edit lines of the form:
            SET EUDIR=C:\EUPHORIA
            SET EUINC=C:\EUPHORIA\INCLUDE\WIN32LIB
        Note this procedure is slightly different on windows 2000/XP.


    Repeat key.
    ==========
        [win 98: start/settings/control panel/keyboard/speed]
        I suggest you ensure that the Repeat rate is not so high that pressing and holding
        the downarrow key for several seconds causes a long run-on when you release it;
        i.e. the setting should not be higher than the editor running on on your PC can
        handle. Five, Ten, or even Fifteen lines of run-on is not really a problem; four
        or five hundred can happen on a really slow machine with repeat set on max.
        If you have a 2GHz box with 512MB of RAM you will not have this problem!


Known Bugs
==========

All software has bugs. Please report any problems to the Euphoria mailing list.
Please do not post any attachments to the mailing list, large or small.

Please save a copy of any relevant files, especially the ex.err if any, in case you are 
later asked for them. Please try to reproduce the problem consistently while it is fresh
in your mind.

Running a program resizes the edit window when control returns. To reproduce:
Maximise the edit window. Press F5 to run an application, Click on the editor button on 
the taskbar (not much happens apart from the taskbar of the running application dims),
click on the application button on the taskbar, then close the application.
The editor is redisplayed restored instead of maximised.
(Since I cannot track the problem down, I am afraid you will have to live with keying
Alt-space, X once in a while to re-maximise the editor.)
Any help in solving this problem would be greatly appreciated.


See also devnotes.txt, and check the preceding section for hints and tips.

Future enhancements
===================

Print Preview. From what I've seen, not trivial.

Macro. The current form is *very* basic. I'll wait for feedback before planning any 
improvements in this area.

Project details. Basically a list of all the files/directories of interest, mainly so that
when editing a routine the editor can know which main.exw to run without it having to be 
the open filetab - I've long since lost count of how many times I've pressed F5 to get a 
dos finished window since the file I'm actually editing has no main() or equivalent 
statement, just routines.

See also devnotes.txt

Any other suggestions welcome.

--------------------------