home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 484 / EF12.ZIP / EFMAN.DOC < prev    next >
Text File  |  1993-06-14  |  40KB  |  731 lines

  1.  
  2.          ╔═══════════════════════════════════╗
  3.          ║  EasyFold version 1.2 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 250 files at once. See section 3.13.
  27. * Consumes only 5k when shelled out. See section 13.7.
  28. * Compile and step through errors/warnings. See section 7.3.
  29. * Split screen editing.  See section 3.14.
  30. * Live word wrap.  See chapter 6.
  31. * Switchable between line modes inc SVGA modes. See section 13.2.
  32. * Rolling back-up system.  See section 12.3.
  33. * Remembers previous, searched for, strings.  See chapter 5.
  34. * One and two letter macros.  See chapter 9.
  35. * Repeat macro until fail.  See section 9.6.1.
  36. * Batch mode.  See section 9.6.2.
  37. * Mouse macros.  See section 9.5.
  38. * Access to global variables to enhance power of macros. See chapter 9.
  39. * Bracket matching.  See section 12.1.
  40. * Auto locating files.  See section 3.3.6.
  41. * Reconfigurable keyboard.  See chapter 11.
  42.  
  43. /*HH121*/      3. HOW TO EDIT A FILE
  44.  
  45. /*HS!!2*/3.1. Running EasyFold
  46.  
  47. To edit a file, say "TEST.DOC", you type..
  48.  
  49. EF TEST.DOC
  50.  
  51. from the command line.
  52.  
  53. 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
  54.  
  55. EF *.C *.DOC INFO.DAT
  56.  
  57. would be a valid command line. See section 3.13 for how to switch between files.
  58.  
  59. 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.
  60.  
  61. If you type "EF" without any parameters, EasyFold will attempt to load the same files as in the previous editing session.
  62.  
  63. /*HH232*/3.2. Using the Menus
  64.  
  65. /*HS!!3*/    3.2.1. Using the Menus With a Mouse
  66.  
  67. 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.
  68.  
  69. /*HH3!3*/    3.2.2. Using the Menus From the Keyboard
  70.  
  71. 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 individual item from a menu either use <Up> and <Down> and then type <Enter> or alternatively simply type the highlighted character in the options.
  72.  
  73. /*HH232*/3.3. Loading and Saving files
  74.  
  75. /*HS!!3*/    3.3.1. Load
  76.  
  77. To load a file, select "Load" from the "FILE" menu or type <Esc> then <L>. You will then 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>.
  78.  
  79. If you enter a name containing wildcard characters you will then be able to select from a menu of files fitting that wildcard.
  80.  
  81. /*HH3!3*/    3.3.2. Save
  82.  
  83. To save a file, select "Save" from the "FILE" menu or type <Esc> then <S>.
  84.  
  85. /*HH3!3*/    3.3.3. Save and Exit
  86.  
  87. To save a file and immediatly exit the program, select "Save & Exit" from the "FILE" menu or type <Esc> then <X>.
  88.  
  89. /*HH3!3*/    3.3.4. Save As
  90.  
  91. 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.
  92.  
  93. /*HH3!3*/    3.3.5. Insert From File
  94.  
  95. 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.
  96.  
  97. NOTE: You may not insert a "folded" file into your text. If you wish to insert a folded file you must first load that file into its own buffer and then use cut and paste (see section 3.11).
  98.  
  99. /*HH3!3*/    3.3.6. Special Files
  100.  
  101. Any file with the extension ".EF" will always be read and written to the editors working directory. This is useful 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.
  102.  
  103. NOTE: The location of the editors working directory is determined in the following order of priorities.
  104.  
  105. 1. The directory specified by an environment variable "EFWORK".
  106.  
  107. 2. The directory specified by an environment variable "HOME".
  108.  
  109. 3. The directory that the editor executable is in.
  110.  
  111. /*HH232*/3.4. Entering Text
  112.  
  113. /*HS!!3*/    3.4.1. Insert/Overtype
  114.  
  115. To toggle between these type <Ins>. In overtype mode there will be a letter `O' on the top line of the display.
  116.  
  117. /*HH3!3*/    3.4.2. Entering Control Characters
  118.  
  119. 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.
  120.  
  121. /*HH3!3*/    3.4.3. Entering ASCII Characters Above 127
  122.  
  123. 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 summoned 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>.
  124.  
  125. /*HH232*/3.5. Moving Around
  126.  
  127. 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).
  128.  
  129. 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.
  130.  
  131. <Ctrl><Home> and <Ctrl><End> scroll the screen leaving the cursor at the same position in the file.
  132.  
  133. EasyFold uses <F9> and <F10> to take you to the top and bottom of a file respectively.
  134.  
  135. <Home> and <End> take you to the start and end of a line.
  136.  
  137. <Ctrl><Left> and <Ctrl><Right> take to to the beginning and end of the previous and next words respectively.
  138.  
  139. To go to a particular line in a file select "Go to Line" from the "EDIT" menu or type <Ctrl><G>. You will then be asked to enter the line number.
  140.  
  141. /*HS!!3*/    3.5.1. Position Markers
  142.  
  143. EasyFold allows you to store the current cursor position and come back to it later or to swap between two positions in the text.
  144.  
  145. To store the current cursor position select "Mark Position" from the "EDIT" menu or type <F7>.
  146.  
  147. To go back to the stored position select "Go to Mark" from the "EDIT" menu or type <F8>.
  148.  
  149. 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>.
  150.  
  151. /*HH2!2*/3.6. Selecting a Block of text
  152.  
  153. 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 then move the cursor to the end of the block.
  154.  
  155. To un-select a block, press <Esc> twice.
  156.  
  157. Selecting a block in itself has no effect on the file, selecting is merely the first part of many different operations.
  158.  
  159. * Copy/Move to Workspace
  160.  
  161. * Print block
  162.  
  163. * Delete
  164.  
  165. * Block Tab
  166.  
  167. * Case Manipulation
  168.  
  169. /*HH2!2*/3.7. Deleting a Selected Block of Text
  170.  
  171. To delete a block of text, first select it as described in section 3.6, then type <Del>.
  172.  
  173. /*HH2!2*/3.8. Block Tab/Un-Tab
  174.  
  175. To insert tab characters at the start of all the lines within a block, select it as described in section 3.6, then type <Tab>. To remove tabs type <Shift><Tab>.
  176.  
  177. /*HH2!2*/3.9. Block Case Manipulation
  178.  
  179. You can perform several case manipulations on a highlit block of text.
  180.  
  181. * Change all characters to upper-case
  182. * Change all characters to lower-case
  183. * Swap the case of all characters
  184. * Make the first letter of each word upper-case
  185.  
  186. 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.
  187.  
  188. 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.
  189.  
  190. /*HH2!2*/3.10. The Workspace
  191.  
  192. EasyFold uses the concept of a "workspace" or "scratch-pad", 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.
  193.  
  194. /*HH2!2*/3.11. Cut, Copy and Paste
  195.  
  196. Cut and paste works using the workspace.
  197.  
  198. 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>.
  199.  
  200. 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>.
  201.  
  202. To insert (paste) the contents of the workspace into your file select "Insert Workspace in File" from the "EDIT" menu or type <F4>.
  203.  
  204. /*HH2!2*/3.12. Merging One File Into Another
  205.  
  206. You may insert the contents of a file on disc into the file you are editing by 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.
  207.  
  208. /*HH232*/3.13. Editing More Than One File at a Time
  209.  
  210. /*HS!!3*/    3.13.1. Buffers
  211.  
  212. EasyFold can edit up to 250 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.
  213.  
  214. /*HH3!3*/    3.13.2. Switching Between Buffers
  215.  
  216. There are many ways of switching between buffers.
  217.  
  218. Pressing <Alt> and a digit 1-9 will take you to buffers 1-9.
  219.  
  220. If you type <Alt><=> you will be taken to the next buffer.
  221.  
  222. If you type <Alt><-> you will be taken to the previous buffer.
  223.  
  224. 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 250 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>
  225.  
  226. If you type <Esc> then <E> you will be asked to type in the number of the buffer you wish to select.
  227.  
  228. /*HH3!3*/    3.13.3. Abort Buffer
  229.  
  230. To abort the editing of the current buffer, select "Abort Buffer" from the "FILE" menu or type <Esc> then <T>.
  231.  
  232. /*HH2!2*/3.14. Windows
  233.  
  234. To split the screen into two windows select "2 Windows" from the "MISC" menu or type <Esc> then <2>.
  235.  
  236. 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.
  237.  
  238. 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.
  239.  
  240. To go back to just one window select "1 Window" from the "MISC" menu or type <Esc> then <1>.
  241.  
  242. Windows are not tied to particular buffers, you may edit any buffer in any window.
  243.  
  244. /*HH2!2*/3.15. Miscellaneous
  245.  
  246. To delete a line type <Ctrl><Y>, the line will automatically be put in the workspace.
  247.  
  248. To erase from the cursor until the end of a line type <Ctrl><K>.
  249.  
  250. To view a table of ASCII characters and their codes, select
  251. "Select ASCII Table" from the "MISC" menu or type <Alt><F1>.
  252.  
  253. /*HH121*/      4. FOLDS
  254.  
  255. /*HS!!2*/4.1. Introduction
  256.  
  257. 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.
  258.  
  259. 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.
  260.  
  261. 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.
  262.  
  263. /*HH2!2*/4.2. How to Make/Delete a Fold
  264.  
  265. 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>.
  266.  
  267. To delete a fold move to the line of the fold and select "Delete Fold" from the "FOLD" menu or type <Ctrl><D>.
  268.  
  269. 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 release a fold from use, select "Release Fold" from the "FOLD" menu or type <Ctrl><R>.
  270.  
  271. /*HH2!2*/4.3. How to "Open" and "Close" Folds
  272.  
  273. 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>.
  274.  
  275. To open a fold and all the lower level folds within it, select "Open Fold & Children" from the "FOLD" menu or type <Esc> then <Ctrl><PgUp>.
  276.  
  277. To open all the folds in the entire file select "Open All Folds" from the "FOLD" menu or type <Esc> then <PgUp>.
  278.  
  279. /*HH2!2*/4.4. Changing Fold Levels
  280.  
  281. 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>.
  282.  
  283. To promote a fold and all the lower level folds within it, select "Promote Fold & Children" from the "FOLD" menu or type <Esc> then <Ctrl><Right>.
  284.  
  285. To demote a fold and all the lower level folds within it, select "Demote Fold & Children" from the "FOLD" menu or type <Esc> then <Ctrl><Left>.
  286.  
  287. /*HH232*/4.5. Fold Restrictions
  288.  
  289. There are a few restrictions on where you can put folds depending on what language you are using.
  290.  
  291. /*HS!!3*/    4.5.1. `C'/C++
  292.  
  293. 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.,
  294.  
  295. /* A fold at the start of this line is ok */
  296. /*
  297. but A fold at the start of this line is not.
  298. */
  299.  
  300.  
  301. /*HH3!3*/    4.5.2. MODULA2
  302.  
  303. You should not put a fold inside a comment, i.e.,
  304.  
  305. (* A fold at the start of this line is ok *)
  306. (*
  307. but A fold at the start of this line is not.
  308. *)
  309.  
  310.  
  311. /*HH3!3*/    4.5.3. Pascal
  312.  
  313. You should not put a fold inside a comment, i.e.,
  314.  
  315. { A fold at the start of this line is ok }
  316. {
  317. but A fold at the start of this line is not.
  318. }
  319.  
  320.  
  321. /*HH3!3*/    4.5.4. TeX / LaTeX
  322.  
  323. 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 preceded 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 paragraph. To avoid this problem you could have two lines between each paragraph or better still restrict the folds to the chapter and section headings.
  324.  
  325. \chapter{A Fold on This Line is Fine}
  326. blah blah blah blah blah blah
  327. blah blah blah blah blah blah
  328.                                <---- single blank line
  329. But a fold on this line could cause problems
  330. blah blah blah blah blah blah
  331. blah blah blah blah blah blah
  332.  
  333. /*HH121*/      5. SEARCH AND REPLACE
  334.  
  335. /*HS!!2*/5.1. Search
  336.  
  337. 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:
  338.  
  339. * S-Case sensitive: The string is only found if it matches the case of the search string.
  340.  
  341. * V-Variable: The string is only found if it 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.
  342.  
  343. * R-Reverse: The search is performed backwards.
  344.  
  345. * A-All buffers: The search is performed across all buffers starting from the current buffer.
  346.  
  347. Type in the option letters followed by <Enter>.
  348.  
  349. NOTE:  To put a carriage return into the search or replace string type <Ctrl><N>.
  350.  
  351. NOTE:  When being asked for the search or replace strings you may type <Up> or <Down> to retrieve previously used strings.
  352.  
  353. /*HH2!2*/5.2. Repeat Search
  354.  
  355. To repeat the search operation select "Repeat Search" from the "Search" menu or type <Alt><F2>.
  356.  
  357. /*HH2!2*/5.3. Search and Replace
  358.  
  359. 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>.
  360.  
  361. When the search string is found you will be prompted with the message:
  362.  
  363. Yes/No/Last/Rest/Cancel
  364.  
  365. Enter the first letter of one of the words to get the following effects:
  366.  
  367. * Yes: Replace this occurrence of the string.
  368.  
  369. * No: Do not replace this occurrence of the string.
  370.  
  371. * Last: Replace this occurrence of the string but then do not continue searching.
  372.  
  373. * Rest: Replace this, and all other, occurrences of the string without further prompting.
  374.  
  375. * Cancel: Cancel the search.
  376.  
  377.  
  378. /*HH121*/      6. WORD WRAP
  379.  
  380. EasyFold supports "live" word-wrap, that is to say paragraphs will be formatted as you type rather than having to type special formatting commands.
  381.  
  382. /*HS!!2*/6.1. To Word-Wrap a File
  383.  
  384. To word wrap a file select "Word Wrap" from the "MISC" menu or type <Esc> then <W>.
  385.  
  386. 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.
  387.  
  388. 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.
  389.  
  390. /*HH2!2*/6.2. Un-Word-Wrap
  391.  
  392. To un-word-wrap a document select "Un-Word Wrap" from the "MISC" menu or type <Esc> then <U>.
  393.  
  394. There are two ways to un-word-wrap a document,
  395.  
  396. 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.
  397.  
  398. 2. The soft returns may be converted to hard returns.
  399.  
  400. 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.
  401.  
  402. /*HH2!2*/6.3. Word-Processor Compatibility
  403.  
  404. EasyFold as well as most word-processors for the PC use the following convention for "hard" and "soft" returns:
  405.  
  406. Hard return = <CARRIAGE RETURN> followed by <LINE FEED>
  407.  
  408. Soft return = <CARRIAGE RETURN>
  409.  
  410. 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.
  411.  
  412. /*HH121*/      7. DOS SHELL / COMPILE
  413.  
  414. /*HS!!2*/7.1. Executing DOS Commands
  415.  
  416. You can temporarily go to DOS without leaving the editor in two different ways.
  417.  
  418. 1. Shell to DOS and stay there until you type "exit".
  419. 2. Execute a DOS command and immediately return to the editor.
  420.  
  421. To shell to DOS and stay there until you type "exit" select "Shell to DOS" from the "DOS" menu or type <Esc> then <D>.
  422.  
  423. To execute a DOS command select "Execute" from the "DOS" menu or type <Esc> then <Alt><D>. Type in the command to be executed and press <Enter>. As with any other time you are requested to type in a string you may type <F1> to get a list of global variables to enter.
  424.  
  425. /*HH2!2*/7.2. Maximizing DOS Memory
  426.  
  427. You can get much more memory when shelling out to DOS (or compiling, see section 7.3) by instructing EasyFold to save its buffers in temporary files. See section 13.7.
  428.  
  429. /*HH2!2*/7.3. Compiling Without Leaving the Editor
  430.  
  431. EasyFold has the ability to compile source files and then step through lines with errors and warnings. To set this up you have to tell EasyFold about the command line of your compiler(s) and about the format of the errors and warnings it produces. This is done by making a special file called "COMPILE.EF" (EasyFold will automatically place this file in its working directory, see section 3.3.6). An example "COMPILE.EF" for Microsoft C version 6 is shown below.
  432.  
  433.     ┌───────────────────────────────────────────
  434.     │COM[.C]=cl $$
  435.     │ERR[.C]=error 2 warning 2
  436.     │[End]
  437.     │
  438.  
  439.  
  440. The compilation information consists of the word "COM" followed by the file extension in square brackets and an equals sign, the rest of the line contains the line that is to be executed in order to compile, with the string "$$" in the place the filename should appear.
  441.  
  442. The error/warning information is given on a line starting with the word "ERR" followed by the file extension in square brackets and an equals sign, the following word is the keyword to look for in the compiler output that indicates that an error has been found. The next string is the field number that the error line appears in (field are groups of letters or numbers separated by SPACE, TAB or BRACES). The following two strings are a warning keyword and a warning line number field. These may be omitted if you only wish to step through errors.
  443.  
  444. The file COMPILE.EF may contain compilation and error information for more than one type of file, the following example shows a "COMPILE.EF" set up for Zortech C, Microsoft (R) Macro Assembler and FTL Modula 2.
  445.  
  446.     ┌───────────────────────────────────────────
  447.     │COM[.C]=ztc $$
  448.     │ERR[.C]=Error 2
  449.     │COM[.ASM]=ml $$
  450.     │ERR[.ASM]=error 2
  451.     │COM[.MOD]=m2comp $$
  452.     │[End]
  453.     │
  454.  
  455. Once "COMPILE.EF" has been created you may compile a source file by selecting "Compile" from the "DOS" menu or typing <ESC> then <C>. The file will then be compiled and the compiler output placed in a file called "COMPERRS.EF" which will appear in a second window.
  456.  
  457. If there were errors or warnings produced by the compilation you may step through them by selecting "Next Error/Warning" from the "DOS" menu or typing <Ctrl><F10>. To go to the previous error or warning select "Previous Error/Warning" from the "DOS" menu or type <Ctrl><F9>.
  458.  
  459. /*HH1!1*/      8. ACCESSING EasyFold VARIABLES
  460.  
  461. 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.
  462.  
  463. The variable you have access to are as follows:
  464.  
  465. * Word at Cursor: The word that the cursor is under.
  466. * Workspace: The contents of the workspace.
  467. * 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.
  468. * Filename: The name of the file.
  469. * Cursor Character: The character that the cursor is under.
  470. * Cursor Line: The contents of the line that the cursor is on.
  471. * Line Number: The line number of the cursor.
  472. * Column Number: The column number of the cursor.
  473.  
  474. /*HH121*/      9. MACROS
  475.  
  476. /*HS!!2*/9.1. Introduction
  477.  
  478. 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.
  479.  
  480. 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.
  481.  
  482. EasyFold also has two-character macros which are executed by typing the two characters into your text and then typing a special key. Two character macros are easier to remember than single letter macros.
  483.  
  484. Macros can be made in two distinct ways:
  485.  
  486. * recorded: This is where you simply perform the sequence of keys that comprise the macro and EasyFold records them.
  487.  
  488. * 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.
  489.  
  490. /*HH2!2*/9.2. Recording a Macro
  491.  
  492. To record a macro:
  493.  
  494. 1. select "Define Macro" from the "MACROS" menu or type <F5>, you will now be asked to select which <Alt> key you wish to use.
  495.  
  496. 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>.
  497.  
  498. 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.
  499.  
  500. NOTE: You may not execute or define macros from within macros.
  501.  
  502. 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>.
  503.  
  504. NOTE: Single key macros can contain up to 200 keystrokes.
  505.  
  506. /*HH2!2*/9.3. Recording a Two Character Macro
  507.  
  508. 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:
  509.  
  510. 1. select "Define Two Letter Macro" from the "MACROS" menu or type <Ctrl><F6>
  511.  
  512. 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 `.'.
  513.  
  514. 3. From this point onwards your key strokes will be recorded. When you have completed all the keystrokes press <F5> to end the recording.
  515.  
  516. NOTE: Two letter macros are saved automatically after defining them.
  517.  
  518. NOTE: Two letter macros can contain up to 2000 keystrokes.
  519.  
  520. /*HH232*/9.4. Compiling Macros
  521.  
  522. Macros may be compiled from ordinary text in a buffer. The format of a macro is as follows:
  523.  
  524. * The first line in the buffer is the macro description.
  525.  
  526. * Ordinary (alphanumeric) keys like 0-9 and A-Z are each separated by spaces.
  527.  
  528. * Special keys like <F5> or two-key combinations like <Ctrl><G> are written as strings, for example <F5> is written "F5" and <Ctrl><G> is written "CTRL-G". See section 9.4.1. for how to find out the names of the special keys.
  529.  
  530.  
  531. Example: Take the macro described 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:
  532.  
  533. Turn line into `C' comment
  534. HOMEKEY / * ENDKEY * /
  535.  
  536. 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.
  537.  
  538. /*HS!!3*/    9.4.1. How can I find out the key names?
  539.  
  540. You can enter the names of non-alphanumeric keys directly into the file ready for macro compilation by selecting "Insert Key Name" from the "MACROS" menu or typing <Esc> then <K>. You will then be prompted to type the desired key. The name of that key will then be entered into the text.
  541.  
  542. /*HH2!2*/9.5. Editing Existing Macros
  543.  
  544. 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.
  545.  
  546. /*HH2!2*/9.6. Mouse Macros
  547.  
  548. You can define the action of pressing <Alt> and clicking the left hand mouse button to mean:
  549.  
  550. 1. Take the cursor to the position specified by the mouse.
  551. 2. Then enter a certain key. This key can be a macro key or any other key.
  552.  
  553. this is very useful 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.
  554.  
  555. To define this "Alt-mouse" key select "Define Alt-Mouse" from the "MACROS" menu and then enter the key.
  556.  
  557. /*HH232*/9.7. Special Macro Features
  558.  
  559. /*HS!!3*/    9.7.1. Repeat Macro Till Fail
  560.  
  561. 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.
  562.  
  563. /*HH3!3*/    9.7.2. Batch Mode
  564.  
  565. 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.
  566.  
  567. 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.
  568.  
  569. If you wish to quit the editor as soon as the macro is completed use the switch "/Z:xx".
  570.  
  571. /*HH2!2*/9.8. Viewing Macros Descriptions
  572.  
  573. To view the macro descriptions select List One Letter Macros from the Macros menu or type <ESC> then <CTRL-L>.
  574.  
  575. /*HH121*/     10. PRINTING
  576.  
  577.  
  578. 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.
  579.  
  580. /*HS!!2*/10.1. Printer Control
  581.  
  582. See section 13.5.
  583.  
  584. /*HH2!2*/10.2. Printing a Block of Text
  585.  
  586. 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.
  587.  
  588. /*HH1!1*/     11. REMAPPING THE KEYBOARD
  589.  
  590. 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:
  591.  
  592. * A function may only be called via a maximum of two keystrokes (combination keystrokes like \twokeys{\ctrl}{F9} count as a single keystroke).
  593.  
  594. * All two-key sequences must start with the same "command" key.
  595.  
  596. 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 typing "SETKEYS" at the DOS prompt.
  597.  
  598. 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.
  599.  
  600. To change the keystroke(s) type `C' followed by the keystroke(s) you desire for that function.
  601.  
  602. To reset a function to its default keystroke(s) type `D'.
  603.  
  604. To reset all functions to their default keystroke(s) type `A'.
  605.  
  606. To save all your changes type `S'.
  607.  
  608. To quit the program without saving type `Q'.
  609.  
  610. /*HH121*/     12. MISCELLANEOUS
  611.  
  612. /*HS!!2*/12.1. Bracket Matching
  613.  
  614. 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.
  615.  
  616. /*HH2!2*/12.2. View Entry Screen
  617.  
  618. 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>.
  619.  
  620. /*HH2!2*/12.3. Rolling Back-up System
  621.  
  622. EasyFold makes back-ups of files in two distinct ways.
  623.  
  624. 1. The conventional system: When you alter an existing file, EasyFold renames the original version to being a ".BAK" file.
  625.  
  626. 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.
  627.  
  628. NOTE: The rolling back-up list contains whatever files you have been editing. There is not a separate back-up list for each file.
  629.  
  630. /*HH121*/     13. EDITOR CONFIGURATION
  631.  
  632. Many aspects of EasyFolds operation may be configured while the editor is still running. To get to the "options" screen, select "Config 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>.
  633.  
  634. The options that can be set are as follows...
  635.  
  636. /*HS!32*/13.1. Special Character Displays
  637.  
  638. /*HS!!3*/    13.1.1. Tab Size
  639.  
  640. This defines the size of the tab character field. The default value is 4.
  641.  
  642. /*HH3!3*/    13.1.2. The Display of the Tab Character
  643.  
  644. This controls the way that tab characters will appear on the screen.
  645.  
  646. /*HH3!3*/    13.1.3. The Display of Hard/Soft Return Characters
  647.  
  648. 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.
  649.  
  650. /*HH3!3*/    13.1.4. Other Control Chars
  651.  
  652. This controls the way that the ASCII characters below 32 will appear on the screen.
  653.  
  654. /*HH2!2*/13.2. Rows and Columns
  655.  
  656. This switches between various screen modes.
  657.  
  658. 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,
  659.  
  660. SET EXMOD1=90
  661.  
  662. To find out what extra screen modes are available on your machine consult your video card manual.
  663.  
  664. NOTE: At the time of writing only a few mouse drivers support 132 column modes.
  665.  
  666.  
  667. /*HH2!2*/13.3. Auto Indent
  668.  
  669. This controls the behaviour of the cursor after typing <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.
  670.  
  671. /*HH232*/13.4. Colours
  672.  
  673. /*HS!!3*/    13.4.1. Text Foreground/Background 
  674.  
  675. These options control the normal text foreground and background colours.
  676.  
  677. /*HH3!3*/    13.4.2. Special Char Colour 
  678.  
  679. This controls the colour special characters will appear in. Special characters are those with ASCII codes less than 32, for example tab and carriage-return.
  680.  
  681. /*HH232*/13.5. Printing
  682.  
  683. /*HS!!3*/    13.5.1. Print to File 
  684.  
  685. 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.
  686.  
  687. /*HH3!3*/    13.5.2. Printer New Line 
  688.  
  689. 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.
  690.  
  691. /*HH3!3*/    13.5.3. Form Feed After Print
  692.  
  693. If this is set to "YES" then 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.
  694.  
  695. /*HH3!3*/    13.5.4. Printer Page Length 
  696.  
  697. This controls the number of lines that will be printed out before a form-feed.
  698.  
  699. /*HH2!2*/13.6. Number of Back Ups
  700.  
  701. This sets the number of back-ups made by the rolling back-up system. See section 12.3.
  702.  
  703. /*HH2!2*/13.7. Max Memory for Shell
  704.  
  705. If you set this to "YES" EasyFold will save its buffers in temporary files before shelling out to DOS. See chapter 7.
  706.  
  707. /*HH2!2*/13.8. Temp File Directory
  708.  
  709. This tells EasyFold where to write it's temporary files and back-ups for the rolling back-up system.
  710.  
  711. /*HH2!2*/13.9. Keyboard Repeat Rate
  712.  
  713. There are three keyboard repeat rate settings.
  714.  
  715. * FAST: The keyboard will repeat at a rate of 30 characters per second.
  716.  
  717. * SLOW: The keyboard will repeat at a rate of 10 characters per second.
  718.  
  719. * SAME AS DOS: EasyFold will not change the repeat rate.
  720.  
  721. /*HH2!2*/13.10. Cursor appearance
  722.  
  723. 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:
  724.  
  725. SET CHANGECUR=0
  726.  
  727. in your "AUTOEXEC.BAT".
  728.  
  729. /*SH1!1*/
  730. /*#CP=00000:XX=99*/
  731.