home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STFORMAT / STF41B.MSA / TUTOR3 < prev    next >
Encoding:
Text File  |  1990-11-22  |  12.1 KB  |  69 lines

  1.  
  2.             ---------------------------------------------
  3.              P R O T E X T   T U T O R I A L   F I L E S
  4.             ---------------------------------------------
  5.  
  6.                             T U T O R   3.
  7.  
  8.              CUT AND PASTE EDITING and FIND AND REPLACE.
  9.  
  10. PROTEXT is supplied with a number of tutorial files for the purpose of
  11. providing a quick and easy method  of  learning the most commonly used
  12. commands. Each file covers a particular aspect of word processing.
  13.  
  14.        ***** PRESS ESC KEY TO CONTINUE WITH THE TUTORIAL *****
  15.  
  16. >---!--!-------!-------!-------!-------!-------!-------!-------!----R
  17.  
  18.     Cut and Paste Editing is one of ❎Éthe names given to the functions èwhich enable you to move, copy ❎Éor ❎Édelete ❎Éareas of text. PROTEXT is èparticularly flexible in ❎Éthis ❎Érespect.è
  19.     The procedure is initially the same whether a block of text is to èbe moved, copied or deleted, in that you must set two markers, one at èthe start of the block of text and ❎Éthe other at the end. It does not èmatter which is ❎Éset ❎Éfirst, ❎Éas ❎ÉPROTEXT ❎Éautomatically ❎Éadjusts the èmarkers so they are the correct way round. 
  20.  
  21.     Move the cursor to the start ❎Éof ❎Éthe first line of the preceding èparagraph and press CTRL-Z. You ❎Éwill ❎Ésee ❎Éthat ❎Éthe block marker is èrepresented on the screen ❎Éas ❎Éan ❎Éinverse ❎Évideo square bracket. The èfirst one set will always be an ❎Éopening square bracket. Now move the ècursor down to the start ❎Éof ❎Éthe ❎Éfirst ❎Éline ❎Éof this paragraph and èpress CTRL-Z a second time. This time an inverse video closing square èbracket will mark the ❎Étext. ❎ÉYou ❎Éhave ❎Énow ❎Émarked ❎Éa block of text èconsisting of all the text between the two block markers.
  22.  
  23.     You will see that on ❎Éthe ❎ÉStatus ❎Éline which previously said 'No èmarkers set', there will now be ❎Étwo square brackets to indicate that èboth block markers are set.
  24.  
  25.     If you find ❎Éthat ❎Éyou ❎Éhave ❎Épositioned ❎Éa ❎Émarker ❎Éin the wrong èposition it can easily be removed ❎Éby ❎Épositioning the cursor over it èand pressing CTRL-Z yet again, or ❎Éby ❎Éusing the appropriate DEL key. èAlternatively any block markers ❎Éwhich ❎Éare ❎Éset ❎Écan be cancelled by èpressing CTRL-K.
  26.  
  27.     If both markers are already set when ❎Éyou ❎Étry to set a marker, a èbeep will sound and a ❎Émessage ❎Éappear ❎Éon ❎Éthe status line to inform èyou. You must press the ESC key ❎Éto ❎Éreturn to edit mode. If you know èyou do not want the old ❎Émarkers ❎Éthen ❎ÉCTRL-K ❎Écan be used to delete èthem before setting the new ones. ❎ÉOn ❎Éthe other hand, you might want èto have a look at them ❎Ébefore ❎Éremoving ❎Éthem and PROTEXT provides a ècommand to enable you to ❎Équickly ❎Éfind ❎Éthem, without having to look èthrough the text. 
  28.  
  29.     In an earlier tutorial you learnt how to set place markers in the ètext and how to ❎Éfind ❎Éthem ❎Éby ❎Épressing ❎ÉCTRL-@ ❎Éand then the place èmarker number. In a similar way, ❎Éwe ❎Écan ❎Éuse CTRL-@ with either the èopening or closing bracket to jump ❎Éstraight to whichever bracket was èchosen. Press CTRL-@, release and ❎Éthen ❎Épress the square bracket key èand the cursor will position itself on the block marker.
  30.  
  31.     Having selected the block you ❎Écan ❎Éthen ❎Édecide whether to move, ècopy or delete it. We shall describe the copy command first.
  32.  
  33.     Move the cursor ❎Édown ❎Éand ❎Éposition ❎Éit ❎Éat ❎Éthe ❎Éstart ❎Éof this èparagraph and press CTRL-INSERT. You will find that the block of text èhas been copied down to the cursor ❎Éposition. You will also find that èthe block markers have moved with the ❎Éblock. If you look back in the ètext, you will find that the original piece of text is still there. 
  34.  
  35.     You could have moved the block of ❎Étext instead of copying it and èto show how this works we shall now move the block down from where we ècopied it, to immediately after this ❎Éparagraph. Move the cursor down èto the start of the next paragraph and this time press CTRL-M to move èthe text. If you look this time, the block of text will be at the end èof this paragraph, complete ❎Éwith ❎Émarkers, ❎Ébut ❎Éif ❎Éyou look at the èstart of this paragraph, the ❎Étext ❎Éwill ❎Éno ❎Élonger be there. It has èbeen moved, rather than copied. ❎É
  36.  
  37.     As the block markers are still set ❎Éit ❎Éis a good time to look at èthe third of the ❎Éblock ❎Écommands, ❎Éthe ❎É'delete block' command. Just èpress CTRL-DELETE, and ❎Éa ❎Émessage ❎Éat ❎Éthe ❎Étop ❎Éof ❎Éthe screen will èrequest confirmation that you want to ❎Édelete the block, before doing èso.
  38.  
  39.     Blocks of text may be any ❎Ésize ❎Éand anywhere in the document. In èthe examples shown above, complete ❎Élines ❎Éwere ❎Émoved. This was done èdeliberately, as this is one ❎Éof ❎Éthe ❎Émost ❎Écommon uses of the block ècommands, but a block can ❎Éstart ❎Éand ❎Éend ❎Éanywhere ❎Éand could be as èshort as one letter, though this ❎Éwould be rather pointless. Moving a èfew words around a sentence or ❎Éparagraph ❎Éis ❎Éa fairly common use as èwell. Try moving a few words around in a sentence.
  40.  
  41.     One thing which should be noted ❎Éis ❎Éthat ❎Éthe cursor must not be èinside the marked block when the ❎Émove ❎Éor copy commands are used, as èit is not possible to copy ❎Éor ❎Émove ❎Éa ❎Éblock into itself. If you do èattempt to do so, PROTEXT will display an error message on the status èline.
  42.  
  43.     CTRL-Y is a command which, ❎Éthough ❎Énot solely connected with the èprocess of cut and paste editing, ❎Éis frequently used with it. CTRL-Y èis used to switch between ❎Étwo ❎Édocuments ❎Éin memory. Full details of è'Two file editing' are provided in ❎Éthe ❎Émanual, but just to give you èan idea of the possibilities, ❎Émark ❎Éthis complete paragraph with the èblock markers, but this time, instead of ❎Éusing one of the copy, move èor delete commands, press CTRL-Y, ❎Éfollowed ❎Éby CTRL-O (letter O, not èzero). You should now find that you ❎Éare in a new document containing èonly the marked block of text. Look ❎Éat ❎Éthe status line and you will èsee the message 'No File', indicating ❎Éthat ❎Éit is a new document. If èyou now press CTRL-Y again, PROTEXT ❎Éwill switch back to the original èdocument, which will still contain the original block of text. CTRL-Y ètoggles between the two documents, ❎Éwhilst ❎ÉCTRL-O ❎Éis the command to ècopy the contents of a block ❎Éinto ❎Éthe ❎Éother document. The block of ètext is always copied ❎Éover ❎Éto ❎Éthe ❎Éposition ❎Éof ❎Éthe cursor in the èsecond document. The original block of text will still have the block èmarkers round it, so it is ❎Éeasy ❎Éto ❎Épress CTRL-DELETE to remove the èoriginal text if required.
  44.  
  45.     The above operation, as you have seen, provides a most convenient èway to transfer sections ❎Éof ❎Éone ❎Édocument ❎Éto ❎Éanother ❎Éand is much èquicker than saving blocks of ❎Étext ❎Éand ❎Émerging them into the other èdocument. The second document is an ❎Éentirely normal document and any èof the command mode and editing ❎Écommands ❎Écan be used. You will also èhave noticed that ❎Éwhen ❎Éyou ❎Éswitch ❎Ébetween ❎Édocuments, ❎Éthe cursor èposition is remembered, together with all the settings of the various èblock and place markers, justification etc.
  46.  
  47.  
  48.     The second part ❎Éof ❎Éthis ❎Étutorial ❎Éis ❎Éconcerned ❎Éwith ❎Éa brief èdescription of the FIND ❎Éand ❎ÉREPLACE ❎Éfunctions provided by PROTEXT. èThese are two of the few ❎Éediting ❎Écommands which are largely carried èout from command mode.
  49.  
  50.     Because FIND and REPLACE are ❎Éused ❎Éfrom command mode, a tutorial èfile is not the ideal way to ❎Élearn ❎Éhow to use them, so we recommend èthat you consult the chapter in ❎Éthe ❎Émanual which gives full details èof their operation. The following few paragraphs give a brief look at èthe options and how to use them.
  51.  
  52.     Both options work in ❎Éa ❎Ésimilar ❎Éway, ❎Éthe difference being that èFIND merely searches ❎Éfor ❎Éa ❎Échosen ❎É'string' ❎Éof characters, whilst èREPLACE will both ❎Éfind ❎Éthem ❎Éand ❎Éreplace ❎Éthem ❎Éwith ❎Éa substitute èstring. A string of characters ❎Éis ❎É❎Éa collection of letters, numbers èor punctuation marks that can ❎Ébe ❎Éfound ❎Éin consecutive positions in èthe document. Included in the ❎Éstring ❎Émay ❎Ébe printer control codes, ètabs and returns.
  53.  
  54.     The easiest way to ❎Éfind ❎Éout ❎Éhow ❎Éto ❎Éuse ❎Éthe Find and Replace èoptions is to try them. ❎ÉBefore ❎Éusing ❎ÉESC ❎Éto go into command mode, èmove the text up the screen so that the following paragraph is at the ètop of the screen and will ❎Ébe ❎Évisible ❎Éeven ❎Éin command mode. Set a èplace marker ❎Éin ❎Éthe ❎Étext ❎Éso ❎Éthat ❎Éyou ❎Écan ❎Éeasily ❎Éreturn ❎Éhere èafterwards. Press ESC ❎Énow ❎Éto ❎Éleave ❎Éedit ❎Émode ❎Éand ❎Éthen continue èreading the next paragraph.
  55.  
  56.     From command mode type FIND ❎Éand ❎Épress ❎ÉRETURN. You will then be èprompted with ❎É'FIND ❎Éstring' ❎Éand ❎Éshould ❎Énow ❎Éenter ❎Éthe ❎Éword ❎Éor ècharacters that you want to find. ❎ÉIn ❎Éthis example we shall look for èthe word 'string', so type that in and press RETURN. Next you will be èasked to select 'Options (A,B,C,G,W,n)'. This time we will not select èany options, so just press RETURN when you have read the remainder of èthis paragraph. PROTEXT will return to edit mode and start searching. èWhen it finds the ❎Éfirst ❎Éoccurrence ❎Éof ❎Éthe ❎Éword 'string', it will èposition the cursor on the first character ❎Éof the word, in this case è's'. At this point you ❎Écan ❎Éresume ❎Éediting ❎Éif ❎Éyou want, or if you èpress CTRL and the ) key on the ❎Ékeypad at the right of the keyboard, èPROTEXT will continue ❎Éthe ❎Ésearch. ❎ÉIf ❎Éyou ❎Éhad ❎Échosen ❎Éto do some èediting, you could ❎Éstill ❎Éhave ❎Écontinued ❎Éthe ❎Ésearch ❎Éwhenever you èwanted, by pressing the CTRL-keypad ) ❎Ékey. When all occurrences have èbeen found, return to here by using the marker you set earlier.
  57.  
  58.     Instead of pressing CTRL-keypad ❎É) ❎Éto ❎Écontinue ❎Éthe search, the èkeypad ( key could have been used and would have caused the search to èbe resumed in the reverse direction ❎Éfrom ❎Ébefore. This allows you to èback track if needs be.
  59.  
  60.     By default, with no options ❎Éselected, ❎ÉPROTEXT ❎Éwill carry out a èsearch of the document from ❎Éthe ❎Écursor position, forwards, ignoring èthe case of all letters and ❎Éfinding ❎Éall occurrences, even when they èare part of a  longer word.
  61.  
  62.     PROTEXT is very flexible in ❎Éthe ❎Évariety ❎Éof different ways that èyou can search for a string. ❎ÉIt ❎Éis ❎Épossible to specify a number of èoptions which will ❎Édecide ❎Éwhat ❎Éform ❎Éthe ❎Ésearch ❎Éwill ❎Étake. Full èdetails are given in the manual ❎Éof ❎Éwhat the various options do, but èbriefly, they permit you to do a ❎Églobal search of the whole document è(G), search backwards (B), search ❎Éfor ❎Éwhole ❎Éwords only (W), search èonly for words with all ❎Écharacters ❎Éin ❎Éthe ❎Ésame case as the search èstring (C), search for the ❎Énth ❎Éoccurrence ❎Éof ❎Éa string (any number èbetween 1 and 255) ❎Éand ❎Éfinally ❎Éthere ❎Éis ❎Éan automatic option (A), èwhich can be used to return ❎Éthe ❎Étotal ❎Énumber of occurrences of the èstring.
  63.  
  64.     REPLACE is very similar to ❎ÉFIND, ❎Éthe only difference being that èyou are also requested to give a string to replace the original with. èAs before, PROTEXT will position ❎Éthe ❎Écursor on the first occurrence èof the string, but this time a message ❎Éwill appear at the top of the èscreen, on the status line, asking ❎Éyou to confirm 'Replace Y/N?'. If èyou select ❎Éthe ❎ÉN ❎Éoption ❎Éthe ❎Ésearch ❎Éwill ❎Écontinue, ❎Éleaving the èoriginal string unchanged. Selecting Y ❎Éwill ❎Éreplace the string with èthe new one and continue the ❎Ésearch. Alternatively, if you press ESC èwhen the 'Replace Y/N?' is displayed, the search is abandoned and you ècan continue with further editing. ❎ÉIf ❎Éyou ❎Élater decide to continue èthe search, then pressing ❎ÉCTRL-Keypad) ❎Éor ❎ÉCTRL-Keypad( will resume èthe search from the cursor position. Try using REPLACE to replace all èoccurrences ❎Éof ❎Éthe ❎Éword ❎É❎É'string' ❎É❎Éwith ❎É❎É'STRING', ❎Éasking ❎Éfor èconfirmation each time. ❎ÉThe ❎É'(A)utomatic' ❎Éoption ❎Éwill ❎Échange all èoccurrences without requesting confirmation and ❎Éwill give a count of èthe total number of replacements made.
  65.  
  66.     If you wish to continue with ❎Éthe ❎Étutorial files, you should now èreturn to command mode and enter:- 
  67.  
  68.                 LOAD TUTOR4
  69.