home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / editor / gal210a4.arc / GALCH3.GAL < prev    next >
Encoding:
Text File  |  1987-07-20  |  10.0 KB  |  370 lines

  1. .a lp=12,js=y,ct=n bo=51 te=12 to=90 pn=1 nm=1
  2. .st3,14,1
  3. &dChapter%Three:%%Working%with%Multiple%Files  .jc
  4. &d[%Chapter%Three%]  .HC
  5. .t36 3 - .zl
  6.  
  7.  
  8.  
  9.  
  10.             &d3.1%MOVING%TEXT%BETWEEN%FILES   .jr
  11.  
  12.  
  13. .st3,12,1
  14. &dUsing%Delete/Replace%to%Move%Text:
  15. .t10 &d<%SHIFT%>%<%F9%>%and%<%SHIFT%>%<%F10%>
  16. .st3,11,1
  17.      Sometimes it is convenient to move material from one file to another.  The
  18. <%SHIFT%> <%F9%> and <%SHIFT%> <%F10%> keys provide an easy way to do this.
  19.  
  20.      To remove a any amount of text from a file use <%SHIFT%> <%F9%>:
  21.  
  22. .std3,12,1
  23.         PROCEDURE FOR REMOVING TEXT .jc
  24. .st3,11,1
  25. .i10
  26. .u3 1. .t10 Place the cursor at the start of the text that you wish to remove
  27. .u3 2. .t10 Press <%SHIFT%> <%F9%>
  28. .u3 3. .t10 Place the cursor at the end of the text that you wish to remove
  29. .u3 4. .t10 Press<%SHIFT%> <%F9%> again
  30. .i
  31.  
  32.      The block of text between the first and second cursor positions will
  33. disappear from the screen.  However, this block is saved in a buffer.  To
  34. replace it anywhere in the file simply move the cursor to the desired location
  35. and press <%SHIFT%> <%F10%>.  (See Chapter Four for an illustration of this
  36. procedure.)
  37.  
  38.      Text removed with <%SHIFT%>%<%F9%> remains in the text buffer to be
  39. inserted again and again. This is useful for passages that you wish to repeat.
  40. The text will remain in the buffer until you use <%SHIFT%> <%F9%> again, or
  41. until you exit Galahad. Even when you load a new file the text remains in the
  42. buffer.  Therefore, you can move blocks of text between files as follows:
  43.  
  44. .std3,12,1
  45.         PROCEDURE FOR MOVING TEXT BETWEEN FILES .jc
  46. .st3,11,1
  47. .i10
  48. .u3 1. .t10 Load the file containing the text you wish to move
  49. .u3 2. .t10 Use <%SHIFT%> <%F9%> to remove the text, placing it in the buffer
  50. .u3 3. .t10 Load the second, "target," file&d*
  51. .u3 4. .t10 Use <%SHIFT%> <%F10%> to place the text in the target file
  52. .i5
  53.  
  54. %%&d*&nIn step 3, it is usually best not to save your original file.  In that
  55. way you won't be saving any changes you made in removing the text with
  56. <%SHIFT%> <%F9%>.  The file on the disk will remain unchanged.  .i
  57.  
  58.  
  59.  
  60.  
  61.  
  62. .st3,14,1
  63.                        &d3.2%LOADING%MORE%THAN%ONE%FILE  .JR
  64. .st3,11,1 .x-5
  65.  
  66.  
  67.      In working with more than one file, it is awkward to save and load each
  68. time you want to move between files.  Galahad allows you to load several files
  69. at once and move between them easily.
  70.  
  71.  
  72.  
  73. .st3,12,1
  74. &dThe%LoadBuffer%Command:%%%%<%KP+>
  75. .st3,11,1
  76.      In Chapter 1 you were told to load a file using the LOAD command or by
  77. pressing <%KP+%>.  These instructions were not absolutely correct.  There are
  78. two 'load' commands: %LOAD, and %LOADBUFFER.  LOAD is assigned to <%CTRL%>
  79. <%F3%>, and LOADBUFFER is assigned to <%KP+%>.
  80.  
  81.      The LOAD command erases the text in the current buffer and then loads
  82. another file into that buffer.  LOADBUFFER loads the file into a new buffer and
  83. does not destroy the text in your current buffer.  So this is the preferred
  84. command. %(We didn't want to confuse you with details earlier).
  85.  
  86.      To load multiple files, you must use the LoadBuffer command.  The <%KP+>
  87. invokes the LoadBuffer command.  Use the following procedure:
  88.  
  89. .std3,12,1
  90.           PROCEDURE FOR LOADING MULTIPLE FILES .jc
  91. .st3,11,1
  92.     1. Enter the EDIT mode
  93.     2. Press <%KP+%>
  94.     3. Enter the name of a file that you wish to load
  95.     4. Press <RETURN>
  96.     5. Repeat procedure from line 2 until all files loaded
  97.  
  98. .sto3,11,1
  99. NOTE:  If you really want to cover up the current text with data from a new
  100. file, use the LOAD command (<%CTRL%> <%F3%>).
  101.  
  102.  
  103.  
  104. .st3,12,1
  105. &dDisplaying%Files%in%the%File%Buffers:
  106. .t10 &d<%SHIFT%>%<%BACKSPACE%>
  107. .st3,11,1 .x-5
  108.      Once you have loaded multiple files, you can move between them easily by
  109. holding down the <%SHIFT%> key and pressing <%BACKSPACE%>.
  110.  
  111.      Files are held in the file buffer in the order in which you entered them,
  112. and can be displayed sequentially.  Suppose for instance that you load three
  113. files into into the buffer.  Call them:
  114.  
  115.         Plato1
  116.         Plato2
  117.         Plato3
  118.  
  119. If you are looking at Plato1, you can display Plato2 by pressing <%SHIFT%>
  120. <%BACKSPACE%>.  Plato2 will appear immediately.  To view Plato3 press <%SHIFT%>
  121. <%BACKSPACE%> again.  And if you press <%SHIFT%> <%BACKSPACE%> again you will
  122. return to Plato1 again.
  123.  
  124.  
  125.      You can remove a file from the file buffer simply by displaying it and
  126. using the ScratchText command, <%CTRL%> <%F6%>.
  127.  
  128.  
  129.  
  130.  
  131. .st3,14,1
  132.                      &d3.3%WINDOWS  .JR
  133. .st3,12,1
  134.  
  135.  
  136. &dWindows:
  137. .t10 &d<%SHIFT%>%<%F4%>,%<%SHIFT%>%<%BACKSPACE%>%and%<%SHIFT%>%<%F5%>
  138. .st3,11,1
  139.      Sometimes it is useful to look at two files at once.  This can be done
  140. with Galahad's Window capability.  To split the screen into two windows use the
  141. following:
  142.  
  143. .std3,11,1
  144.                  PROCEDURE FOR CREATING TWO WINDOWS .jc
  145. .st3,11,1
  146. .i10
  147. .u3 1. .t10 Load two or more files into the file buffer
  148. .u3 2. .t10 While in Edit mode, press <%SHIFT%> <%F4%>
  149. .u3 3. .t10 Use <%SHIFT%> <%BACKSPACE%> to display the desired file in the top
  150. window
  151. .u3 4. .t10 Press <%SHIFT%> <%F5%> to move the cursor to the bottom window.
  152. .u3 5. .t10 Use <%SHIFT%> <%BACKSPACE%> to display the desired file in the
  153. bottom window.
  154. .i
  155.  
  156. The <%SHIFT%> <%F5%> sequence will toggle the cursor between the top and bottom
  157. windows.  Whichever window the cursor is in is the active file.  When the
  158. window is active you can edit it, save it, load a new file, or any of the usual
  159. Galahad functions.
  160.  
  161.  
  162.      For an example of windows consider the files Plato1, Plato2, and Plato3.
  163. I have saved these files so that the contents of Plato1 is the line, "This is
  164. Plato 1."   Plato2 and Plato3 have corresponding messages.
  165.  
  166.      Now, suppose we enter the Edit mode and load each of these files into the
  167. file buffer.  If the last file I loaded was Plato3 then the screen will appear
  168. as in Figure 3.1
  169. .g
  170. .rh1,78
  171.  
  172.  &d_T&nhis is Plato 3.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.                                                     C1 %% L1/2 %%% 1%
  188. .rh1,78
  189.  
  190. Figure 3.1 The Screen After Loading Plato3  .jc
  191.  
  192.  
  193.  
  194.      Now by pressing <%SHIFT%> <%F4%>, we can create two windows as shown in
  195. Figure 3.2
  196.  
  197.  
  198.  
  199. .rh1,78
  200.  &d_T&nhis is Plato 3.
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210. .rh1,11 .t12 /=\ A:Plato3.GAL /=\ .rh33,45 .t46 =\/ A:Plato3.GAL =\/ .rh65,78
  211.  
  212.  This is Plato 3.
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.                                                     C1 %% L1/2 %%% 1%
  223. .rh1,78
  224.  
  225. Figure 3.2 The Two Window Screen:  <%SHIFT%> <%F4%>  .jc
  226.  
  227.  
  228.  
  229.  
  230.      The line in the center splits the screen into two windows and the
  231. arrowheads in the center mean that the top window displays Plato3, while the
  232. bottom displays the same file.  The cursor is in the top window, so you can use
  233. any of the Galahad functions with the file in this window.
  234.  
  235.  
  236.      Use <%SHIFT%> <%BACKSPACE%> to change the file in the top window.  You
  237. will not need to save the title each time you change it for another file in the
  238. buffer.  Press <%SHIFT%> <%BACKSPACE%> once to display the file Plato1 as shown
  239. in Figure 3.2.
  240.  
  241.  
  242.  
  243.  
  244.  
  245. .rh1,78
  246.  
  247.  &d_T&nhis is Plato 1.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. .rh1,11 .t12 /=\ A:Plato1.GAL /=\ .rh33,45 .t46 =\/ A:Plato3.GAL =\/ .rh65,78
  257.  
  258.  This is Plato 3.
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.                                                     C1 %% L1/2 %%% 1%
  268. .rh1,78
  269.  
  270. Figure 3.3 Windows Containing Different Files:  <%SHIFT%> <%BACKSPACE%>  .jc
  271.  
  272.  
  273.      Notice that the center line now indicates that Plato1 is in the top
  274. window, and that Plato3 is in the bottom file.
  275.  
  276.  
  277.      To move the cursor down making the bottom window active, simply press
  278. <%SHIFT%> <%F5%>.
  279.  
  280.  
  281.  
  282.  
  283.  
  284. .st3,12,1
  285. &dMoving%Text%In%Two%Window%Mode:
  286. .st3,11,1
  287.      When you are in the two window mode it is easy to move text from one file
  288. to the other.  Use the following procedure:
  289.  
  290. .std3,12,1
  291.       PROCEDURE FOR MOVING TEXT BETWEEN FILES IN TWO WINDOW MODE .jc
  292. .st3,11,1
  293. .i10
  294. .u3 1. .t10 Load one file in each window.
  295. .u3 2. .t10 Use <%SHIFT%> <%F9%> to remove the text from one file.
  296. .u3 3. .t10 Press <%SHIFT%> <%F5%> to change windows.
  297. .u3 4. .t10 Use <%SHIFT%> <%F10%> to place the text in the second file.
  298. .i
  299.  
  300.  
  301.  
  302.  
  303. .st3,12,1
  304. &dMaking%Windows%Larger:%%%<%SHIFT%>%<%F6%>
  305. .st3,11,1
  306.      If you are in the two window mode you can make a window larger use
  307. <%SHIFT%> <%F6%>.  The window that the cursor is in will grow a line at a time.
  308. Because the screen is a constant size, one window can grow only at the expense
  309. on the other.  If you wish to restore the size of the other window, move the
  310. cursor with <%SHIFT%> <%F5%> to change windows, and then use <%SHIFT%> <%F6%>.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317. .st3,12,1
  318. &dReturning%to%the%Single%Window%Mode:
  319. .t10 &d<%SHIFT%>%<%F3%>
  320. .st3,11,1
  321.      To return from the two window mode to the screen display of a single file,
  322. press <%SHIFT%> <%F3%>.  If the cursor is in the top window, then the file that
  323. is in the top window will be displayed on the entire screen.  If the cursor is
  324. in the bottom window, then the file that is in the bottom window will be
  325. displayed on the entire screen.
  326. .g
  327. .st3,12,1
  328. &dReview%3.1
  329. .st3,11,1
  330.      Review the keys and commands that appeared in this chapter.
  331.  
  332. .t3,18,41
  333. 1. To move text from one file to another use:
  334.  
  335.  
  336. .t4 _Command .t21 _Key  .t45  _Comment
  337.  
  338. .t SelectText .t <SHIFT><F9> .t Deletes a block of text
  339. .t Inserttext .t <SHIFT><F10> .t Inserts text at cursor
  340.  
  341.  
  342.  
  343. 2. To load and edit multiple files use:
  344.  
  345.  
  346. .t4 _Command .t21 _Key  .t45  _Comment
  347.  
  348. .t LoadFile .t <ALT><F3> .t Loads a file into the current buffer
  349. .t LoadBuffer .t <KP+> .t Loads a file in a new buffer
  350. .t NextBuffer .t <SHIFT><BACKSPACE> .t Displays next file in file buffer; each
  351. .t .t .t NextBuffer displays buffers in circular fashion.
  352.  
  353. .t ScratchText .t <CTRL><F6> .t Removes the file currently being
  354.  .t  .t .t displayed file from file buffer
  355.  
  356.  
  357.  
  358.  
  359. 3. To control Window mode use:
  360.  
  361.  
  362. .t4 _Command .t22 _Key  .t45  _Comment
  363.  
  364. .t OneWindow .t <SHIFT><F3> .t Returns to single window
  365. .t TwoWindow .t <SHIFT><F4> .t Creates two windows
  366. .t OtherWindow .t <SHIFT><F5> .t Moves cursor from current window to
  367.  .t  .t .t other window making it active
  368. .t GrowWindow  .t <SHIFT><F6> .t Makes window larger a line at a time
  369. .g2
  370.