home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / EPMASI.ZIP / MYASSIST.DOC < prev    next >
Text File  |  1993-03-29  |  7KB  |  170 lines

  1. **********************************************************************
  2.                  E3/EOS2/EPM SYNTAX ASSISTANCE VERSION 2.0
  3.                    SVEN GUYET, 03/92  (DSGUYE AT DUESVM1)
  4. **********************************************************************
  5.  
  6.  
  7. INTRODUCTION:
  8.  
  9. In E3/EOS2/EPM, there are different syntax assistance tools to make
  10. things easier when editing files of a special type. The standard E
  11. macros include assistance for C, PASCAL and E programmers. EBOOKIE
  12. is a package on PCTOOLS to support editing of BOOKMASTER documents.
  13.  
  14. But, there's no easy way for any E user to create his own syntax
  15. assistance file with his own keywords.
  16.  
  17. Ta-da |||  Here it is |||
  18.  
  19. MYASSIST gives you the ability to create your own syntax assistance
  20. file with your favourate abbreviations and their corresponding
  21. replacements. The next time you edit a file with E3/EOS2/EPM,
  22. you simply type the abbreviation, press ALT-H, and MYASSIST does
  23. the rest (replaces the shortcut).
  24.  
  25. Beginning with MYASSIST version 2.0, the syntax assistance file
  26. MYASSIST uses depends on the extension of the file you are currently
  27. editing. That means, abbreviations within ".C" files are
  28. processed with a different syntax assistance file compared to
  29. abbreviations within ".SCR" files.
  30.  
  31. A default syntax assistance file name may be configured which
  32. is used for filetypes with no special abbreviations file.
  33.  
  34. Although support for PM programming was my primary intent, it is
  35. possible to use MYASSIST for many other purposes to save keystrokes.
  36. It allows you to abbreviate a command often used during an edit
  37. session, press ALT-H and let MYASSIST find out what you really
  38. wanted to type in.
  39.  
  40. All you have to do is to create one or more files in which both
  41. the desired abbreviations and the corresponding commands are defined.
  42. The actual cursor position after the replacement may be defined
  43. by putting the block character with ASCII code 178 at the
  44. desired position within the replacement string.
  45.  
  46. If you like to have different abbreviations for the same
  47. thing, just put them into consecutive lines and let the
  48. corresponding commands follow the last abbreviation.
  49.  
  50. NOTE: o EACH LINE MAY HOLD ONLY ONE ABBREVIATION |||
  51.  
  52.       o ABBREVIATIONS USED MORE THAN ONCE IN YOUR SYNTAX ASSISTANCE
  53.         FILE ARE REPLACED BY ALL OF THE GIVEN DEFINITIONS |||
  54.  
  55. The following examples for syntax assistance files come with
  56. MYASSIST:
  57.  
  58. 1.) OS/2 API FUNCTION CALLS
  59.     Programming under OS/2, especially when developing applications
  60.     running under the OS/2 Presentation Manager, requires a new kind
  61.     of programming style. For beginners the first barrier is the
  62.     tremendous quantity of new subroutines which come with OS/2 and
  63.     PM. For advanced programmers it is of course intricate to
  64.     remember the various syntax rules.
  65.  
  66.     As a little help, ALL API function calls coming with
  67.     OS/2 1.3 EE are defined in
  68.      o OSAPI.ASI (Dev, Dos, Kbd, Mou, Pic, Prf, Spl, Vio)
  69.      o PMAPI.ASI (Gpi, Win, and some PM stuff)
  70.     For all functions, two abbreviations are given. The first is
  71.     the function name itself, the second is an abbreviated name
  72.     using only the uppercase characters of the function name.
  73.  
  74.     So, if you want to code a WinCreateStdWindow in your PM program,
  75.     type WCSW and press ALT-H. MYASSIST inserts the procedure call
  76.     and positions the cursor at the first parameter within the
  77.     parenthesis.
  78.  
  79.     You can also type WinCreateStdWindow or WINCREATESTDWINDOW
  80.     or wincreatestdwindow to get the same result.
  81.  
  82. 2.) CSYNTAX.ASI
  83.     For all of you who don't like the style of E's standard C syntax
  84.     assistance, have a look at CSYNTAX.ASI, modify the contents to
  85.     your needs, rename the file to MYAS_C.ASI and use MYASSIST instead
  86.     of C_SYNTAX_ASSIST.
  87.  
  88. 3.) BOOKIE.ASI
  89.     Supports editing of DCF/GML or BOOKMASTER files.
  90.  
  91. 4.) MYSYNTAX.ASI
  92.     A skeleton for any other syntax assistance file.
  93.  
  94.  
  95. HINTS:
  96.  
  97. Since MYASSIST supports only one syntax assistance file to be
  98. active at a time, you may like to copy the contents of CSYNTAX.ASI,
  99. OSAPI.ASI (and, perhaps, PMAPI.ASI) into a single file named
  100. MYAS_C.ASI. The only disadvantage of using large assistance files
  101. is the slower performance when pressing ALT-H. Also, you may run into
  102. a insufficient memory problem when MYASSIST tries to load the
  103. assistance file.
  104.  
  105.  
  106. PREREQUISITES:
  107.  
  108. One of the E-editor versions found on PCTOOLS with the corresponding
  109. macro files. See E3, EOS2 or EPM package on PCTOOLS/OS2TOOLS.
  110.  
  111.  
  112. INSTALLATION:
  113.  
  114. 1.) Download MYASSIST.FLS as binary onto your PC and unpack the files
  115.     with LOADRAM2 to get
  116.          MYASSIST.E    (E code for syntax assistance)
  117.          OSAPI.ASI     (example file for OS/2    programming support)
  118.          PMAPI.ASI     (example file for OS/2 PM programming support)
  119.          CSYNTAX.ASI   (example file for C       programming support)
  120.          BOOKIE.ASI    (example file for DCF/GML/BOOKMASTER editing)
  121.          MYSYNTAX.ASI  (example skeleton file)
  122.     Note: Please make sure to use the latest LOADRAM2 version (2.0u+).
  123.  
  124. 2.) Insert the line
  125.          WANT_MY_ASSIST = 1
  126.     in the "const" section of your MYCNF.E as well as the lines
  127.          compile if defined (WANT_MY_ASSIST)
  128.             compile if WANT_MY_ASSIST
  129.                include 'myassist.e'
  130.             compile endif
  131.          compile endif
  132.     at the start of one of your other "MY"-files, preferable in
  133.     MYKEYS.E. Now, if you wish to leave out MYASSIST temporarily,
  134.     you can simply set WANT_MY_ASSIST to 0 in your MYCNF.E, and it
  135.     will be omitted.
  136.  
  137.     You may also set the constant "my_syntax_filename" in your
  138.     MYCNF.E to the default syntax assistant filename of your choice
  139.     if you don't like the predefined value which is "MYSYNTAX.ASI".
  140.     For fastest loading my_syntax_filename should include the full
  141.     path (otherwise it is searched along the DPATH, EPATH and PATH).
  142.  
  143. 3.) Recompile the new E configuration with ET.EXE or ETPM.EXE for
  144.     the Presentation Manager version.
  145.  
  146. 4.) The syntax descriptions used within a file with the extension
  147.     ".XXX" have to be defined in the syntax assistance file
  148.     "MYAS_XXX.ASI". See "MYSYNTAX.ASI" coming with this package for
  149.     further informations.
  150.  
  151. To get syntax assistance during an edit session, type the abbreviated
  152. keyword and press press ALT-H. The cursor position must be WITHIN
  153. or ON ONE OF THE BLANKS AFTER the desired keyword prior pressing
  154. ALT-H.
  155.  
  156. To change the default syntax assistance filename, type 'sf' or
  157. 'syntaxfile' followed by the new filename at the command line.
  158.  
  159. To get information about the actual default syntax assistance filename,
  160. type 'sf' or 'syntaxfile' without any parameters at the command line.
  161.  
  162.  
  163. SUPPORT:
  164.  
  165. Bugs, hints and/or improvement suggestions should be appended in the
  166. EOS2 FORUM or sent to DSGUYE at DUESVM1 via VNET. If you should write
  167. other useful syntax assistance files please send them to me.
  168. I will include them in the package if I think they are of common
  169. interest.
  170.