home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / VORX / VAXEDT.ARC / EDIT.DOC next >
Text File  |  1980-01-01  |  22KB  |  626 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                Edit User Manual
  7.                        Program written by Rick McClain
  8.  
  9. I. Introduction
  10.  
  11. Edit  was  designed  to function much like Digital Equipment Corporation's EDT
  12. editor for the VAX  computer.  Edit  was  primarily  written  in  IBM  Pascal,
  13. excepting  screen,  disk, and text buffer utilities, which were written in IBM
  14. Macro Assembler. IBM Pascal proved to be  an  excellent  language  choice  for
  15. Edit.  Edit  executes  fast  and is memory efficient. The nearly 2000 lines of
  16. source code in Edit resulted in a program size of only 19k. As a result,  Edit
  17. can  be  used  in  systems  with  as  little  as 48k of memory. The only other
  18. requirements are at least one disk drive and  an  80  column  display  (either
  19. color or monochrome card).
  20.  
  21. Edit  is  compatible  with  BASIC (when saved with the A option), all of IBM's
  22. compilers, and the IBM assembler. The format of the text  files  generated  by
  23. Edit is identical to the format generated by IBM's Edlin line editor.
  24.  
  25. The  philosophy  behind  Edit is that an editing program should not impede the
  26. thought processes of the programmer or writer who uses it. What you see on the
  27. screen is your text. To add to it you position the cursor and  type.  To  help
  28. you  locate  a specific point in your text a search function is provided which
  29. searches either forward or backward with equal speed for any search string you
  30. type in. Multiple searches can be performed without retyping  the  string.  To
  31. move text around, a cut and paste function is provided. You select the text to
  32. be  cut by positioning the cursor and pressing a select key. Now when you move
  33. the cursor, the selected text appears in reverse  video.  You  don't  need  to
  34. remember where you placed the select point, you are provided instant feedback.
  35. Press the cut key and the selected text disappears. Move the cursor, press the
  36. paste  key  and  it  reappears.  Press  the  paste key again and a second copy
  37. appears. To aid you in formatting your program or  text,  Edit  provides  user
  38. definable  tabs  as  well  as  default  settings  useful for Pascal or Fortran
  39. programming.
  40.  
  41. Editing in Edit takes place on text which resides in the memory  text  buffer.
  42. Edit  adapts  the  size  of the text buffer to use all available memory in any
  43. system on which it is run. Edit works best when  files  fit  within  the  text
  44. buffer,  because one can quickly move about the whole file. However, Edit does
  45. have features, similar to IBM's Edlin editor, for dealing  with  large  files.
  46. When  a  file  is too large to fit in memory, only part of it is read into the
  47. text buffer. After the text in memory is edited, some of the  text  buffer  is
  48. written out to disk, making room for more of the input file.
  49.  
  50. Edit  allows you to move about the text buffer very quickly. Moving the cursor
  51. in every direction proceeds at the speed of the  keyboard  auto  repeat.  This
  52. means  that  you  can  scroll  through  the text buffer at a speed of about 10
  53. lines/second. You can page through the text buffer at 50 lines/second.  Moving
  54. along  a line is aided by keys to move the cursor from word to word. Moving to
  55. the top or bottom of the text buffer is instantaneous.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. II. Getting started
  70.  
  71. Using Edit requires the monochrome display card, a disk drive and at least 48k
  72. of memory. To run Edit, insert the disk in either (or the  only)  drive.  Then
  73. type (see footnote)
  74.  
  75.                         [d:]edit
  76.  
  77. The drive designator is necessary only if edit was not inserted in the default
  78. drive.  After  Edit is loaded and the copyright information is displayed, Edit
  79. will issue an asterisk (*) as a prompt. If you wish, you can  now  remove  the
  80. Edit  disk, because all of Edit is now loaded into memory, which allows you to
  81. now insert your work disks into the drive.
  82.  
  83. Edit starts up in the command mode (identified by the asterisk *  prompt).  At
  84. this  point  you  may  type in any of the commands in the next section to read
  85. files from disk and put them in the text buffer. Or you may prefer  to  switch
  86. to screen mode immediately (using the S command) and begin typing in new text.
  87. Command  mode  and screen mode are the only modes, and you can switch back and
  88. forth between them by typing the S command when in  command  mode  and  CTRL-Z
  89. (press CTRL key and then press Z key) when in screen mode.
  90.  
  91. Another  way  to  run  Edit  allows  you to specify the filename of an already
  92. existing file in the command line. From DOS type
  93.  
  94.                      [d:]edit [d:]filename.ext
  95.  
  96. Edit will be loaded and then immediately read the file into the  text  buffer.
  97. Specifying  the  filename in the command line is equivalent to using the other
  98. format, and then immediately entering an R (read) command.
  99.  
  100. The next section will describe the Edit commands that are  executed  while  in
  101. the  command  mode  (in  response  to  the * prompt). Section IV will describe
  102. operations when in the screen mode, which is entered using the S command.
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120. Footnote: Brackets [] are used to denote optional items,  and  should  not  be
  121. typed  in.  The  drive  specifier, d, should be replaced with the actual drive
  122. specifier in which you have placed Edit.
  123.  
  124.  
  125.  
  126.  
  127.                                       2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. III. Command Descriptions
  136.  
  137. When Edit is in the command mode, it issues an asterisk (*) as  a  prompt.  At
  138. this  point any of the commands to be described can be entered. Commands are a
  139. single character (H,S,C,R,I,T,W,E,Q). It makes no difference to  Edit  whether
  140. the  commands  are  upper  or  lower  case. Some of the commands require extra
  141. information, which should  always  be  typed  immediately  after  the  command
  142. character  without  any  spaces.  Example:  RFILE.TXT  will  cause  the  file,
  143. FILE.TXT, to be read from the default disk drive  and  placed  into  the  text
  144. buffer.  The  command  is  not  executed  until  you  hit  return, so that the
  145. backspace key can be used to delete mistakes.
  146.  
  147. In the command descriptions below, file names  are  denoted  [d:]filename.ext.
  148. Any valid DOS file name can be used. If no drive is specified then the default
  149. drive is assummed.
  150.  
  151. _H - _H_e_l_p
  152.  
  153.        Format: *H
  154.  
  155. In response to the H command, Edit prints out a list of the available commands
  156. and a few words to describe each of them. The help command is only intended to
  157. be a memory jogger, not a replacement for reading this user manual (so keep on
  158. reading).
  159.  
  160. _S - _S_c_r_e_e_n _m_o_d_e
  161.  
  162.        Format: *S
  163.  
  164. Entering  the command S causes Edit to switch to the screen mode, which is the
  165. mode for entering and modifying text. While in the screen mode, what you  type
  166. is entered into the text buffer to the left of the cursor, and what you see on
  167. the screen is the format of the actual text file.
  168.  
  169. The  special  purpose  keys and functions for moving about and modifying text,
  170. which are available while in screen  mode,  will  be  described  in  the  next
  171. section.
  172.  
  173. The  screen  mode  is  exited  by typing CTRL-Z (by pressing CTRL key and then
  174. pressing Z key).
  175.  
  176. _C - _C_r_e_a_t_e _f_i_l_e
  177.  
  178.        Format: *C[d:]filename.ext
  179.  
  180. In response to the C command, Edit creates the file specified and copies to it
  181. the contents of the text buffer. If the file existed prior to the command then
  182. the old contents are  replaced.  The  C  command  is  the  normal  method  for
  183. initially  creating  a  file. Note that the contents of the text buffer is not
  184. modified by this command.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                                       3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. _R - _R_e_a_d _f_i_l_e
  202.  
  203.        Format: *R[d:]filename.ext or *R
  204.  
  205. The R command is used to open and read  into  the  text  buffer  a  file  that
  206. already exists. The file is appended to the end of any text that is already in
  207. the  text  buffer.  If  the  text  buffer  becomes  90% filled then reading is
  208. suspended and the file is left open. Edit will inform  you  if  this  happens.
  209. While the file is still open the disk should not be removed from the drive. In
  210. order to read in the rest of the file, memory must be freed up by either using
  211. the W command described below, or deleting text. When memory becomes available
  212. you  can  continue to read from the still open file by using the second format
  213. (*R) for the read command.
  214.  
  215. _I - _I_n_s_e_r_t _f_i_l_e
  216.  
  217.        Format: *I[d:]filename.ext
  218.  
  219. The I command is used to insert the contents of the specified  file  into  the
  220. text  buffer.  The  file  is  inserted into the text buffer to the left of the
  221. cursor position. The I command cannot be used if a file is  still  open  as  a
  222. result  of a previous R command. Only as much of the file as will fit into the
  223. text buffer will be read. The file is closed at  the  conclusion  of  reading.
  224. Thus insert should only be used if you are reasonably sure that the whole file
  225. can be read in.
  226.  
  227. _T - _T_a_b_s
  228.  
  229.        Format: *T or *TP or *TF or *TN
  230.  
  231. The T command is used to set tabs. Typing T without a modifier results in Edit
  232. prompting  you  to  input the tab settings. First Edit prints a line of column
  233. numbers. Then you type in a line of spaces  and  t's.  Tabs  are  set  in  the
  234. columns  in which you place a t. When you are in the screen mode, pressing the
  235. tab key causes spaces to be inserted into the text until the cursor  is  in  a
  236. tab column.
  237.  
  238. The  TP  command  sets tabs to the Pascal default settings (every third column
  239. starting with column four) and the TF command set tabs to the Fortran  default
  240. settings (every third column starting with column seven).
  241.  
  242. The  TN  command  turns  off  the  editor tab function. Typing the tab key now
  243. causes the ASCII tab character to actually be inserted into the  text  buffer.
  244. The  tab  character  is interpreted in the generation of the screen display in
  245. the same manner as DOS interprets tab characters (tab setting in every  eighth
  246. column starting with column nine).
  247.  
  248. Edit  starts  up  with  tabs turned off, thus there is no reason to use the TN
  249. command, unless one of the other tab commands is executed first.
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                                       4
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. _W - _W_r_i_t_e _f_i_l_e
  268.  
  269.        Format: *W[d:]filename.ext or *W
  270.  
  271. The W command causes the file specified to be created and writes out the  text
  272. buffer  up to but not including the cursor position. If the file existed prior
  273. to the command then the contents are replaced. The text that is written out is
  274. then deleted from the text buffer, freeing up memory for the reading  of  more
  275. text.  The  file created remains open for the rest of the editing session. The
  276. disk must remain in the drive for the duration  of  the  editing  session.  To
  277. write  more  text  to the file, position the cursor (while in the screen mode)
  278. and use the second form of the command (W with no filename).
  279.  
  280. The W command is intended to be used in conjuntion with  the  R  command  when
  281. working  with  files  which are too large to fit into memory. The R command is
  282. used to read in some text, which can be edited. Then the W command is used  to
  283. write  out  some text making room for more. For smaller files, you are advised
  284. to use the C and E commands for text file creation and replacement.
  285.  
  286. _E - _E_x_i_t
  287.  
  288.        Format: *E
  289.  
  290. The E command writes out the text buffer to a disk  file  and  terminates  the
  291. editing session. The file written to is determined as follows:
  292.  
  293. If  a  write  file  is  currently open (due to a previous W command), then the
  294. entire text buffer is written out to that file. Then, if a read file is  still
  295. open (due to a previous R command), the rest of the read file is copied to the
  296. write file. In other words, the E command is the normal method for terminating
  297. an edit of a large file.
  298.  
  299. If  no write file is open, then the first file that was read, whether given in
  300. the initial Edit command line or given in an R command, is rewritten with  the
  301. current  contents of the text buffer. Thus, the E command is the normal method
  302. for terminating an edit of a file be it large or small.
  303.  
  304. If no file was ever read, then the E command is  equivalent  to  a  Q  (abort)
  305. command.  Edit  will  ask you to verify this because it results in the loss of
  306. any text that you have generated.
  307.  
  308. _Q - _Q_u_i_t
  309.  
  310.        Format: *Q
  311.  
  312. The Q command causes Edit to abort the editing session.  Any  open  files  are
  313. closed, but the contents of the text buffer is not saved. Edit will ask you to
  314. verify this command.
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                       5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. IV. Screen mode
  334.  
  335. To  switch to the screen mode, type in the S command while in the command mode
  336. (in response to the * prompt).
  337.  
  338. To leave the screen mode, type CTRL-Z (by pressing CTRL key and then  pressing
  339. Z key). Edit will return to command mode and issue a prompt (*).
  340.  
  341. When  in  the screen mode, the top 24 lines of the screen display the contents
  342. of 24 lines of text from the text buffer. The bottom (25th) line  is  used  to
  343. display  information  and  to input search strings. If a line has more than 80
  344. characters, then the characters beyond the 80th character do not appear on the
  345. screen. The number on the far right of the bottom  line  tells  you  how  many
  346. bytes  of  text  buffer  you  have left before it is filled up. This number is
  347. constantly updated.
  348.  
  349. Should you accidently try to overfill the text buffer, Edit  will  immediately
  350. transfer to command mode and inform you that you need to make room in the text
  351. buffer to continue. No text will be lost.
  352.  
  353. While  in  the  screen mode, you type in text and it is inserted into the text
  354. buffer to the left of the cursor position. When you hit return a new  line  is
  355. created  and the text that was to the right of the cursor is moved down to the
  356. new line. Return functions exactly like any other character  except  that  you
  357. don't see a return character, instead, return causes text to begin on the next
  358. line.  Return  can be imagined to be an invisible character at the end of each
  359. line.
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                                       6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399. The labeled editing keys of the IBM keyboard can be used while in  the  screen
  400. mode and have the following functions:
  401.  
  402.             Four  cursor keys - These keys, located on the numeric
  403.             keypad, move the cursor in the direction of the arrow.
  404.  
  405.             Home - moves the cursor to either the beginning of the
  406.             text buffer or  the  end,  depending  on  the  current
  407.             direction (which is controlled using keys described on
  408.             the next page).
  409.  
  410.             End  -  moves  the  cursor  to  the end of the next or
  411.             previous line, depending on the current direction.
  412.  
  413.             Pg Up - moves the cursor up  18  lines  in  the  text,
  414.             which  provides  some  overlap  on  the screen between
  415.             adjacent pages.
  416.  
  417.             Pg Dn - moves the cursor down 18 lines in the text.
  418.  
  419.             Del - deletes the character at the cursor position.
  420.  
  421.             Backspace - This key, located on the top  row  between
  422.             the  =  and Num Lock keys deletes the character to the
  423.             left of the cursor.
  424.  
  425.             Tab - Located to the left of the  Q  key.  If  special
  426.             tabs have been enabled (see T command in last section)
  427.             then  spaces  are  inserted  into  the  text until the
  428.             cursor reaches the next tab stop. Otherwise,  pressing
  429.             the tab character inserts an actual tab character into
  430.             the text.
  431.  
  432.             Ins - not used.
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                       7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465. The  10  special  function  keys on the left side of the keyboard have special
  466. meanings while in screen mode. The layout of the keys is:
  467.  
  468.         F1 - Set direction up      F2 - Place select marker
  469.         F3 - Find string           F4 - Cut selected text
  470.         F5 - Find next             F6 - Paste in paste buffer
  471.         F7 - Move left one word    F8 - Move right one word
  472.         F9 - Set direction down    F10- Reset select
  473.  
  474.  
  475. F1 - Set direction up
  476.  
  477. The functions associated with several of the other keys, namely F3, F5,  Home,
  478. and  End,  require  a  direction  (either  forward  or  backward in the text).
  479. Pressing F1 causes the direction flag to be set in the up direction (backwards
  480. in the text). The direction flag is internal to Edit, and  only  changes  when
  481. keys F1 or F9 (see below) are pressed.
  482.  
  483. F3 - Find string
  484.  
  485. When  F3  is  pressed,  Edit  prompts  you on the bottom row to enter a search
  486. string. You can then type in a character string of  up  to  50  characters  in
  487. length.  When  typing  in the string, you can use the backspace key to correct
  488. mistakes. Terminate the input of the string by  pressing  one  of  four  keys.
  489. Pressing either the return or F5 key results in the search proceeding from the
  490. cursor position in the direction defined by the current value of the direction
  491. flag.  Pressing  F1  causes  the  search to proceed backwards through the text
  492. buffer. Pressing F9 causes the search to proceed  forwards  through  the  text
  493. buffer.  The direction flag remains in the direction set by F1 or F9 after the
  494. search is completed.  The  matching  function  ignores  differences  in  case,
  495. matching  lowercase  letters with their uppercase counterparts and vice versa.
  496. When the search string is found, the cursor is moved to the beginning  of  the
  497. matching string in the text buffer. If Edit reaches the end of the text buffer
  498. without finding the string then a message appears at the bottom and the cursor
  499. remains wherever it was before the search began.
  500.  
  501. F5 - Find next
  502.  
  503. When F5 is pressed, Edit searchs forward or backward (depending on the current
  504. direction)  for  the search string defined with the last find command. Same as
  505. F3, except you don't type in a new string.
  506.  
  507. F7 - Move left one word
  508.  
  509. Pressing the F7 key moves the cursor to the beginning of the next word to  the
  510. left of the cursor.
  511.  
  512. F9 - Set direction down
  513.  
  514. Pressing  the  F9  key  sets  the  direction flag to down (forward through the
  515. text). See key F1 above.
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.                                       8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531. F2 - Place select marker
  532.  
  533. Keys F2, F4, F6, and F10 are all associated with the cut and  paste  function.
  534. Pressing  F2 enables the select operation, placing a marker to the left of the
  535. cursor position. After placing the  select  marker,  movement  of  the  cursor
  536. causes  the  selected text (the text between the select marker and the current
  537. cursor position) to appear in reverse video. The selected text can be  cut  by
  538. pressing F4 (see below). To reset the select mode, press F10.
  539.  
  540. F4 - Cut
  541.  
  542. Pressing  the  F4  key  tells  Edit  to  remove  the  selected  text (which is
  543. highlighted in reverse video) from the text buffer and place it in  the  paste
  544. buffer.  The  previous  contents of the paste buffer is deleted. Note that the
  545. cut operation is a very useful way to delete  large  amounts  of  text,  which
  546. provides an extra degree of safety because the deleted text can be recovered.
  547.  
  548. F6 - Paste
  549.  
  550. Pressing  the  F5  key tells Edit to copy the content of the paste buffer into
  551. the text buffer to the left of the cursor position. The content of  the  paste
  552. buffer is not modified by this command.
  553.  
  554. F8 - Move right one word
  555.  
  556. Pressing  the F8 key moves the cursor to the beginning of the next word to the
  557. right of the cursor.
  558.  
  559. F10 - Reset select
  560.  
  561. By pressing the F10 key you turn off the select mode if for some reason you do
  562. not want to continue a cut operation after pressing the select key.
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                       9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597. V. Helpful Hints
  598.  
  599. For normal editing operations, only a subset of the commands  discussed  above
  600. is  needed.  To  create a new file, you run Edit, go to screen mode with the S
  601. command, and enter your text. Then you leave the screen mode with a CTRL-Z and
  602. create the file using the C command. Leave Edit  in  this  case  using  the  Q
  603. command. To edit an existing file, you run Edit, this time specifying the file
  604. name  in the DOS command line or by using the R command. Go to screen mode and
  605. edit the text. Leave the screen mode and then, to save your changes, use the E
  606. command or, to abort the editing session without saving your changes, use  the
  607. Q  command.  These two procedures are all that you really need to remember for
  608. most editing.
  609.  
  610. Whenever possible, work with files which fit in memory, because Edit  is  much
  611. more  convenient  to  use  in this case. Note that Edit uses all of the memory
  612. that you have installed in your system (up to 640k).
  613.  
  614. Use the cut function when deleting anything more than a small amount of  text.
  615. Not  only  is  it faster and therefore more convenient to use, but because the
  616. removed text is put in the paste buffer, the deletion  can  be  recovered,  at
  617. least until another cut operation is performed.
  618.  
  619. Be  careful  when doing cut and paste operations on a file which fills up most
  620. of your available memory. If you do a cut operation on a large chunk  of  text
  621. it  may  not  be  possible  to paste it all back into the main buffer, because
  622. after a paste operation, two copies of the contents of the paste buffer  exist
  623. in  memory:  one  is in the main buffer and one is the paste buffer itself. If
  624. you should happen to get stuck it is always possible to recover  without  loss
  625. of text by writing the main buffer out with a C or W command.
  626.