home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / utilities / zap / !Zap / ZapPrimer / ZapPrimer < prev   
Encoding:
Text File  |  1994-03-25  |  28.0 KB  |  551 lines

  1.  
  2.  
  3.  
  4.  
  5.                    o----------------------------------------o
  6.                    |                                        |
  7.                    |  A short primer for the new Zap user   |
  8.                    |                                        |
  9.                    |              Version 1.10              |
  10.                    |                                        |
  11.                    o----------------------------------------o
  12.  
  13.  
  14.  
  15.  
  16.         Introduction
  17.         ============
  18.     This is not a 'manual' for Zap. It is intended as a short instruction
  19.     file for users who do not have experience of programmer's editors and
  20.     who find the rather technical instructions supplied with Zap confusing.
  21.     It will not teach you all about Zap, it won't even mention most of the
  22.     more advanced features. The aim is to get the inexperienced user over
  23.     the first hurdle so that you can begin to use Zap at the most basic
  24.     level. Once you have started to use it in preference to Edit you will
  25.     then be able to go on to discover how to change it to make it operate
  26.     the way you want. You will also be able to explore some of its more
  27.     sophisticated editing functions for yourself.
  28.  
  29.     I assume that you are already familiar with Edit and will describe how
  30.     you can set up Zap to work in a similar way.
  31.  
  32.     If you want to print this file (and if you need it I suggest you do)
  33.     then the easiest way to do so is to load it into Zap and just press the
  34.     Print key.  Alternatively you can double-click on the !Print file in
  35.     this same directory which will simply copy the file to your printer.
  36.  
  37.     If you are an experienced computer user who is familiar with editors on
  38.     the Archimedes and other computers then don't bother to read this, it
  39.     isn't intended for you.
  40.  
  41.  
  42.  
  43.         Copyright
  44.         =========
  45.     This text and the files associated with it are (C) David Holden 1993.
  46.     They may be freely copied and distributed by any PRIVATE INDIVIDUAL. You
  47.     must ONLY copy the complete package including the example Keys, Keystrip
  48.     and !Config file. You must NOT distribute it separate from the complete
  49.     Zap package to which it applies (currently version 1.10). You must NOT
  50.     substitute the Keys file for the one in the Zap application or put the
  51.     !Config file into the !Zap application directory. They must be
  52.     distributed separately to ensure that the original default files are
  53.     always included with Zap.
  54.  
  55.     It may NOT be distributed by any PD or Shareware Library or BBS or any
  56.     other not-private media without permission. It may not be changed,
  57.     edited, or in any way altered but you may include additional material if
  58.     you wish. If you do want to distribute this with Zap please let me know
  59.     so that I can supply you with an updates as new versions of Zap appear.
  60.  
  61.     These restrictions have not been imposed because I wish to stop it being
  62.     distributed by other libraries. On the contrary I want it to have a wide
  63.     circulation so that as many people as possible can be introduced to Zap.
  64.     However Zap is constantly being updated and improved and anything I
  65.     write or any examples I provide may not apply to other versions.
  66.  
  67.     It is therefore VERY important that these files should only be
  68.     distributed as part of the package to which they particularly refer. If
  69.     you are running a Library or BBS then write to me at the address below
  70.     (send a disc with a copy of your catalogue please) and I will send you
  71.     the latest versions of this file and the latest version of Zap. If you
  72.     have been sent a copy by either myself or Dominic Symes or if you have
  73.     acquired it as part of the COMPLETE !Zap package from any 'authorised'
  74.     distributor then  you automatically have permission to distribute it but
  75.     ONLY with the version of Zap with which it was included.
  76.  
  77.  
  78.  
  79.                     David Holden
  80.                     Archimedes Public Domain Library
  81.                     39 Knighton Park Road
  82.                     Sydenham
  83.                     London SE26 5RN
  84.  
  85.  
  86.                             _______
  87.                        ____|__     |               (R)
  88.                     --|       |    |-------------------
  89.                       |   ____|__  |  Association of
  90.                       |  |       |_|  Shareware
  91.                       |__|   o   |    Professionals
  92.                     -----|   |   |---------------------
  93.                          |___|___|    MEMBER
  94.  
  95.  
  96.  
  97.  
  98.         Text Editors
  99.         ============
  100.     There are two types of programs used for writing text on a computer,
  101.     Wordprocessors and Text Editors. It might seem that they perform similar
  102.     functions but in fact that is not the case. A wordprocessor is used for
  103.     producing text which will eventually be turned into a printed document.
  104.     This could be anything from a single page letter up to a book. More
  105.     exotic wordprocessors can handle fancy fonts and graphics and when they
  106.     reach this degree of sophistication they are called Desktop Publishing
  107.     programs. Wordprocessor files are not intended to be 'transportable'.
  108.     They contain embedded control codes and formatting commands which are
  109.     unintelligible to other programs.
  110.  
  111.     Text Editors can be used to prepare text which will be printed but that
  112.     is not their main purpose. The files they produce will normally contain
  113.     only the 'standard' characters. These are called Plain Text or ASCII
  114.     files. In fact different types of computer have different ideas of
  115.     'plain text' since the character set will vary between countries. The
  116.     character which marks the end of a line is also not standard.
  117.  
  118.     The Archimedes uses the ascii character code 10 at the end of each line,
  119.     the BBC computer used code 13 and the PC and Apple Mac use both
  120.     together. However in general a plain text file written on one computer
  121.     can be read on most other computers once these minor differences have
  122.     been put right. This is made easier if you confine yourself to the main
  123.     characters which appear on the computer keyboard and avoid special
  124.     symbols such as accented and currency characters.
  125.  
  126.     Most text editors have a few simple aids to text formatting such as
  127.     variable line length and wordwrap. You will probably be familiar with
  128.     these from Edit.
  129.  
  130.     Another use of text editors is for writing Source Code for compilers and
  131.     assemblers. Because programmers have special requirements a particular
  132.     type of text editor known as a Programmer's Editor has appeared.
  133.  
  134.  
  135.         Programmer's Editors
  136.         ====================
  137.     The biggest difference between a programmer's editor and a 'simple' text
  138.     editor like Edit is that it is, as its name suggest, designed to be used
  139.     by programmers. It therefore needs to be able to create and edit source
  140.     code for compilers such as 'C' or Pascal. As Basic is such a powerful
  141.     and widely used language on the Archimedes ideally it should also be
  142.     able to edit Basic programs. The RiscOS 3 version of Edit can do this
  143.     although earlier versions could not. It will need powerful Search and
  144.     Replace functions and should not be upset by files containing Control
  145.     Characters. It will not need complex text formatting or printing
  146.     controls because program source code would normally only be printed out
  147.     as a 'listing' for the programmer to examine so nothing fancy is needed.
  148.     It must be capable of basic text formatting and wordwrap because the
  149.     programmer will probably want to use his favourite editor for writing
  150.     short 'help' files for his program. Above all is must be FAST.
  151.  
  152.  
  153.     There is one requirement which separates the 'professional' programmers
  154.     editor from simple ones like Edit. Programmers are, by nature, perverse,
  155.     individualistic and self opinionated. Wherever three programmers are
  156.     gathered together there will be a minimum of four strongly held opinions
  157.     on any subject connected with computers. It follows that an editor
  158.     designed to be used by such people must be capable of being customised
  159.     to suit his/her requirements and temperament. All good programmer's
  160.     editors have some means whereby the keys used for the various functions
  161.     can be set by the user. They also permit things like screen colours and
  162.     as many other factors as possible to be altered.
  163.  
  164.     This is one reason why many new users of Zap become confused and give up
  165.     before they realise how superior to Edit it is. The Author of Zap spends
  166.     much of his time with computers running UNIX. He has therefore designed
  167.     the standard keyboard layout to conform to the UNIX editors with which
  168.     he is most familiar. You do not need to be bothered by this. Remember
  169.     that almost everything about Zap can be set the way you want it.
  170.  
  171.  
  172.         The vanishing cursor
  173.         ====================
  174.     Zap has a 'proper' cursor instead of the (often almost invisible) caret
  175.     and this is much easier to find, especially as you can define its colour
  176.     and make it flash if you wish. Earlier versions of Zap had a 'feature'
  177.     (translation:- bug) which can be a bit disconcerting to the new user.
  178.  
  179.     What happened was that when you used the mouse to scroll a window,
  180.     either the main scroll bars or the up and down arrow icons, the cursor
  181.     didn't move as the window scrolled. For example, if you loaded a long
  182.     file and used the mouse and scroll bars to move part way through it all
  183.     appeared to work normally. However if you pressed the Down Arrow key to
  184.     scroll down just one more line something very unexpected happened. You
  185.     suddenly discovered that were are back at the start of the file with the
  186.     cursor on the second line!
  187.  
  188.     This was completely different from the way that Edit and most other text
  189.     editors work. With these the cursor always remains within the window.
  190.     With this version of Zap the cursor can also be confined in this way and
  191.     the example !Config file supplied actually does this.
  192.  
  193.     Some users have now become accustomed to the 'old' method, myself
  194.     included, and have discovered that it does have it's uses. If you want
  195.     to 'browse' through the file you are editing then you can do so using
  196.     the scroll bars, but to return quickly to your original position (the
  197.     position of the cursor) all you need to do is tap one of the 'arrow'
  198.     keys and Zap will take you back there. This is another example of how
  199.     useful it is to be able to customise Zap, you aren't constrained by what
  200.     the Author decides is best but can change it to suit yourself.
  201.  
  202.  
  203.  
  204.         Configuring Zap
  205.         ===============
  206.     Zap uses two files for configuration. These are found in the !Zap
  207.     application directory. One is a Data file called !Config. This will not
  208.     be present when you first get your copy of Zap, it is created when you
  209.     select 'Save Options' from the 'Options' sub-menu. It sets colours, wrap
  210.     widths, cursor type, and most of the other 'visual' layout parameters.
  211.  
  212.     The most important is a text file called 'Keys'. This contains the
  213.     things that define how Zap will operate, including the all important key
  214.     binding table which tells Zap which keys should perform which functions.
  215.  
  216.     With this instruction file you should find two files which are intended
  217.     to replace the standard configurations. There should also be a Drawfile
  218.     of a keystrip. This 'keys' file is designed to mimic Edit to enable you
  219.     to become accustomed to Zap as easily as possible. Many of the more
  220.     powerful functions of Zap cannot be directly accessed via keystrokes
  221.     because they don't have keys assigned with this file. As you become more
  222.     experienced with Zap you will wish to alter the keys file so you can
  223.     access these functions but for the present they would only be confusing.
  224.     The full list of functions which can be bound to keys can be found in
  225.     the file 'Commands' in the 'Docs' sub-directory of the !Zap application
  226.     directory. This also contains instructions for creating your Keys file
  227.     and with the aid of this, the original Keys file supplied with Zap and a
  228.     bit of experimentation you should be able to work out how to make Zap
  229.     operate in the way that you require.
  230.  
  231.     To use these configuration files first make a working copy of Zap. If
  232.     you have a hard disc then copy zap onto your hard disc, if you are using
  233.     floppies then copy it to a new disc. Now delete the 'keys' file from the
  234.     application directory of this working copy and replace it with the file
  235.     of the same name supplied with this file. You should also copy the
  236.     !Config file into the application directory.
  237.  
  238.     When you start up this version of Zap it will use the keys shown on the
  239.     next page which are roughly equivalent to Edit. There are a few extra
  240.     ones which have no direct equivalent but are so useful that I didn't
  241.     want to leave them out. These are not the keys that I normally use and
  242.     no doubt you won't use them for long before you begin to make changes.
  243.  
  244.     As yet Zap has no equivalent to Edit's the 'expand tabs' and 'change
  245.     LF<->CR' functions. LF<->CR can be mimicked by 'search and replace'. For
  246.     example, to change all CR's to LF's enter in the 'Search' icon -
  247.  
  248.         \13
  249.  
  250.     and in the 'replace' icon -
  251.  
  252.         \10
  253.  
  254.     or to delete al CR's from a LF-CR terminated text file from a PC in the
  255.     search icon -
  256.  
  257.         \13
  258.  
  259.     and leave the 'replace' icon blank.
  260.  
  261.  
  262.  
  263.         F1          Execute 'learnt' key sequence (no equivalent)
  264.         F3          Save
  265.         F4          Find and Replace
  266.         F5          Goto line or address
  267.         F6          Mark beginning or end of block
  268.         F7          Copy marked block to cursor
  269.         F8          Renumber (BASIC mode only)
  270.         F9          Redo last action
  271.         F10         Undo last action
  272.  
  273.         Sh-F1       Toggle Insert/Overtype modes
  274.         Sh-F3       Immediate Save (no dialogue box)
  275.         Sh-F4       Find (no equivalent)
  276.         Sh-F6       Clear marked block
  277.         Sh-F7       Move marked block to cursor
  278.         Sh-F8       Delete marked block
  279.  
  280.         Ctrl-F2     Close current window
  281.         Ctrl-F5     Toggle wordwrap on/off
  282.         Ctrl-F6     Format paragraph
  283.  
  284.         Ctrl-B      Split line at cursor position (for BASIC mode, B=Break)
  285.         Ctrl-C      Copy marked block to cursor
  286.         Ctrl-L      Learn key sequence (no equivalent)
  287.         Ctrl-J      Join two lines (for BASIC mode)
  288.         Ctrl-N      Next match when Searching (no equivalent)
  289.         Ctrl-P      Previous match when Searching (no equivalent)
  290.         Ctrl-S      Swap case of character at cursor (no equivalent)
  291.         Ctrl-V      Move marked block to cursor
  292.         Ctrl-W      Next window. If there is more than one window open this
  293.                     will move the cursor to the next one (no equivalent)
  294.         Ctrl-X      Delete marked block
  295.         Ctrl-Z      Clear marked block
  296.  
  297.         Delete      Delete backwards
  298.         Copy        Delete forwards
  299.         Ctrl-Copy   Delete entire line
  300.         Sh-Copy     Delete from cursor to end of line (no equivalent)
  301.         Sh-Delete   Delete from cursor to start of line (no equivalent)
  302.         Print       Print file (no equivalent)
  303.  
  304.         Sh-Ctrl F0 to F7  Change to Zap mode 0-7 (more about these next)
  305.  
  306.  
  307.  
  308.  
  309.  
  310.         Zap Modes
  311.         =========
  312.     Unlike Edit Zap has a series of different 'modes'. The mode you will
  313.     probably use most, and the one that is similar to Edit, is Text Mode.
  314.     The reason for the different modes is to enable you to edit data in a
  315.     variety of ways. When you load a file into Zap it decides which is the
  316.     most appropriate mode to use, although like most features this can also
  317.     be defined in the keys file. Each mode can have various options, such as
  318.     the wrap width, set by the user.
  319.  
  320.     For the present I shall concentrate Text (mode 0) and BASTXT (mode 6)
  321.     because these are almost directly equivalent to the way that Edit works,
  322.     and BASIC (mode 5) because you may prefer this to BASTXT for editing
  323.     Basic programs. However you may wish to experiment with others. The two
  324.     others you will probably find most useful are Byte (mode 1) and Code
  325.     (mode 4).
  326.  
  327.     Byte mode edits a file in a window that looks like a disc sector editor.
  328.     It is particularly useful for editing Data files or other files which
  329.     don't contain normal text.
  330.  
  331.     Code mode shows a machine code or compiled program in in disassembled
  332.     format. In fact it makes Zap into a simple disassembler. There are
  333.     various functions which can be used when in this mode, such as following
  334.     Branches, assembling instructions, etc.
  335.  
  336.     BASTXT mode is the mode that most people prefer for editing Basic
  337.     programs. This converts a tokenised program to text when it is loaded
  338.     and back to Basic when you save it. It enables all the 'normal' editing
  339.     functions to be used just as if you were working on a text file. This is
  340.     the way that the RiscOS 3 version of Edit handles Basic programs and for
  341.     this reason I have used it as the default for this primer.
  342.  
  343.     If you think that Acorns Basic Editor is wonderful (!) then you may
  344.     prefer to use BASIC mode (mode 5). This operates in a similar manner to
  345.     Acorns (now obsolete) Basic Editor. If you want to use Zap in BASIC mode
  346.     (see below) then you will need to use the 'split line' and 'join line'
  347.     keys, otherwise these can be ignored.
  348.  
  349.     In the past I regarded the 'standard' Basic mode as so inferior to
  350.     BASTXT mode that I advised people not to use it. This is because when
  351.     Zap is in BASIC (as compared with BASTXT) mode it operates as a Line
  352.     Editor and works on the file in its tokenised form. This means that only
  353.     complete lines can be copied or moved, you have to worry about things
  354.     like renumbering, using a special key to split or join a line etc.
  355.     Previously the only 'good' thing about BASIC mode is that it will handle
  356.     GOTO's properly and automatically (but then you wouldn't put a GOTO
  357.     anywhere in your programs, would you?).
  358.  
  359.  
  360.     However from version 1.1 Zap has a feature which makes BASIC mode more
  361.     attractive. It can display the constituent parts of a program in
  362.     different colours. Keywords, line numbers, REM's and string constants
  363.     can all have there own colours defined which makes it much easier to
  364.     'read' a program and see how it is made up. Inexperienced programmers
  365.     often find this invaluable. Personally I still prefer the superior
  366.     editing ability of BASTXT mode but try them both and choose the one that
  367.     you like best.
  368.  
  369.     To change the mode that Zap uses by default load Zap and go to the
  370.     sub-menu 'Options' on the main menu. Click on 'Edit Keys'. This makes
  371.     Zap load the current Keys file from it's own application directory ready
  372.     for you to edit it. Press F5 to bring up the 'Goto' window, enter line
  373.     number 200 and press RETURN. Zap will now display the lines in this
  374.     region and you will find that about here are defined the modes that Zap
  375.     uses for each type of file. You should see a line -
  376.  
  377.         Basic          &1FFB    BASTXT
  378.  
  379.     Change this to
  380.  
  381.         Basic          &1FFB    BASIC
  382.  
  383.     Press SHIFT-F3 to 'quicksave' the Keys file (ie. it will be Saved
  384.     without any further prompting) and close the file window. Now click on
  385.     'Reload Keys' from the Options sub menu and Zap will re-interpret the
  386.     Keys file so the next time you load a basic program it will be in BASIC
  387.     mode instead of BASTXT. If you find you prefer the alternative method
  388.     just change the Keys file back again.
  389.  
  390.  
  391.  
  392.         Setting the Options
  393.         ===================
  394.     Each Zap mode can have many options set independently of the general
  395.     options, other items are common to all modes. I shall describe briefly
  396.     how you make these changes and then let you experiment for yourself.
  397.  
  398.     The 'Options' sub menu is where most of this customising is carried out.
  399.     As this leads to a series of sub-menu's you will probably find it best
  400.     to open this menu and drag it to the left of the screen because
  401.     otherwise as you open the other sub-menus they will obscure each other.
  402.     Keep the mouse pointer within the menus as you do this otherwise they'll
  403.     all close and you'll have to start again.
  404.  
  405.     I shall concentrate on only two items, Colours and Width. The first
  406.     thing you need to understand (or you'll soon become very confused) is
  407.     that when you change an option like Width it changes ONLY for the mode
  408.     that is currently selected.
  409.  
  410.     Go to the Options-> Mode sub menu and click on 'Text'. (Click on it with
  411.     ADJUST otherwise all the menus will close and you'll have to start
  412.     again. Now open the Options-> Display-> Width sub menu and look at the
  413.     width shown. If you are using the !Config file supplied with this text
  414.     it will be 112. Now go back to Config-> Mode and click on 'BASIC'. Look
  415.     at the Width after this and you will see it has changed to 76. What this
  416.     shows is that Zap has a different Width for each mode, and so if you
  417.     want to change it the change you make will apply ONLY to the currently
  418.     selected mode.
  419.  
  420.     Precisely the same situation applies to colours. The only difference
  421.     here is that to avoid having to change every colour in every mode you
  422.     can select 'All' on the Options-> Display-> Colours menu and the
  423.     colour(s) you select will be made in every mode. If you want one mode to
  424.     have different colours from another then de-select 'All' and select that
  425.     mode and the colours will apply to that mode only.
  426.  
  427.     There is a slight departure from this when you select BASIC mode. You
  428.     will find three more items appear on the Options-> Display-> Colours
  429.     menu. These set the colours used for REM's, Basic keywords and string
  430.     constants. Obviously these only apply in BASIC mode which is why they
  431.     don't appear if any other mode is selected.
  432.  
  433.     When you are satisfied with your choices click on 'Save Options' on the
  434.     Options menu.
  435.  
  436.     You will probably spend a bit of time exploring the various options and
  437.     discovering the effects of the changes. Most are fairly self evident and
  438.     the more obscure ones probably will not concern you at this stage.
  439.  
  440.  
  441.  
  442.         Using Search and Replace
  443.         ========================
  444.     Unlike Edit Zap has two Search windows. One simply 'finds' what you are
  445.     looking for, the other enables you to replace it with something else.
  446.     The advantage of this over Edits single window is that if you just want
  447.     to find something you can't accidentally press the wrong key and replace
  448.     it with a 'null string' (ie. delete it).
  449.  
  450.     The way that Zap's search function works is completely different from
  451.     Edit and it will probably take you a while to get used to it. However it
  452.     is MUCH more powerful and flexible.
  453.  
  454.     You have a choice of where you want the search to start from. You can
  455.     begin from the cursor position or from the start of the file. You also
  456.     have a choice of whether you want the search to be forwards or
  457.     backwards. Another feature is that you can choose the 'output' for the
  458.     search. This enables you to do more than just 'find' something. If you
  459.     select 'Cursor' then the cursor will simply move to wherever the search
  460.     string is found, just like Edit. If you choose 'To buffer' then when Zap
  461.     finds a match it will create a new file and copy each line where a match
  462.     is found to this new file. A window will open containing a list of all
  463.     the lines containing a match and you can save or edit this as usual. If
  464.     you want to go in your original file to any of the matches displayed in
  465.     the new window then just 'click' on the line in this window and Zap will
  466.     move the cursor to that line in your original file. Alternatively just
  467.     use the 'go to line' function since each match will have it's 'line
  468.     number' shown.
  469.  
  470.     Like Edit certain special characters can be used. These are all defined
  471.     by being preceded by the '\' character. A full list of these can be
  472.     found in the !Help file but a few examples are shown.
  473.  
  474.         \10         Matches ascii character number 10, eg the normal
  475.                     end-of-line character. \12 would find character 12 etc.
  476.         \|          Matches one string OR another. For example John\|Fred
  477.                     would match John or Fred.
  478.         \A          CTRL-A, \C would be CTRL-C etc.
  479.         \#          Any character
  480.         \*          Any number of the previous string. eg A\* would match A,
  481.                     AA, AAA etc.
  482.         \<          Finds the string only at the start of a line. eg. \<fred
  483.                     only finds 'fred' if it's the first word on a line.
  484.  
  485.     The biggest change from the way that Edit's Search function operates is
  486.     that Zap can use Search Macro's. If you click on 'Show Macros' in either
  487.     Search window the Macro Window will open. This shows the current macros.
  488.     When you enter a Search string if any of the characters you enter has a
  489.     macro defined for it then that macro will be substituted during the
  490.     search. I am not going into great detail about these. You will need to
  491.     experiment to find out exactly how they work and which macros you wish
  492.     to use. Like most other things they are all defined in the Keys file and
  493.     you will be able to see the current ones near the end.
  494.  
  495.  
  496.  
  497.         Learn
  498.         =====
  499.     This is another very powerful function which exists in all 'proper'
  500.     programmers editors but not in Edit. The idea is that Zap can 'learn' a
  501.     series of keystrokes and play them back on command. When editing or
  502.     modifying a file you may need to carry out the same operation many
  503.     times. Instead of being forced to manually repeat it you can teach Zap
  504.     what you want it to do and save yourself all the repetitive work.
  505.  
  506.     For example, if you had a text file which consisted of a a series of
  507.     lines made up of a code number, a name, and a description, like this;
  508.  
  509.     189554       Screw, Widget         The screw that fits the Widget
  510.     295677       Bolt, Mangel          The bolt that attaches the Mangel
  511.  
  512.     Now assume that you want to reduce the gaps between the three items so
  513.     that you can add to the descriptions like this;
  514.  
  515.     189554   Screw, Widget    The screw that fits the Widget
  516.     295677   Bolt, Mangel     The bolt that attaches the Mangel
  517.  
  518.     This is the same thing but with four spaces deleted between each section
  519.     which let's you add eight characters to your description with the same
  520.     line length. The way this is done 'manually' is to place the cursor
  521.     after the number and press COPY four times (or whatever key you have
  522.     chosen as Delete Forward), move it just after the first section and
  523.     press it four times again, then move down to the next line and repeat,
  524.     etc, etc. Instead of doing all this you can use Learn to do it for you.
  525.  
  526.     Move the cursor to the start of the first line. Press Ctrl-L to tell Zap
  527.     to start learning your keystrokes. Press the Right Arrow key six times.
  528.     This will move the cursor just after the number. Each time you press the
  529.     key the computer will 'beep' to remind you that Zap is recording what
  530.     you do. Now press the Copy key four times to delete the four spaces,
  531.     press Right Arrow eighteen times to move to the second 'gap' and Copy
  532.     four times once again. Now press Ctrl-Left Arrow to move to the start of
  533.     the line and Down Arrow to move down one line. When you have done this
  534.     the cursor should be at the start of the next line (ready to carry out
  535.     the next operation) and the line should be 'closed up' like the second
  536.     example. As you have finished the 'learning' process press Ctrl-L again
  537.     to tell Zap to stop recording what you do.
  538.  
  539.     All you need to do now is press F1 which makes Zap Execute the learnt
  540.     keystrokes and by 'playing back' the learnt sequence Zap will carry out
  541.     exactly the same operation on the second line that you did manually on
  542.     the first. You will then find that the cursor has been moved to the
  543.     third line, just as you moved it to the second, so just press F1 again
  544.     to do the third line and so on to the end of the file.
  545.  
  546.     Of course it might have been simpler in this case to use 'Search and
  547.     Replace' but this does show how the Learn function can can save a lot of
  548.     typing and, because each sequence will be carried out precisely as the
  549.     first, there is less chance of mistakes.
  550.  
  551.