home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / e / ef11.zip / EFMAN.DOC < prev    next >
Text File  |  1993-01-20  |  37KB  |  698 lines

  1.  
  2.          ╔═══════════════════════════════════╗
  3.          ║  EasyFold version 1.1 User Guide  ║
  4.          ╚═══════════════════════════════════╝
  5.  
  6. NOTE: This file is "folded"; edit "FOLD.HLP" for lesson on how to use folds.
  7.  
  8. /*HS!!1*/      1. INTRODUCTION
  9.  
  10. EasyFold is a simple-to-use folding editor. A "conventional editor with folds" rather than a "folding editor".
  11.  
  12. If you don't use folds, EasyFold will operate as an ordinary editor.
  13.  
  14. If you don't already know what folds are, then you can get a demonstration by editing "FOLD.HLP" and following the instructions.
  15.  
  16. Folds put into your files will appear as comments with the format depending on the file extension. For example if the file ends in .BAS (basic) the fold information will appear after REM statements. This means that files edited with EasyFold will compile or run normally. Extensions recognised by easy fold are, .C .CPP .BAS .PAS .ASM .TEX .BAT .PRO and .MOD.
  17.  
  18. /*HH1!1*/      2. FEATURES
  19.  
  20. EasyFold has all the usual features you expect from an editor plus...
  21.  
  22. * Folding. See chapter 4.
  23. * Search and replace across multiple buffers.  See chapter 5.
  24. * Menu or keystroke driven.
  25. * Mouse support.
  26. * Edit up to 100 files at once. See section 3.13.
  27. * Split screen editing.  See section 3.14.
  28. * Live word wrap.  See chapter 6.
  29. * Switchable between line modes inc SVGA modes. See section 13.2.
  30. * Rolling back-up system.  See section 12.3.
  31. * Remembers previous, searched for, strings.  See chapter 5.
  32. * Execute lines as DOS commands.  See chapter 7.
  33. * One and two letter macros.  See chapter 9.
  34. * Repeat macro until fail.  See section 9.6.1.
  35. * Batch mode.  See section 9.6.2
  36. * Mouse macros.  See section 9.5.
  37. * Access to global variables to enhance power of macros. See chapter 9
  38. * Bracket matching.  See section 12.1
  39. * Auto locating files  See section 3.3.6.
  40. * Reconfigurable keyboard.  See chapter 11.
  41.  
  42. /*HH121*/      3. HOW TO EDIT A FILE
  43.  
  44. /*HS!!2*/3.1. Running EasyFold
  45.  
  46. To edit a file, say "TEST.DOC", you type..
  47.  
  48. EF TEST.DOC
  49.  
  50. from the command line.
  51.  
  52. To edit more than one file at a time you simply type the names one after the other separated by spaces. The file names may include wildcard characters, for example
  53.  
  54. EF *.C *.DOC INFO.DAT
  55.  
  56. would be a valid command line. See section 3.13 for how to switch between files.
  57.  
  58. Another way of editing a large number of files from the command line is to make an ASCII file containing the names of the files you wish to edit (one file per line) and then type "ED @XXX" where XXX is the name of the list file.
  59.  
  60. If you type "EF" without any parameters, EasyFold will attempt to load the same files as in the previous editing session.
  61.  
  62. /*HH232*/3.2. Using the Menus
  63.  
  64. /*HS!!3*/    3.2.1. Using the Menus With a Mouse
  65.  
  66. To access the menus with a mouse, first of all move the mouse pointer to the very top line of the screen, a selection of menus will now appear. Click (and release) the mouse pointer on the menu you wish to select. The menu will now appear. You may change menus by moving the mouse pointer along the top line. To select an individual item in a menu, move the mouse pointer over that item and click the mouse button.
  67.  
  68. /*HH3!3*/    3.2.2. Using the Menus From the Keyboard
  69.  
  70. To access the menus from the keyboard press <F1>. A menu will now appear. To choose between different menus use the <Left> and <Right> keys. To select an individial item from a menu either use <Up> and <Down> and then type <Enter> or alterantively simply type the highlighted character in the options.
  71.  
  72. /*HH232*/3.3. Loading and Saving files
  73.  
  74. /*HS!!3*/    3.3.1. Load
  75.  
  76. To load a file, select "Load" from the "File" menu or type <Esc> then <L>. You will the be asked for the name of the file you wish to load. If you have already loaded files via the load command you will be able to recall previous filenames by typing <Up> or <Down>
  77.  
  78. If you enter a name containing wildcard characters you will then be able to select from a menu of files fitting that wildcard.
  79.  
  80. /*HH3!3*/    3.3.2. Save
  81.  
  82. To save a file, select "Save" from the "File" menu or type <Esc> then <S>.
  83.  
  84. /*HH3!3*/    3.3.3. Save and Exit
  85.  
  86. To save a file and immediatly exit the program, select "Save & Exit" from the "File" menu or type <Esc> then <X>.
  87.  
  88. /*HH3!3*/    3.3.4. Save As
  89.  
  90. To save a file under a given name, select "Save As" from the "File" menu or type <Esc> then <A>. You will then be asked to type in the name of the file.
  91.  
  92. /*HH3!3*/    3.3.5. Insert From File
  93.  
  94. To insert a file into the current buffer at the position of the cursor, select "Insert From File" from the "File" menu or type <Esc> then <I>. You will then be asked for the name of the file you wish to Insert.
  95.  
  96. /*HH3!3*/    3.3.6. Special Files
  97.  
  98. Any file with the extension ".EF" will always be read and written to the editors working directory. This is usefull for often used files which you want to access from anywhere. For example you may keep a small ".EF" file containing your name and address for insertion into documents.
  99.  
  100. NOTE: The location of the editors working directory is determined in the following order of priorities.
  101.  
  102. 1. The dierctory specified by an environment variable "EFWORK".
  103.  
  104. 2. The directory specified by an environment variable "HOME".
  105.  
  106. 3. The directory that the editor executable is in.
  107.  
  108. /*HH232*/3.4. Entering Text
  109.  
  110. /*HS!!3*/    3.4.1. Insert/Overtype
  111.  
  112. To toggle between these type <Ins>. In overtype mode there will be a letter `O' on the top line of the display.
  113.  
  114. /*HH3!3*/    3.4.2. Entering Control Characters
  115.  
  116. To enter ASCII characters below ASCII 32 select "Enter Control Char" from the "misc" menu or type <Ctrl><C>. You may then enter any character except ASCII 0,1,2 and 26 which are reserved for use by EasyFold.
  117.  
  118. /*HH3!3*/    3.4.3. Entering ASCII Characters Above 127
  119.  
  120. If you wish to wish to enter ASCII characters above 127 into your file you may select them from a display. The display can be summond by selecting "Symbols Menu" from the "misc" menu or by typing <Ctrl><F1>. You may then select a character by positioning the highlight box over the character and pressing <Enter>.
  121.  
  122. /*HH232*/3.5. Moving Around
  123.  
  124. If you have a mouse then clicking the left hand mouse button will take you to wherever the mouse is situated. The right hand mouse button is reserved for opening and closing folds, see chapter 4.
  125.  
  126. If you have a mouse and you move the mouse pointer up to the top line of the screen you will notice that on the right you will see the words "up" and "down". You may click on these to scroll the screen.
  127.  
  128. <Ctrl><Home> and <Ctrl><End> scroll the screen leaving the cursor at the same position in the file.
  129.  
  130. EasyFold uses <F9> and <F10> to take you to the top and bottom of a file respectively.
  131.  
  132. <Home> and <End> take you to the start and end of a line.
  133.  
  134. <Ctrl><left> and <Ctrl><right> take tou to the beggining and and of the previous and next words respectively.
  135.  
  136. To goto a particular line in a file select "Goto Line" from the "Edit" menu or type <Ctrl><G>. You will then be asked to enter the line number.
  137.  
  138. /*HS!!3*/    3.5.1. Position Markers
  139.  
  140. EasyFold allows you to store the current cursor position and come back to it later or to swap between two positions in the text.
  141.  
  142. To store the current cursor position select "Mark Position" from the "Edit" menu or type <F7>.
  143.  
  144. To go back to the stored position select "Goto Mark" from the "Edit" menu or type <F8>.
  145.  
  146. To go back to the stored position while making your current position into the stored position select "Swap Marks" from the "Edit" menu or type <Ctrl><F8>.
  147.  
  148. /*HH2!2*/3.6. Selecting a Block of text
  149.  
  150. If you have a mouse you may select a block of text by first clicking the mouse on the point at which you wish to start and then, leaving your finger on the mouse, drag the mouse pointer to where you wish the block to end. If you do not have a mouse type <F3> at the start of the block and the move the cursor to the end of the block.
  151.  
  152. To un-select a block press <Esc> twice.
  153.  
  154. Selecting a block in itself has no effect on the file, selecting is merely the first part of many different operations.
  155.  
  156. * Copy/Move to Workspace
  157.  
  158. * Print block
  159.  
  160. * Delete
  161.  
  162. * Block Tab
  163.  
  164. * Case Manipulation
  165.  
  166. /*HH2!2*/3.7. Deleting a Selected Block of Text
  167.  
  168. To delete a block of text, first select it as described in section 3.6, then type <Del>.
  169.  
  170. /*HH2!2*/3.8. Block Tab/Un-Tab
  171.  
  172. To insert tab characters at the start of all the lines within a block, select it as described in section 3.6, then type tabkey. To remove tabs type <shift><tab>.
  173.  
  174. /*HH2!2*/3.9. Block Case Manipulation
  175.  
  176. You can perform several case manipulations on a highlit block of text.
  177.  
  178. * Change all characters to upper case
  179. * Change all characters to lower case
  180. * Swap the case of all characters
  181. * Maket the first letter of each word upper case
  182.  
  183. To perform these operations on a block, select it as described in section 3.6, then select "Case operation" from the "Edit" menu or type <Ctrl><V>. You will then be prompted to enter a character corresponding to one of the four options.
  184.  
  185. If you select "Case operation" from the "Edit" menu or type <Ctrl><V> when no block has been selected, the case of the individual character the cursor is under will be swapped and the cursor advanced one character.
  186.  
  187. /*HH2!2*/3.10. The Workspace
  188.  
  189. EasyFold uses the concept of a "workspace" or "scratchpad", this is simply an area of memory in which bits of text can be stored temporarily. It can store only one piece of text at a time and so if new text is copied into the workspace the old text will be lost. The first few characters of the workspace are always shown on the bottom line of the editing screen.
  190.  
  191. /*HH2!2*/3.11. Cut, Copy and Paste
  192.  
  193. Cut and paste works using the workspace.
  194.  
  195. To copy a block of text to the workspace first of all highlight it as described in section 3.6, then select "copy block to workspace" from the "edit" menu or type <F3>.
  196.  
  197. To move (cut) a block of text to the workspace first of all highlight it as described in section 3.6, then select "move block to workspace" from the "edit" menu or type <Alt><F3>.
  198.  
  199. To insert (paste) the content of the workspace into your file select "insert workspace into file" from the "edit" menu or type <F4>.
  200.  
  201. /*HH2!2*/3.12. Merging One File Into Another
  202.  
  203. You may insert the contents of a file on disc into the file you are editing by simply selecting "insert from file" from the "file" menu or typing <Esc> then <I>, you will then be asked for the name of the file to insert.
  204.  
  205. /*HH232*/3.13. Editing More Than One File at a Time
  206.  
  207. /*HS!!3*/    3.13.1. Buffers
  208.  
  209. EasyFold can edit up to 100 buffers simultaneously, if there is not enough memory to hold all the files you are editing then EasyFold will automatically put buffers in temporary files transparently.
  210.  
  211. /*HH3!3*/    3.13.2. Switching Between Buffers
  212.  
  213. There are many ways of switching between buffers.
  214.  
  215. Pressing <Alt> and a digit 1-9 will take you to buffers 1-9.
  216.  
  217. If you type <Alt><=> you will be taken to the next buffer.
  218.  
  219. If you type <Alt><-> you will be taken to the previous buffer.
  220.  
  221. If you have a mouse, move it up to the top line where you may select "buffers" this then takes you  to a screen displaying all the 100 buffers, you may select a buffer by simply clicking the mouse on the appropriate one. If you do not have a mouse you may get to the selection screen by selecting"Buffer Selection" from the "File" menu or typing <Esc> then <B>
  222.  
  223. If you type <Esc> then <E> you will be asked to type in the number of the buffer you wish to select.
  224.  
  225. /*HH3!3*/    3.13.3. Abort Buffer
  226.  
  227. To abort the editing of the current buffer, select "Abort Buffer" from the "File" menu or type <Esc> then <T>.
  228.  
  229. /*HH2!2*/3.14. Windows
  230.  
  231. To split the screen into two windows select "2 windows" from the "Misc" menu or type <Esc> then <2>.
  232.  
  233. To switch between windows select "swap window" from the "misc" menu or type <Ctrl><S>. If you have a mouse you may simply click the mouse in the appropriate window.
  234.  
  235. To move the window boundary select "move boundary" from the "misc" menu or type <Esc> then <M>. The boundary may then be moved up and down with the cursor keys. Type <Esc> when finished.
  236.  
  237. To go back to just one window select "1 Windows" from the "Misc" menu or type <Esc> then <1>.
  238.  
  239. Windows are not tied to particular buffers, you may edit any buffer in any window.
  240.  
  241. /*HH2!2*/3.15. Miscellaneous
  242.  
  243. To delete a line type <Ctrl><Y>, the line will automatically be put in the workspace.
  244.  
  245. To erase from the cursor until the end of a line type <Ctrl><K>.
  246.  
  247. To view a table of ASCII characters and their codes, select
  248. "Select ASCII Table" from the "Misc" menu or type <Alt><F1>.
  249.  
  250. /*HH121*/      4. FOLDS
  251.  
  252. /*HS!!2*/4.1. Introduction
  253.  
  254. It is sad that more people don't use folding editors. Once mastered, folds can help enormously in structuring large complex programs. I suspect the main reason folds have not caught on, is that the existing folding editors are too complex to use. They require the learning of many new and difficult concepts. Also they often have special file formats that cannot be read by compilers so you have to have two files going at the same time, one with and one without folds.
  255.  
  256. EasyFold attempts to get round these problems, by making folds behave more like ordinary text. For example in EasyFold there are no special commands for copying folds from one place to another, you simply use the block copy procedure as for any other text.
  257.  
  258. The best way to learn about folds is to see them in action, to do this try editing "FOLD.HLP" and following it's instructions.
  259.  
  260. /*HH2!2*/4.2. How to Make/Delete a Fold
  261.  
  262. To make a fold move to the line you want the fold at and select "Create Fold" from the "Fold" menu or type <Ctrl><U>.
  263.  
  264. To delete a fold move to the line of the fold and select "Delete Fold" from the "Fold" menu or type <Ctrl><D>.
  265.  
  266. NOTE: It is not possible to delete a fold that is "busy", i.e. that is either closed itself or is being used to close a fold above it. To relase a fold from use select "Release Fold" from the "Fold" menu or type <Ctrl><R>.
  267.  
  268. /*HH2!2*/4.3. How to "Open" and "Close" Folds
  269.  
  270. If you have a mouse you may toggle folds open and closed with the right mouse button. If you do not have a mouse select "Open Fold"/"Close Fold" from the "Fold" menu or type <Ctrl><PgUp>/<Ctrl><PgDn>.
  271.  
  272. To open a fold and all the lower level folds within it, select "Open Fold & Chilren" from the "Fold" menu or type <Esc> then <Ctrl><PgUp>.
  273.  
  274. To open all the folds in the entire file select "Open All Folds" from the "Fold" menu or type <Esc> then <PgUp>.
  275.  
  276. /*HH2!2*/4.4. Changing Fold Levels
  277.  
  278. To change the level of a fold select "Promote Fold"/"Demote Fold" from the "Fold" menu or type <Esc> followed by either <Left> or <Right>.
  279.  
  280. To promote a fold and all the lower level folds within it, select "Promote Fold & Chilren" from the "Fold" menu or type <Esc> then <Ctrl><right>.
  281.  
  282. To demote a fold and all the lower level folds within it, select "Demote Fold & Chilren" from the "Fold" menu or type <Esc> then <Ctrl><left>.
  283.  
  284. /*HH232*/4.5. Fold Restrictions
  285.  
  286. There are a few restrictions on where you can put folds depending on what language you are using.
  287.  
  288. /*HS!!3*/    4.5.1. `C'/C++
  289.  
  290. You should not put a fold on a line with #define, #if etc, also you should not put a fold inside a comment, i.e.,
  291.  
  292. /* A fold at the start of this line is ok */
  293. /*
  294. but A fold at the start of this line is not.
  295. */
  296.  
  297.  
  298. /*HH3!3*/    4.5.2. MODULA2
  299.  
  300. You should not put a fold inside a comment, i.e.,
  301.  
  302. (* A fold at the start of this line is ok *)
  303. (*
  304. but A fold at the start of this line is not.
  305. *)
  306.  
  307.  
  308. /*HH3!3*/    4.5.3. Pascal
  309.  
  310. You should not put a fold inside a comment, i.e.,
  311.  
  312. { A fold at the start of this line is ok }
  313. {
  314. but A fold at the start of this line is not.
  315. }
  316.  
  317.  
  318. /*HH3!3*/    4.5.4. TeX / LaTeX
  319.  
  320. EasyFold stores the fold information for .TEX files as a comment at the end of the line before a fold. This can create problems if you put a fold at the start of a paragraph which is preceeded by another paragraph (as opposed to some kind of section heading). If there is only one blank line between the two paragraphs then this "empty" line will be filled with a comment. LaTeX will then assume that you have a single large paragrph. To avoid this problem you could have two lines between each paragraph or better still restrict the folds to the chapter and section headings.
  321.  
  322. \chapter{A Fold on This Line is Fine}
  323. blah blah blah blah blah blah
  324. blah blah blah blah blah blah
  325.                                <---- single blank line
  326. But a fold on this line could cause problems
  327. blah blah blah blah blah blah
  328. blah blah blah blah blah blah
  329.  
  330. /*HH121*/      5. SEARCH AND REPLACE
  331.  
  332. /*HS!!2*/5.1. Search
  333.  
  334. To search for a string select "Search" from the "Search" menu or type <F2>. You will then be prompted to enter the string to be searched. Type the string followed by <Enter>. You will then be given a list of search options:
  335.  
  336. * S-Case sensitive: The string is only found if it matches the case of search string.
  337.  
  338. * V-Variable: The string is only found if is bordered by non-alphanumeric characters on both sides. For example the `i' in "This" will not be found but the `h' in "if (h == 3)" will be found.
  339.  
  340. * R-Reverse: The search is performed backwards.
  341.  
  342. * A-All buffers: The search is performed accross all buffers starting from the current buffer.
  343.  
  344. Type in the option letters followed by <Enter>.
  345.  
  346. NOTE:  To put a carriage return into the search or replace string type <Ctrl><N>.
  347.  
  348. NOTE:  When being asked for the search or replace strings you may type <Up> or <Down> to retrieve previously used strings.
  349.  
  350. /*HH2!2*/5.2. Repeat Search
  351.  
  352. To repeat the search operation select "Repeat Search" from the {Search} menu or type <Alt><F2>.
  353.  
  354. /*HH2!2*/5.3. Search and Replace
  355.  
  356. To search and replace a string select "Search & Replace" from the "Search" menu or type <Ctrl><F2>. You will then be prompted to enter the string to be searched. Type the string followed by <Enter>. You will then be given a list of search options. Type in the option letters followed by <Enter>. You will then be prompted to enter the string to replace the search string. Type the string followed by <Enter>.
  357.  
  358. When the search string is found you will be prompted with the message:
  359.  
  360. Yes/No/Last/Rest/Cancel
  361.  
  362. Enter the first letter of one of the words to get the following effects:
  363.  
  364. * Yes: Replace this occurrence of the string.
  365.  
  366. * No: Do not replace this occurance of the string.
  367.  
  368. * Last: Replace this occurrence of the string but then do not continue searcing.
  369.  
  370. * Rest: Replace this, and all other, occurrences of the string without further prompting.
  371.  
  372. * Cancel: Cancel the search.
  373.  
  374.  
  375. /*HH121*/      6. WORD WRAPPING
  376.  
  377. EasyFold supports "live" word-wrap, that is to say paragraph will be formatted as you type rather than having to type special formatting commands.
  378.  
  379. /*HS!!2*/6.1. To Word-Wrap a File
  380.  
  381. To word wrap a file select "word-wrap" from the "misc" menu or type <Esc> then <W>.
  382.  
  383. When you word wrap a file in one buffer it has no effect on any other buffer so for example you could edit word wrapped documentation files in some buffers and non-word-wrapped source code files in other buffers at the same time, you could even have both on screen at the same time in different windows.
  384.  
  385. EasyFold automatically detects whether a file has been word wrapped, so once a file has been word wrapped once you will not keep having to re-issue the word-wrap command when you edit the file on different occasions.
  386.  
  387. /*HH2!2*/6.2. Un-Word-Wrap
  388.  
  389. To un-word-wrap a document select un-word-wrap from the "misc" menu or type <Esc> then <U>.
  390.  
  391. There are two ways to un-word-wrap a document,
  392.  
  393. 1. The soft returns may be removed leaving a file with some possibly quite long lines. Files un-word-wrapped in this manner can easily be wrapped again.
  394.  
  395. 2. The soft returns may be converted to hard returns.
  396.  
  397. WARNING: This option must be used with great care. Once a file has been un-word-wrapped in this way it cannot easily be wrapped again, you will have to manually delete all the unwanted hard returns.
  398.  
  399. /*HH2!2*/6.3. Word-Processor Compatibility
  400.  
  401. EasyFold as well as most word-processors for the PC use the following convention for "hard" and "soft" returns:
  402.  
  403. Hard return = <CARRIAGE RETURN> followed by <LINE FEED>
  404.  
  405. Soft return = <CARRIAGE RETURN>
  406.  
  407. A "hard" return is the character that is placed in a file when you type <Enter> on the keyboard. A "soft" return is a character placed in your file by the editor itself to break a line that has become too long. Soft returns are added and removed by the editor automatically as you type.
  408.  
  409. /*HH121*/      7. INTERACTING WITH DOS
  410.  
  411. You can temporarily go to DOS without leaving the editor in three different ways.
  412.  
  413. 1. Shell to DOS and stay there until you type `exit'.
  414. 2. Execute the current line as a DOS command.
  415. 3. As 2 but then remain in DOS until you type `exit'
  416.  
  417. To shell to DOS and stay there until you type `exit' select "Shell to DOS" from the "DOS" menu or type <Esc> <D>.
  418.  
  419. To execute the current line as a DOS command select "Execute Line" from the "DOS" menu or type <Esc> then <Alt><D>.
  420.  
  421. To execute the current line as a DOS command and then remain in a DOS shell select "Execute Line Then DOS" from the "DOS" menu or type <Esc> then <Ctrl><D>.
  422.  
  423. /*HS!!2*/7.1. Maximizing DOS memory
  424.  
  425. You can get more memory when shelling out to DOS by instructing EasyFold to save its buffers in temporary files. See section 13.7.
  426.  
  427. /*HH1!1*/      8. ACCESSING EasyFold VARIABLES
  428.  
  429. Virtually any time EasyFold asks you to type in a string (for example a search string or a filename) you may type <F1> to get access to a list of internal variables. This enables you to make extremely powerful macros. For example if you have two files on screen, one containing a list of errors and line numbers in the other. You could make a macro to copy a line number into the workspace, then switch to the other window and go to the line number that is in the workspace!
  430.  
  431. The variable you have access to are as follows:
  432.  
  433. * Word at Cursor: The word that the cursor is under.
  434. * Workspace: The contents of the workspace.
  435. * Keyboard: A string to be entered from the keyboard i.e., if a macro is being executed the macro will temporarily pause until the string is entered manually.
  436. * Filename: The name of the file.
  437. * Cursor Charcter: The character that the cursor is under.
  438. * Cursor Line: The contents of the line that the cursor is on.
  439. * Line Number: The line number of the cursor.
  440. * Column Number: The column number of the cursor.
  441.  
  442. /*HH121*/      9. MACROS
  443.  
  444. /*HS!!2*/9.1. Introduction
  445.  
  446. A macro is a sequence of keystrokes that performs a certain task. Macros can be assigned to a single key (EasyFold reserves the keystrokes <Alt><A> to <Alt><Z> for this purpose) or alternativly may be assigned two letter names.
  447.  
  448. Example: Say you wished to add the text "/*" and "*/" to the sart and end of many lines (this turns a line in to a `C' style comment). The keystrokes we need to type are <Home>, </>, <*>, <End>, <*>, </>. We can assign this sequence of six keys to one of the <Alt> keys (say <Alt><Z>) so that each time we type <Alt><Z> the sequence of six keys gets executed.
  449.  
  450. Macros can be made in two distinct ways:
  451.  
  452. * recorded: This is where you simply perform the sequence of keys that comprise the macro and EasyFold records them.
  453.  
  454. * compiled: This is where you edit a file which defines the keystrokes of a macro and then ask EasyFold to "compile" the file into a macro.
  455.  
  456. /*HH2!2*/9.2. Recording a Macro
  457.  
  458. To record a macro:
  459.  
  460. 1. select "define Macro" from the macro menu or type <F5>, you will now be asked to select which <Alt> key you wish to use.
  461.  
  462. 2. You will now be asked to enter a short description of the operation of the macro (descriptions of macros may be viewed, see section 9.8). A description is not essential and if you do not wish to give one, just type <Enter>.
  463.  
  464. 3. From this point onwards your key strokes will be recorded. Type the sequence of keys. When you have completed all the keystrokes press <F5> to end the recording.
  465.  
  466. NOTE: You may not execute or define macros from within macros.
  467.  
  468. NOTE: Single key macros are not saved between editing sessions unless you specifically request this by selecting "Save Macros" from the "Macros" menu or typing <Esc> then <F5>.
  469.  
  470. NOTE: Single key macros can contain up to 200 keystrokes.
  471.  
  472. /*HH2!2*/9.3. Recording a Two Character Macros
  473.  
  474. Two character macros can be recorded in the same manner as single key macros but they are executed slightly differently, if the macro name is "AB" then these two characters must be typed into the file you are editing, you then select "Execute Two Letter Macro" from "Macros" menu or type <F6>, the two characters will immediately be erased and the macro executed. You define a two letter macro in the following way:
  475.  
  476. 1. select "Define Two Letter Macro" from the "Macros" menu or type <Ctrl><F6>
  477.  
  478. 2. You will now be asked to type in the two character name of the macro, these must constitute a valid file name without an extension, i.e., must not include a `.'.
  479.  
  480. 3. From this point onwards your key strokes will be recorded. When you have completed all the keystrokes press <F5> to end the recording.
  481.  
  482. NOTE: Two letter macros are saved automatically after defining them.
  483.  
  484. NOTE: Single key macros can contain up to 2000 keystrokes.
  485.  
  486. /*HH232*/9.4. Compiling Macros
  487.  
  488. Macros may be compiled from ordinary text in a buffer. The format of a macro is as follows:
  489.  
  490. * The first line in the buffer is the macro description.
  491.  
  492. * Ordinary (alphanumeric) keys like 9-9 and A-Z are each separated by spaces.
  493.  
  494. * Special keys like <F5> or two-key combinations like <Ctrl><G> are written as strings, for example <F5> is wriiten "F5" and <Ctrl><G> is written "CTRL-G".
  495.  
  496. Example: Take the macro desribed at the start of the chapter about turning a line of text into a `C' style comment. The file needed to create this macro would look something like this:
  497.  
  498. Turn line into `C' comment
  499. HOMEKEY / * ENDKEY * /
  500.  
  501. Once you have typed in the text of your macro select "Compile Macro" form the "Macros" menu or type <Esc> then <Alt><F5>. You will then be prompted for the key you wish to assign the macro to.
  502.  
  503. /*HS!!3*/    9.4.1. Entering key names
  504.  
  505. You can enter the names of non-ASCII keys directly into the file ready for macro compilation by selecting "Insert Key Name" from the "Macros" menu or typeing <Esc> then <K>.
  506.  
  507. /*HH2!2*/9.5. Editing Existing Macros
  508.  
  509. Macros may be edited in a buffer even when they were originally recorded (as opposed to compiled). To edit a macro in the current buffer select "Edit Macro" from the "Macros" menu or type <Esc> then <Ctrl><F5>. You will then be asked to type in the macro letter. The macro will then appear in the buffer ready to be edited and compiled as discussed in section 9.3.
  510.  
  511. /*HH2!2*/9.6. Mouse Macros
  512.  
  513. You can define the action of pressing <Alt> and clicking the left hand mouse button to mean:
  514.  
  515. 1. Take the cursor to the position specified by the mouse.
  516. 2. Then enter a certain key. This key can be a macro key or any other key.
  517.  
  518. this is very usefull when you want to perform an operation on parts of your text scattered around the screen. For example if you had written some text and had omitted to capitalise the first letter of each sentence, you could define the Alt-Mouse key to be <Ctrl><V> (see section 3.9) then while pressing the <Alt> key click the mouse on the offending letters.
  519.  
  520. To define this "Alt-mouse" key select "Define Alt-Mouse" from the "Macros" menu and then enter the key.
  521.  
  522. /*HH232*/9.7. Special Macro Features
  523.  
  524. /*HS!!3*/    9.7.1. Repeat Macro Till Fail
  525.  
  526. You may ask for the last used macro to be repeated until there is some kind of failure. A failure is any operation that would cause EasyFold to produce a warning message, for example attempting to move the cursor down when you are already at the bottom of a file or searching for a string that is not there.
  527.  
  528. /*HH3!3*/    9.7.2. Batch Mode
  529.  
  530. It is possible to ask EasyFold to execute a two letter macro from the command line. This is very useful if you wish to perform operations on files on a regular basis from a batch file.
  531.  
  532. To execute a two letter macro from the command line, add the switch "\M:xx" to the end of the EasyFold command line, where "xx" is the macro name.
  533.  
  534. If you wish to quit the editor as soon as the macro is completed use the switch "\Z:xx".
  535.  
  536. /*HH2!2*/9.8. Viewing Macros Descriptions
  537.  
  538. To view a list of macro descriptions select List One Letter Macros from the Macros menu or type <ESC> then <CTRL-L>.
  539.  
  540. /*HH121*/     10. PRINTING
  541.  
  542.  
  543. To print a buffer select "Print" from the "Misc" menu or type <Ctrl><P>. You will then be prompted as to whether you wish the contents of closed folds to be printed, type Y or N.
  544.  
  545. /*HS!!2*/10.1. Printer control
  546.  
  547. See section 13.5.
  548.  
  549. /*HH2!2*/10.2. Printing a Block of Text
  550.  
  551. To print a block of text, fist highlight the block as described in section 3.6, then select "Print" from the "Misc" menu or type <Ctrl><P>. You will then be prompted as to whether you wish the contents of closed folds to be printed, type Y or N.
  552.  
  553. /*HH1!1*/     11. REMAPPING THE KEYBOARD
  554.  
  555. EasyFold comes with a special program called "SETKEYS.EXE" which allows you to redefine which key(s) perform which function. There are a few restrictions:
  556.  
  557. * A funtion may only be called via a maximum of two keystrokes (combination keystrokes like \twokeys{\ctrl}{F9} count as a single keystroke).
  558.  
  559. * All two-key sequences must start with the same "command" key.
  560.  
  561. Before running the program first of all make sure that "SETKEYS.EXE" is on the same subdirectory as the editor executable ("EF.EXE"). Run the program by simply typing SETKEYS at the DOS prompt.
  562.  
  563. The program displays a box containing a function description and the current keystroke(s) that execute that function. You may browse up and down the list of functions using the <UP> and <DOWN> keys.
  564.  
  565. To change the keystroke(s) type `C' followed by the keystroke(s) you desire for that function.
  566.  
  567. To reset a function to its default keystroke(s) type `D'.
  568.  
  569. To reset all functions to their default keystroke(s) type `A'.
  570.  
  571. To save all your changes type `S'.
  572.  
  573. To quit the program without saving type `Q'.
  574.  
  575. /*HH121*/     12. MISCELLANEOUS
  576.  
  577. /*HS!!2*/12.1. Bracket Matching
  578.  
  579. EasyFold can find matching brackets `(' `)' and `{' `}'. To find a particular brackets partner, position the cursor under the bracket and type <Ctrl><]>, the cursor will now be positioned under the partner.
  580.  
  581. /*HH2!2*/12.2. View Entry Screen
  582.  
  583. It is often useful to be able to see the entry screen as it was just before entering the editor, for example if there are error messages from a compiler on the screen. To view the entry screen select "View Entry Screen" from the "Dos" menu or type <Esc> then <V>.
  584.  
  585. /*HH2!2*/12.3. Rolling Back-up System
  586.  
  587. EasyFold makes back-ups of files in two distinct ways.
  588.  
  589. 1. The conventional system: When you alter an existing file, EasyFold renames the original version to being a ".BAK" file.
  590.  
  591. 2. The rolling back-up system: When you alter an existing file, EasyFold renames the original version to "BAK1.EF" (whatever your file was called) and shunts "BAK2.EF", "BAK3.EF" etc along one place in a list. The number files in this list is configurable, see section 13.6.
  592.  
  593. NOTE: The rolling backup list contains whatever files you have been editing. There is not a separate backup list for each file.
  594.  
  595. /*HH121*/     13. EDITOR CONFIGURATION
  596.  
  597. /*HS!!2*/13.1. Introduction
  598.  
  599. Many aspects of EasyFolds operation may be configured while the editor is still running. To get to the "options" screen select "Editor Options" from the "Misc" menu or type <Esc> then <O>. To select an option simply position the highlight bar over that option, to change its value simply press <Left> or <Right> or, if you have a mouse, press the left or right hand buttons. To "save" a configuration so that it will be the same in the next editing session press <S>. To return to editing press <Esc>.
  600.  
  601. The options that can be set are as follows...
  602.  
  603. /*HH232*/13.2. Special Character Displays
  604.  
  605. /*HS!!3*/    13.2.1. Tab Size
  606.  
  607. This defines the size of the tab character field. The default value is 4.
  608.  
  609. /*HH3!3*/    13.2.2. The Display of the Tab Character
  610.  
  611. This controls the way that tab characters will appear on the screen.
  612.  
  613. /*HH3!3*/    13.2.3. The Display of Hard/Soft Return Characters
  614.  
  615. These control how the "hard" and "soft" return characters will appear on the screen. For an explanation of "hard" and "soft" return characters see chapter 6.
  616.  
  617. /*HH3!3*/    13.2.4. Other Control Chars
  618.  
  619. This controls the way that the ASCII characters below 32 will appear on the screen.
  620.  
  621. /*HH2!2*/13.3. Rows and Columns
  622.  
  623. This switches between various screen modes.
  624.  
  625. EasyFold can switch between many screen modes in the same editing session. With a VGA card it can change between 25,28,43 and 50 line modes. If you have super-VGA you may be able to edit in some other modes for example 132 column modes. The actual mode numbers will be card dependant and you have to tell EasyFold these numbers in advance. EasyFold can access up to three extra screen modes by examining the environment variables EXMOD1, EXMOD2 and EXMOD3. For example on a 8900 based SVGA card, mode 90 is a 132x60 text mode so you would add the following line to your autoexec.bat to access this,
  626.  
  627. SET EXMOD1=90
  628.  
  629. To find out what extra screen modes are available on your machine consult your video card manual.
  630.  
  631. NOTE: At the time of writing only a few mouse drivers support 132 column modes.
  632.  
  633.  
  634. /*HH2!2*/13.4. Auto Tab
  635.  
  636. This controls the behaviour of the cursor after typeing <Enter>. With auto-tab off, the cursor simply goes to the start of the next line. With auto-tab on EasyFold will insert exactly the same whitespace characters (tab and space) at the start of the line as appeared at the start of the previous line.
  637.  
  638. /*HH232*/13.5. Colours
  639.  
  640. /*HS!!3*/    13.5.1. Text Foreground/Background 
  641.  
  642. These options contol the normal text forground and background colours.
  643.  
  644. /*HH3!3*/    13.5.2. Special Char Colour 
  645.  
  646. This controls the colour special charcters will appear in. Special characters are those with ASCII codes less than 32, for example tab and carriage-return.
  647.  
  648. /*HH232*/13.6. Printing
  649.  
  650. /*HS!!3*/    13.6.1. Print to File 
  651.  
  652. If print to file is set to "YES" then whenever you print any text the text will be sent to a file. EasyFold will prompt you for the file name each time.
  653.  
  654. /*HH3!3*/    13.6.2. Pinter New Line 
  655.  
  656. Printer new line controls what characters are sent to your printer at the end of each line. laser printers often require both carriage return and line feed characters whereas dot matrix printers often require just the carriage return.
  657.  
  658. /*HH3!3*/    13.6.3. Form Feed After Print
  659.  
  660. If this is set to "YES" the a form-feed character will be sent to the printer after each printout. This is useful with laser printers because they will not eject any page that is not full.
  661.  
  662. /*HH3!3*/    13.6.4. Printer Page Length 
  663.  
  664. This controls the number of lines that will be printed out before a form-feed.
  665.  
  666. /*HH2!2*/13.7. Number of Back Ups
  667.  
  668. This sets the number of back-ups made by the rolling back-up system. See section 12.3.
  669.  
  670. /*HH2!2*/13.8. Max Memory for Shell
  671.  
  672. If you set this to "YES" EasyFold will save its buffers in temporary files before shelling out to DOS. See chaper 7.
  673.  
  674. /*HH2!2*/13.9. Temp File Directory
  675.  
  676. This tells EasyFold where to write it's temporary files and back-ups for the rolling back-up system.
  677.  
  678. /*HH2!2*/13.10. Keyboard Repeat Rate
  679.  
  680. There are three keyboard repeat rate settings.
  681.  
  682. * FAST: The keyboard will repeat at a rate of 10 characters per second.
  683.  
  684. * SLOW: The keyboard will repeat at a rate of 30 characters per second.
  685.  
  686. * SAME AS DOS: EasyFold will not change the repeat rate.
  687.  
  688. /*HH2!2*/13.11. Cursor appearance
  689.  
  690. One option that can not be set from within EasyFold is the way the cursor is handled. With some non-standard video cards (especially in laptops) the cursor may not appear properly (or at all!) in which case you can tell EasyFold not to change the cursor appearance by setting an environment variable "CHANGECUR" equal to "0". This is done by adding the line:
  691.  
  692. SET CHANGECUR=0
  693.  
  694. in your "AUTOEXEC.BAT".
  695.  
  696. /*SH1!1*/
  697. /*#CP=00000:XX=99*/
  698.