home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / dos / tools / aurora21 / tips.dox < prev    next >
Text File  |  1995-08-10  |  18KB  |  430 lines

  1.  
  2.  
  3. Miscellaneous Aurora User Tips
  4. ──────────────────────────────
  5. This file contains a few miscellaneous Aurora user tips which you may
  6. wish to review. For complete documentation on how to install and use
  7. Aurora, see the Aurora Editor Users Guide (USER.DOX). Note that any key
  8. definitions shown here are the Aurora-style defaults.
  9.  
  10.  
  11. Basic Configuration
  12. ───────────────────
  13.  ∙ The editor should always be installed in an empty directory. Never
  14.    mix files from different editor versions.
  15.  
  16.  ∙ Whenever you make a change to any of the editor configuration files
  17.    (such as CONFIG.AML, KBD.AML, MENU.AML, etc.), you must enter the
  18.    'recompile' command ('Recompile the editor' <alt f2> on the Set menu)
  19.    for your changes to take effect.
  20.  
  21.  ∙ If you prefer to start Aurora by another name, you can simply rename
  22.    the file A.EXE to whatever you wish (such as E.EXE). Do not rename
  23.    any other files distributed with the editor.
  24.  
  25.  ∙ You can re-install Aurora by selecting 'Run installation' from the
  26.    'Macro List..' menu (on the Macro menu).
  27.  
  28.  
  29. The Keyboard
  30. ────────────
  31.  ∙ When adding new key definitions to KBD.AML, be sure to place each
  32.    definition in the appropriate 'object' for the window in which you
  33.    would like the key to be active. For most editing key definitions,
  34.    this will be the 'edit' object.
  35.  
  36.  ∙ If you have added or changed keyboard definitions, you will probably
  37.    also want to change any Menu definitions which show the old keys.
  38.  
  39.  ∙ To prevent the editor from using the keypad <grey/>, <grey*>,
  40.    <grey->, and <grey+> keys as function keys, simply remove these
  41.    function key definitions from KBD.AML. Be sure to remove them from
  42.    within both the 'prompt' and 'edit' objects.
  43.  
  44.  ∙ To execute a key or macro function from the DOS command line, use the
  45.    '-e' command line option. Key or event names must be enclosed in
  46.    double quotes. For example:
  47.  
  48.      C>a -emymacro
  49.         // executes the function 'mymacro' after the editor is started
  50.  
  51.      C>a -e"<shift f1>" -e"<alt =>"
  52.         // simulates <shift f1>, <alt => after the editor is started
  53.  
  54.  ∙ New keyboard layouts for other editors/word processors may be added
  55.    periodically to the Aurora Support BBS (see READ.ME for access
  56.    details). Check the BBS if your favorite layout is not included in
  57.    the distributed version of Aurora.
  58.  
  59.  
  60. The Mouse
  61. ─────────
  62.  ∙ If windows scroll too fast when using the mouse, change the
  63.    'MouDelay' setting in CONFIG.AML to a higher value.
  64.  
  65.  ∙ To hide the mouse pointer whenever a key pressed, change the
  66.    'MouseOpt' setting in CONFIG.AML to 'd'.
  67.  
  68.  
  69. The Menus
  70. ─────────
  71.  ∙ If part of a pull-down menu is displayed off the edge of the screen,
  72.    you can use the mouse to grab the menu border and drag the menu to a
  73.    better position.
  74.  
  75.  ∙ To hide the menu bar so that it is only displayed when <esc> or the
  76.    right mouse button is pressed, remove 'm' from the 'EditStyle'
  77.    setting in CONFIG.AML.
  78.  
  79.  ∙ To jump quickly to a file within a file picklist or the file manager,
  80.    enter the first letter of the desired filename repeatedly until the
  81.    cursor is positioned at the file.
  82.  
  83.  
  84. Prompts
  85. ───────
  86.  ∙ The ASCII Chart <alt => can be displayed from within a prompt and
  87.    used to enter any character. The 'literal' <ctrl [> command can also
  88.    be used to enter any character in a prompt. In addition, you can
  89.    enter any character by holding down the <alt> key, then entering the
  90.    decimal ASCII value of the character on the keypad, and then
  91.    releasing the <alt> key.
  92.  
  93.  ∙ Use <pgup> or <pgdn> within a prompt, or press the left mouse button
  94.    on the retrieve tab () to display a popup menu of all prompt
  95.    history. You can enter a history string into the prompt by pressing
  96.    the <enter> key or the left mouse button.
  97.  
  98.  ∙ Use the 'Prompt Style' command on the Window menu to sample the four
  99.    editor prompt styles. To change the default prompt style when the
  100.    editor is started, see the 'PromptStyle' configuration setting in
  101.    CONFIG.AML.
  102.  
  103.  ∙ To move the cursor a relative number of lines away from the current
  104.    position in the 'goto line' <ctrl j> prompt, specify '+' or '-'
  105.    before the line number.
  106.  
  107.  ∙ The 'Macro Expression' prompt <ctrl v> on the Macro menu can be used
  108.    as a command line calculator, since the macro language compiler and
  109.    interpreter are available at this prompt. For example:
  110.  
  111.      Macro Expression>  say 1 + 2 + 30 - 40    <enter>
  112.        // displays -7
  113.      Macro Expression>  msgbox (4 * 15) mod 7  <enter>
  114.        // displays 4
  115.      Macro Expression>  write 1 + 2 * 3 + 4    <enter>
  116.        // enters the string '11' at the cursor
  117.  
  118.  
  119. The Desktop
  120. ───────────
  121.  ∙ You can prevent windows from remembering their sizes, cursor
  122.    positions, and settings by changing the 'SavePosition' setting in
  123.    CONFIG.AML to 'n'.
  124.  
  125.  ∙ To use the existing DOS screen as the editor background when the
  126.    editor is started, change the 'VidStr' setting in CONFIG.AML to ''
  127.    (null).
  128.  
  129.  ∙ If your video card supports special video modes such as 132 x 43, you
  130.    can use these video modes within the editor by setting the 'VidCols'
  131.    and 'VidRows' in CONFIG.AML to zero. Then set the desired video mode
  132.    in DOS before starting the editor.
  133.  
  134.  ∙ Use the 'showentry' command to display the screen as it appeared in
  135.    DOS before the editor was started.
  136.  
  137.  
  138. Syntax Highlighting
  139. ───────────────────
  140.  ∙ To conserve editor resources, include only the syntax highlighting
  141.    definitions in SYNTAX.AML that you actually use.
  142.  
  143.  ∙ Additional syntax highlighting definitions are containing in the file
  144.    SYNTAX2.AML.
  145.  
  146.  ∙ If you are using syntax highlighting with multi-line comments in your
  147.    program source code, you may wish to increase the number of lines to
  148.    scan backward in SYNTAX.AML, for the file extension you are editing.
  149.    Note however, that this will decrease scrolling performance for
  150.    highlighted files.
  151.  
  152.  ∙ The 'hiliteword' <ctrl \> command highlights all occurrences of the
  153.    word at the cursor. This can be very useful for finding instances of
  154.    a word in a document, or marking occurrences of variables, functions,
  155.    or other identifiers in your program source code.
  156.  
  157.  ∙ Individual keywords can be highlighted in colors different from the
  158.    default keyword color by treating the keyword as an object variable
  159.    and assigning it the desired color attribute. For example, in
  160.    SYNTAX.AML:
  161.  
  162.      keyword
  163.        .
  164.        .      // end of keyword list
  165.  
  166.      _if   = color brightred on blue
  167.      _else = color yellow    on blue
  168.  
  169.  
  170. History
  171. ───────
  172.  ∙ To erase all of your existing prompt history, window positions, etc.,
  173.    simply delete HISTORY.DAT after you have exited the editor.
  174.  
  175.  ∙ Do not attempt to manually update the history file HISTORY.DAT. This
  176.    file is automatically updated by the editor during normal usage.
  177.  
  178.  
  179. Opening Files
  180. ─────────────
  181.  ∙ To open a file manager window for the current directory from the DOS
  182.    command line, enter "a .".
  183.  
  184.  ∙ To open a file from the DOS command line and place the cursor on a
  185.    specific line, enter the option 'l' followed by the line number. For
  186.    example:
  187.  
  188.      C>a myfile.txt/l253
  189.        // opens 'myfile.txt' and places the cursor on line 253
  190.  
  191.  ∙ To open a binary file from the DOS command line or the Open prompt
  192.    ('askopen' <alt e> on the File menu) using a specific line length,
  193.    enter the option 'b' followed by the line length. For example:
  194.  
  195.      C>a myfile.txt/b240
  196.        // opens 'myfile.txt' in binary mode with a fixed line length
  197.        //   of 240
  198.  
  199.  ∙ To configure the editor so that tab characters (ASCII 9) are
  200.    automatically expanded when files are opened, see example 21 of
  201.    EXAMPLE.AML in the MACRO subdirectory.
  202.  
  203.  ∙ If you are using Aurora in an MS Windows 3.x DOS box running in
  204.    enhanced mode, you can transfer up to 16k of text data to and from
  205.    the Windows clipboard. This is done by loading from or saving to a
  206.    file with the special drive name: ^. For example, from the Open and
  207.    Insert and Save block prompts:
  208.  
  209.      File to insert in MYFILE.TXT>  ^:c
  210.        // insert the contents of the Windows clipboard after the cursor
  211.  
  212.      Save block as>  ^:c
  213.        // copy marked text to the Windows clipboard
  214.  
  215.  
  216. Searching
  217. ─────────
  218.  ∙ Frequently-used search strings can be saved in a separate file and
  219.    copied to a find prompt as needed by using the 'copyblock2' <alt c>
  220.    or 'paste' <grey*> commands. This can be especially convenient for
  221.    long or complex regular expression patterns.
  222.  
  223.  ∙ To count the occurrences of a search string, use the 'a' search
  224.    option. For example:
  225.  
  226.      Find>  gizmo/a  <enter>
  227.        // displays the number of occurrences of the word 'gizmo'
  228.        //   from the cursor to the end of the file
  229.  
  230.  ∙ Use regular expression searching to search for the beginning and/or
  231.    end of lines. Do not attempt to search for line delimiter characters
  232.    (such as carriage returns and linefeeds) in non-binary files. In the
  233.    normal, non-binary editing mode, line delimiter characters are
  234.    removed from the end of each line when the file is loaded and
  235.    re-appended to the end of each line when the file is saved.
  236.  
  237.  ∙ The 'Find Occurrences' <ctrl h> command can be useful for extracting
  238.    lines from a flat database file that match search criteria. For
  239.    example:
  240.  
  241.      Find Occurrences of>  Joe/b
  242.        // extract all lines where 'Joe' is found within a column mark
  243.  
  244.  ∙ The 'Find Occurrences' <ctrl h> command can be used together with
  245.    regular expression searching to display a list of function headers in
  246.    your program source code. For example:
  247.  
  248.      Find Occurrences of>  ^[a-zA-Z_].*\(.*[~;]$/x
  249.        // finds C/C++ function definitions beginning in column 1
  250.  
  251.      Find Occurrences of>  ^ *{function}|{key}.*$/x
  252.        // finds AML function and key definitions
  253.  
  254.  ∙ Selecting a file from a file manager scan window (generated by the
  255.    'askscan' <ctrl s> command) will position the cursor to the first
  256.    occurrence of the scan search string. Use the 'findlast' <ctrl l>
  257.    command to find other occurrences.
  258.  
  259.  
  260. Manipulating Text
  261. ─────────────────
  262.  ∙ The 'quote' <shift f9> and 'commentline' <alt f1> commands can both
  263.    be used for simple text quoting. <shift f9> performs block quoting,
  264.    while <alt f1> quotes and unquotes text on a line-by-line basis.
  265.  
  266.  ∙ The editor is configured at installation to use 'live word wrap' when
  267.    <ctrl w> is pressed. If you prefer the standard old-style word wrap,
  268.    change the definition of <ctrl w> in KBD.AML to:
  269.  
  270.      key  <ctrl w>    setting 'W' TOGGLE   // toggle standard word wrap
  271.  
  272.  ∙ To reformat all of the text in a file, mark the entire file using the
  273.    'markline' <alt l> command, and then enter the 'Reformat' command
  274.    <alt r> on the Block menu.
  275.  
  276.  ∙ The 'fillblock2' <ctrl k><f> command can be used to fill a marked
  277.    block with a repeating character or string. For example: to fill
  278.    columns 40-47 of a data file with the date 12/25/96, mark the
  279.    desired columns by using the 'markcolumn' command <ctrl b>, and then
  280.    enter the date at the 'fillblock2' prompt.
  281.  
  282.  ∙ The clipboard Cut Append <ctrl grey-> and Copy Append <ctrl grey+>
  283.    commands can be very useful for gathering separate blocks of text and
  284.    grouping them together in the clipboard.
  285.  
  286.  ∙ To expand tab characters (ASCII 9) in the current file, use the
  287.    'tabfile' <ctrl k><x> command.
  288.  
  289.  ∙ Have you ever been prompted to save changes in a file, and you forgot
  290.    what changes you just made? Try using the undo/redo feature to review
  291.    your changes. Just cancel the 'save' prompt and use the undo <ctrl u>
  292.    and redo <ctrl y> commands to backtrack and retrace your changes
  293.    before exiting.
  294.  
  295.  ∙ To the change the line delimiter that a file is saved with, load the
  296.    file into the editor, change the current 'Line Delimiter' setting (on
  297.    the Set menu) to the new line delimiter, and save the file.
  298.  
  299.  ∙ To disable CUA-style <shift> key marking, remove the 'smark' command
  300.    from all key definitions in KBD.AML.
  301.  
  302.  ∙ Use the 'markpara' <alt 3> command to quickly mark the paragraph at
  303.    the cursor.
  304.  
  305.  ∙ To rearrange all the words in a paragraph in sorted order:
  306.  
  307.      1. Use the 'markcolumn' <alt b> command to mark column 1 of the
  308.         entire paragraph.
  309.      2. Enter the 'formatblock2' command <alt r> to place each word on
  310.         separate line.
  311.      3. Enter the 'markpara' <alt 3> command to re-mark the separated
  312.         paragraph with a line mark.
  313.      4. Set Insert mode ON to ignore case during the sort.
  314.      5. Enter the 'sortblock2' <ctrl k><o> command to sort the words.
  315.      6. Enter the 'formatblock2' command <alt r> to re-join all
  316.         separated lines back together into a paragraph.
  317.  
  318.  ∙ To view or edit a new location in the same file and then return to
  319.    the original location at a later time, use one of the following
  320.    techniques:
  321.  
  322.      1. Make a copy of the current edit window by entering the <copywin>
  323.         <ctrl c> command ('Copy' on Window menu), and then move to the
  324.         new location in the file. When you are finished, close the
  325.         copied window with the 'close' <alt q> command to display the
  326.         original window and cursor position.
  327.  
  328.      2. Set a bookmark at the original location using the 'quickbook'
  329.         <ctrl 2> command, and return to it later using the 'cyclebook'
  330.         <ctrl 6> command.
  331.  
  332.  
  333. Working with very large files
  334. ─────────────────────────────
  335.  ∙ If you are performing extensive 'search and replace all' operations
  336.    in a very large file, or you are making other large-scale changes to
  337.    the file, you will get better performance if 'Undo' is disabled on
  338.    the Set menu.
  339.  
  340.  ∙ Aurora can be useful for editing very large files when running under
  341.    OS/2 or Windows. Although other editors may exploit the virtual
  342.    memory capabilities of these environments, Aurora uses its own
  343.    virtual memory (optimized for text editing), and will not force other
  344.    OS/2 or Windows applications to be swapped out or discarded when very
  345.    large files are loaded and edited. The 'memoptions' setting in
  346.    SYSTEM.AML should be set to 'o' for the best performance.
  347.  
  348.  ∙ Setting 'memoptions' to 'o' in SYSTEM.AML allows large files to be
  349.    kept open (in DOS) while they are being edited. This feature can
  350.    greatly increase the loading performance for very large files.
  351.    However, in some cases there may be conflicts with other programs
  352.    trying to access the open file. If this is a problem for you, set
  353.    'memoptions' to '' (null).
  354.  
  355.  ∙ Before saving changes to very large files, you may wish to conserve
  356.    disk space by disabling file 'Backup' on the Set menu. Obviously,
  357.    this should only be done if you have backup files elsewhere.
  358.  
  359.  ∙ If you only need to browse the first part of a very large file, or if
  360.    you have started loading a very large file by mistake, you can press
  361.    <ctrl break> to interrupt the loading process at any point. Note that
  362.    the loaded file will be truncated, and you will be prompted with
  363.    "Truncated file - are you sure?" whenever you try to save the file.
  364.  
  365.  
  366. AML Macros
  367. ──────────
  368.  ∙ To obtain context-sensitive help on a macro language statement or
  369.    function at the cursor, press <shift f1> for a brief description, or
  370.    press <shift f2> for extended help. Note that most extension
  371.    functions (EXT.AML source code) are not documented. For these
  372.    functions, the cursor is moved to the function definition in EXT.AML.
  373.  
  374.  ∙ To compile and run an external macro in the current edit window, just
  375.    enter the 'compilemacro2' <shift f10> and 'runmacro2' <shift f11>
  376.    commands. These commands help to simplify macro development and
  377.    testing.
  378.  
  379.  ∙ You can use the 'pickmacro' <shift f12> command to obtain a picklist
  380.    of macros in the MACRO subdirectory. To run a macro from the
  381.    picklist, move the cursor to the desired macro and press the <enter>
  382.    key or click the left mouse button. The 'runmac "maclist"' <ctrl f12>
  383.    command displays macros with a brief one-line description.
  384.  
  385.  ∙ Before modifying any internal macro code (EXT.AML, KBD.AML, etc.), be
  386.    sure to make backup copies of your AML files. You should be
  387.    reasonably familiar with the macro language before attempting these
  388.    types of modifications.
  389.  
  390.  ∙ AML has a simpler function call syntax than most programming
  391.    languages. Here are a few things to keep in mind when calling AML
  392.    functions:
  393.  
  394.    If function calls with arguments are used in expressions, the entire
  395.    function call should be enclosed in parentheses, not just the
  396.    arguments. For example:
  397.  
  398.      x = fun1 (1) + fun2 (2, 3, 4);    // BASIC, Pascal, C
  399.      x = (fun1 1) + (fun2 2 3 4)       // AML
  400.  
  401.    Function calls which have no arguments, and which are preceded or
  402.    followed by operators, do not need parentheses:
  403.  
  404.      x = fun1 () + fun2 ();     // BASIC, Pascal, C
  405.      x = fun1 + fun2            // AML
  406.  
  407.    If a single function call is an argument to another function, and is
  408.    not preceded or followed by an operator, then it must be enclosed in
  409.    parentheses. For example:
  410.  
  411.      x = fun1 (1, fun2 (), fun3 (2, 3, 4));   // BASIC, Pascal, C
  412.      x = fun1 1 (fun2) (fun3 2 3 4)           // AML
  413.  
  414.  ∙ The 'key' statement is terminated by the keywords 'end', 'key', or
  415.    'function', but not by the keyword 'object'. For example:
  416.  
  417.      key <alt c>   copy          // key definition for <alt c>
  418.      key <alt d>   deleteline    // key definition for <alt d>
  419.      end                         // end is required here
  420.  
  421.      object  fmgr                // change the current object
  422.        .
  423.        .
  424.  
  425.  ∙ New macros and AML configuration files will continue to be posted on
  426.    the Aurora Support BBS (see READ.ME for access details). Many of
  427.    these macros may only be available to licensed users. You may wish to
  428.    check the BBS periodically for new macros.
  429.  
  430.