home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / EDITORES / VEDT.ZIP / DEMO4.VDM < prev    next >
Encoding:
Text File  |  1990-05-15  |  18.8 KB  |  570 lines

  1. RI(9)/VEDIT Family - Basic Editing/
  2. M(H)            !Display header
  3.  
  4. YT/
  5. This demo uses "windows" to let you edit in one window while the other window 
  6. gives instructions.  In practice you can have the "editing window" fill the 
  7. entire screen.
  8.  
  9. Although VEDIT Jr. does not have windows, all editing features described here
  10. are available on VEDIT Jr.  References to "VEDIT" apply to all VEDIT Family
  11. editors.
  12.  
  13. Feel free to experiment.  Don't be concerned about modifying the text.  Any
  14. changes you make won't be permanent (as long as you don't use the "File"
  15. sub-menu to save files).
  16.  
  17. REMEMBER:    Press <ESC> to continue to the next step.
  18.  
  19.         Press <ALT-F8> to return to the Main Menu.
  20.  
  21.         Press <ALT-F1> for on-line help.
  22.  
  23. /
  24. M(K)
  25.  
  26. YWB(1) 9
  27. Q26YEA            !Set editing attribute
  28. YWS(1) Q27YEA        !Set attribute in lower window "1"
  29. B#K            !Empty edit buffer
  30. EB demo.txt        !Load demo file
  31. 6L            !Start in middle of text
  32.  
  33. EE(1)            !Switch to edit buffer 1
  34. B#K
  35. I/There are 20 cursor movement keys.   The most commonly used one are:
  36.  
  37. <Cursor Up>    Move up one line        <Cursor Right> Move to next char.
  38. <Cursor Down>  Move down one line      <Cursor Left>  Move to prev. char.
  39. <Home>         Move to begin of line   <Pg Up>        Move up a "Page"
  40. <End>          Move to end of line     <Pg Dn>        Move down a "Page"
  41. <CTRL-Enter>   Move to next line
  42.  
  43. Try these cursor movement keys.  --- Then press <ESC> to continue ---/
  44.  
  45. B -V            !Display text
  46. EE(@)            !Switch back to main edit buffer
  47. V
  48.  
  49. EE(1)            !Switch to edit buffer 1
  50. B#K
  51. I\Other cursor movement keys help with word processing:
  52.  
  53. <F5>         Move to previous word      <F6>         Move to next word
  54. <CTRL-Pg Up> Move to prev. paragraph    <CTRL-Pg Dn> Move to next paragraph
  55. <CTRL-T>     Toggle top/bottom screen   <CTRL-L>     Toggle begin/end of line
  56. <ALT-A>      Move to start of file      <ALT-Z>      Move to end of file
  57.  
  58. Note: For <ALT-A> hold down the "Alt" key, like a SHIFT key, while typing "A".
  59. Try these cursor movement keys.  --- Then press <ESC> to continue ---\
  60.  
  61. B -V
  62. EE(@)
  63. V
  64.  
  65. EE(1)
  66. B#K
  67. I/Sometimes lines are longer than the screen.  These lines can be viewed and
  68. edited using the two "horizontal scrolling" keys:
  69.  
  70. <CTRL-Right Arrow>    Scrolls the screen towards the end of the line
  71. <CTRL-Left Arrow>    Scrolls the screen back to the beginning of the line
  72.  
  73. Try these horizontally scrolling keys.  Notice how the text shifts sideways.
  74.  
  75.         --- Then press <ESC> to continue ---/
  76. B -V
  77. EE(@)
  78. V
  79.  
  80.  R* 0YWS        !Reset horizontal scroll margin
  81. EE(1)
  82. B#K
  83. I/You can enter new text at the cursor by simply typing it.  Press <Ins> if
  84. you want the text to be inserted instead of overwriting existing text.  (Note
  85. that "INS" appears on the "status line" when you are in "Insert Mode".)  Two
  86. keys let you delete single characters.
  87.  
  88. <Ins>          Toggle "Insert" mode     Text     New text is entered at cursor
  89. <Del>          Deletes char at cursor   <---     Deletes previous char
  90.  
  91. Try some simple changes to the text.  --- Then press <ESC> to continue ---/
  92.  
  93. B -V
  94. EE(@)
  95. V
  96.  
  97. EE(1)
  98. B#K
  99. I/To insert a new line of text, first move the cursor to the end of the
  100. previous line (use <Up Arrow> and <End>).  Be sure you are in Insert Mode and
  101. then press <Enter>.  This inserts a new line (which is initially blank).  Now
  102. enter the line of text.  You can press <Enter> again to insert another line.
  103.  
  104. If you press <Enter> with the cursor in the middle of a line, the line is
  105. split into two lines.  (Press "<---" to merge the lines back together.)
  106.  
  107.         --- Press <ESC> to continue ---/
  108. B -V
  109. EE(@)
  110. V
  111.  
  112. EE(1)
  113. B#K
  114. I/Most editing functions can be accessed using the "Pull-down" menus.  As you
  115. become more familiar with VEDIT you can also access editing functions directly
  116. using Function and CTRL keys.  This saves steps by bypassing the menus.  Press
  117. <F1> to start the menu system.  Use the cursor keys to move around the menus.
  118.  
  119. Pressing <ESC> removes the menus one level at a time.  Pressing <CTRL-C>
  120. removes the menus at once.  (This is the "CANCEL" function.)
  121.  
  122.     --- Remove the Menu system and press <ESC> to continue ---/
  123. B -V
  124. EE(@)
  125. V
  126.  
  127. EE(1)
  128. B#K
  129. I/To display the ASCII table from the menu system first press <F1>.  Select
  130. the "Misc" sub-menu by typing "M".  (Or you can highlight "Misc" using <Cursor
  131. Right> and <Cursor Left> and then press <Enter>.)  Select "ASCII Table" by
  132. typing "A". (Or you can highlight "ASCII Table" using <Cursor Up> and <Cursor
  133. Down> and then press <Enter>.)
  134.  
  135. Press <Enter> after each "page" of the displayed table.  Following the last
  136. page, the menu system will remove itself.
  137.         --- Press <ESC> to continue ---/
  138. B -V
  139. EE(@)
  140. V
  141.  
  142. EE(1)
  143. B#K
  144. I\If you have a mouse, move the mouse to the top screen line and click the
  145. left button.  This brings up the menu system.  You can select an item by first
  146. clicking on its sub-menu name and then on the desired item.  Or you can
  147. navigate the menu by holding down the left button.  Sliding the mouse along the
  148. top screen line displays each sub-menu.  Sliding the mouse up/down highlights
  149. each item or sub-sub-menu.  Placing the mouse on an item and releasing the
  150. left button selects the item.
  151.  
  152.           --- Press <ESC> to continue ---\
  153. B -V
  154. EE(@)
  155. V
  156.  
  157. EE(1)
  158. B#K
  159. I/On-line help is available at any time by pressing <ALT-F1>.  It first displays
  160. a keyboard layout listing which key(s) access each editing function.  To get
  161. help on a particular function just press the associated key.
  162.  
  163. For example, for help with searching, first press <ALT-F1> and then <F2>.
  164.  
  165. -- OR -- Press <Enter> to see the second screen which summarizes the built-in
  166.      keystroke macros.
  167.                 --- Press <ESC> to continue ---/
  168. B -V
  169. EE(@)
  170. V
  171.  
  172. EE(1)
  173. B#K
  174. I/If you press <ALT-F1> and then press <Enter> twice you will see a list of
  175. topics for which on-line help is available.
  176.  
  177. For example, for an explanation of all the status line messages, first press
  178. <ALT-F1>; then press <Enter> twice; then type "STAT" and <Enter>.
  179.  
  180.         --- Press <ESC> to continue ---/
  181. B -V
  182. EE(@)
  183. V
  184.  
  185. EE(1)
  186. B#K
  187. I/Pressing <ALT-F1> within the menu system gives you an explanation of the
  188. functions available in the currently displayed sub-menu.  (Pressing the
  189. right button on a mouse does the same thing.)
  190.  
  191. Experiment with the menu system by using <Cursor Right> and <Cursor Left> to
  192. display different sub-menus and then pressing <ALT-F1> from each sub-menu.
  193.  
  194.         --- Press <ESC> to continue ---/
  195. B -V
  196. EE(@)
  197. V
  198.  
  199. EE(1)
  200. B#K
  201. I\If you have a mouse, it can also be used to scroll to other parts of the file,
  202. highlight and copy/move blocks, access help and switch between windows.
  203.  
  204. The mouse operations are fully described in the on-line help.  To access it
  205. press <ALT-F1> (or select "General" in the "Help" sub-menu).  At the prompt
  206. for the desired function key click the left button.  Or select "Mouse" from
  207. the help topics.
  208.  
  209.         --- Press <ESC> to continue ---\
  210.  
  211. B -V
  212. EE(@)
  213. V
  214.  
  215.  
  216.  
  217. EE(1)
  218. B#K
  219. I/You can quickly delete lines or words with these keys:
  220.  
  221. <CTRL-Z>    Delete text from cursor to end of line.
  222. <CTRL-X>    Delete entire line.  The cursor can be anywhere on the line.
  223.  
  224. <ALT-F5>    Delete the previous word.
  225. <ALT-F6>    Delete the next word.
  226.  
  227. Try these deletion keys.  --- Then press <ESC> to continue ---/
  228.  
  229. B -V
  230. EE(@)
  231. V
  232.  
  233. EE(1)
  234. B#K
  235. I/You can "undo" most changes keystroke by keystroke or line by line.  To undo
  236. the previous keystroke press <ALT-F7>.  To undo the keystroke before that
  237. press <ALT-F7> again, and so on.
  238.  
  239. To undo all the changes made to a line press <CTRL-U>.  Pressing <CTRL-U>
  240. again moves to the previous line you were on.  Pressing <CTRL-U> a third time
  241. restores the previous line, and so on.
  242.  
  243. Try the undo functions.  --- Then press <ESC> to continue ---/
  244.  
  245. B -V
  246. EE(@)
  247. V
  248.  
  249. EE(1)
  250. B#K
  251. I/The undo keys <ALT-F7> and <CTRL-U> are "keystroke macros" (sometimes called
  252. "hot keys") which directly access functions within the "Undo" sub-menu.
  253.  
  254. <ALT-F7> is equivalent to {Undo, Edit}.
  255. <CTRL-U> is equivalent to {Undo, Line}.
  256.  
  257. Note that "{Undo, Edit}" is the notation used for the "Edit" function within
  258. the "Undo" sub-menu.  Another topic describes "keystroke macros" in detail.
  259.         --- Press <ESC> to continue ---/
  260. B -V
  261. EE(@)
  262. V
  263.  
  264. EE(1)
  265. B#K
  266. I/Additional keystroke macros permit direct access to each of the sub-menus:
  267. <ALT-B> selects "Block" sub-menu    <ALT-P> selects "Print" sub-menu
  268. <ALT-E> selects "Edit" sub-menu        <ALT-S> selects "Search" sub-menu
  269. <ALT-F> selects "File" sub-menu        <ALT-U> selects "Undo" sub-menu
  270. <ALT-G> selects "Goto" sub-menu        <ALT-W> selects "Window" sub-menu
  271. <ALT-H> selects "Help" sub-menu            (VEDIT and VEDIT PLUS only)
  272. <ALT-M> selects "Misc" sub-menu        <ALT-C> selects "Config" sub-menu
  273.     Note: It is <ALT> and the 1st letter of the sub-menu.
  274.     --- Remove the menu system and press <ESC> to continue ---/
  275. B -V
  276. EE(@)
  277. V
  278.  
  279. EE(1)
  280. B#K
  281. I/You can easily enter graphics characters and create "boxes".  For example:
  282.  
  283. ╔════════════════════════════════════════════════╗
  284.  
  285. First type "<ALT>-201" (hold down the <ALT> key and type 201 on the KEYPAD).
  286. Then press <CTRL-R>, type "48" and "<ALT>-205".  Last type "<ALT>-187".
  287. Note: Type "201" on the KEYPAD (cursor keys) and "48" on the normal keys!
  288.  
  289. Note:  <CTRL-R> is the "Repeat" function.  --- Press <ESC> to continue ---/
  290.  
  291. B -V
  292. EE(@)
  293. Z        !Goto end-of-file
  294. V
  295.  
  296. EE(1)
  297. B#K
  298. I/You can move blocks of text within the file.  You could use the {BLOCK}
  299. sub-menu, but special block functions are quicker.  First, move the cursor to
  300. the 1st character in the block.  Then press <F9> to set the 1st block marker.
  301. Now highlight the block by moving the cursor one position PAST the LAST
  302. desired character in the block.  (This is generally the beginning of the next
  303. line.)  Press <F9> again to set the 2nd block marker.  Now move the cursor to
  304. the desired destination for the block.  Press <F9> a third time to copy the
  305. block; or press <ALT-F9> to move the block.
  306.         --- Press <ESC> to continue ---/
  307. B -V
  308. EE(@)
  309. V
  310.  
  311. EE(1)
  312. B#K
  313. I/You can perform more flexible "cut and paste" using a text register.  (VEDIT
  314. Jr. has one register, VEDIT and VEDIT PLUS have 36 registers named "0" thru
  315. "9" and "A" thru "Z".  To copy a block of text to a register, set the 1st
  316. marker and highlight the block as before.  Then press <F10> for "Copy to
  317. Register" or <ALT-F10> for "Move to Register" depending upon whether you want
  318. to copy or move the original block.  With VEDIT and VEDIT PLUS you are also
  319. prompted for the "register" name.  (Only use register "0" in this demo.)  As a
  320. shortcut simply press <Enter> or <F10> again to use register "0".
  321.         --- Press <ESC> to continue ---/
  322. B -V
  323. EE(@)
  324. V
  325.  
  326. EE(1)
  327. B#K
  328. I/You can now insert the block of text anywhere in the file.  First, position
  329. the cursor where you want it inserted.  Then press <F10>.  (With VEDIT and
  330. VEDIT PLUS you are also prompted for the "register" name.)  Press <F10> again
  331. to use register "0".  Notice how the block of text has reappeared.  One
  332. advantage of using text registers is that you can easily insert the same block
  333. of text several times in the file -- inserting a text register does not empty
  334. it.  Text registers also let you copy a block from one file to another.
  335.  
  336.         --- Press <ESC> to continue ---/
  337. B -V
  338. EE(@)
  339. V
  340.  
  341. EE(1)
  342. B#K
  343. I\The operation of <F9> and <F10> depend upon how markers have been set:
  344.  
  345. KEYS WHEN:    NO MARKERS SET      1 MARKER SET        2 MARKERS SET
  346. ═══════════╦════════════════════════════════════════════════════════════════
  347. <F9>       ║    Set 1st Marker      Set 2nd Marker    Copy block to cursor
  348. <ALT-F9>   ║    Set 1st Marker      Set 2nd Marker    Move block to cursor
  349. <F10>       ║    Insert T-Reg      Copy to T-Reg        Copy to T-Reg
  350. <ALT-F10>  ║    Insert T-Reg      Move to T-Reg        Move to T-Reg
  351.         --- Press <ESC> to continue ---\
  352. B -V
  353. EE(@)
  354. V
  355.  
  356. EE(1)
  357. B#K
  358. I\The block copy/move operations are also available in the {BLOCK} sub-menu. 
  359. "Set Marker" marks the block.  "Copy to Cursor" and "Move to Cursor" directly 
  360. copy/move the block.  "Copy to Register" and "Move to Register" copy/move the 
  361. block to a text register.  Finally, "Insert Register" inserts a text register.
  362.  
  363. Many common edit functions can be performed step by step using the menu system
  364. or more directly using "hot keys".     --- Press <ESC> to continue ---\
  365. B -V
  366. EE(@)
  367. V
  368.  
  369. B#K            !Empty edit buffer
  370. ER demo.txt 0A        !Load demo file again
  371.  
  372. EE(1)
  373. B#K
  374. I/The search and search & replace operations are very flexible.
  375.  
  376. <F2>      Is the "search" key
  377. <ALT-F2>  Is the "search & replace" key
  378. <F3>      Performs the last "search" or "search & replace" again
  379.  
  380. Press <F2>.  At the prompt, type the desired 'search string', e.g. "the" and
  381. press <Enter>.  The cursor will move to the first occurrence of "the".
  382.         --- Press <ESC> to continue ---/
  383. B -V
  384. EE(@)
  385. V
  386.  
  387. EE(1)
  388. B#K
  389. I/To search for the next occurrence of "the" press <F3>.  Notice that it will
  390. find both "The" and "the" or even "THE".  Notice that it will also find the
  391. first three letters of "they", the word "other", etc.
  392. (Note: this method only finds words in the text FOLLOWING the cursor.)
  393.  
  394. To search for a different word press <F2> again and enter the new 'string'.
  395. Note that you can press [CURSOR UP] to reuse the previous string.  You can
  396. also edit the string being entered.
  397.         --- Press <ESC> to continue ---/
  398. B -V
  399. EE(@)
  400. V
  401.  
  402. EE(1)
  403. B#K
  404. I/Press <F2> and then press <F2> immediately again.  You can now select from
  405. the "search options".  "Again" lets you reuse the previous search string.
  406. "Begin" forces the search to start from the beginning of the text.  "Far" (the
  407. default) permits searching through very large files.  "Reverse" searches in
  408. the reverse direction.  "Word" restricts the search to entire words.
  409.  
  410. Press "R" and <Enter> to search in reverse.  Now type the word you want to
  411. search and <Enter>.  Note how the search is in reverse toward the beginning of
  412. the file.  Experiment.    --- Then press <ESC> to continue ---/
  413.  
  414. B -V
  415. EE(@)
  416. V
  417.  
  418. EE(1)
  419. B#K
  420. I/More sophisticated searches are possible with "pattern matching".
  421. Here are six of the 22 "pattern matching codes":
  422.  
  423. |<    Beginning of line        |>    End of line
  424. |X    Anything "wildcard"        |D    Digit (0 - 9)
  425. |A    Letter (alphabet)        |U    Upper case letter
  426.  
  427. For example, to search for lines beginning with "the" press <F2> and then
  428. type "|<the" followed by <Enter>.      --- Press <ESC> to continue ---/
  429.  
  430. B -V
  431. EE(@)
  432. B        !Goto begin-of-file
  433. V
  434.  
  435. EE(1)
  436. B#K
  437. I/To perform a search & replace press <ALT-F2>.  At the "FIND?" prompt enter the
  438. desired search string just as before.  At the "REPLACE?" prompt enter the
  439. replacement text.  You are then prompted for confirmation to make the
  440. replacement.
  441.  
  442. For example, let's replace "VEDIT PLUS" with "VEDIT+".  Press <ALT-F2>.  Press
  443. <ALT-F2> again to get the options.  Press "B" and <Enter>.  Type "VEDIT PLUS"
  444. and <Enter>.  Then type "VEDIT+" and <Enter>.  Notice the confirmation prompt.
  445. Press "O" to make the replacement.    --- Press <ESC> to continue ---/
  446.  
  447. B -V
  448. EE(@)
  449. V
  450.  
  451. EE(1)
  452. B#K
  453. I/Now press <F3> to find the second occurrence.  At the confirmation prompt
  454. press "Y" to make the replacement and immediately search for the next
  455. occurrence.  Or press "N" is not make the replacement, but keep searching.
  456. Press <ALT-F1> if you want assistance from the on-line help.
  457.  
  458. As above, you can selectively replace each occurrence.  However, to quickly
  459. replace all occurrences press "R" for "rest" at the confirmation prompt.
  460. (You can undo the entire global replacement by pressing <ALT-F7> once.)
  461.         --- Press <ESC> to continue ---/
  462. B -V
  463. EE(@)
  464. V
  465.  
  466. EE(1)
  467. B#K
  468. I/Press <F2> to get the search prompt.  Press <Up Arrow>.  Notice that the
  469. previous search string appears.  <Up Arrow> and <Down Arrow> let you select
  470. previous entries for many of VEDIT's prompts.  You can also edit previous
  471. entries with <Right Arrow>, <Left Arrow>, <Home>, <End> and <Del>.  Text typed
  472. in the middle of a line is inserted.  When the entry is correct, press
  473. <Enter>.  Feel free to experiment.
  474.  
  475.         --- Press <ESC> to continue ---/
  476. B -V
  477. EE(@)
  478. V
  479.  
  480. EE(1)
  481. B#K
  482. I\"Regular expressions" (VEDIT and VEDIT PLUS only) permit even more powerful
  483. search/replace pattern matching.  Although regular expressions are too complex
  484. to cover in this tutorial, you can try a simple example which will search for
  485. capitalized words of two or more letters.
  486.  
  487. Press <F2> twice to get the search options.  Press "Y" and <Enter> to select
  488. regular expressions.  Type "[A-Z][a-z]+" and press <Enter>.  This will search
  489. for the next capitalized word.  Press <F3> to search for the next word.
  490.         --- Press <ESC> to continue ---\
  491. B -V
  492. EE(@)
  493. B
  494. V
  495.  
  496. EE(1)
  497. B#K
  498. I\You can restrict search/replace operations to a highlighted block of text.
  499. First mark and highlight the block in the normal way (using <F9> twice).  To
  500. search the entire block place the cursor at the beginning of the block.  Any
  501. search and replace operations will now only occur within the block.
  502.  
  503. For maximum flexibility, VEDIT only performs a block search when the cursor is
  504. within the block.  This way you can highlight a block and then search the
  505. entire file for the destination to which you want to copy/move the block.
  506.         --- Press <ESC> to continue ---\
  507. B -V
  508. EE(@)
  509. B
  510. V
  511.  
  512. EE(1)
  513. B#K
  514. I\VEDIT can perform other block oriented operations.  The {EDIT, Lower/Upper
  515. Case} sub-menu lets you convert all letters in a block to upper case, lower
  516. case or switch the case.  If no block is marked, or the cursor is not within
  517. the block, these functions only convert a single character.
  518.  
  519. You can also indent/undent a block.  Try it by highlighting a block of several
  520. lines.  Make sure the cursor is within the block and press <F7>; this indents
  521. all lines in the block.  <F8> will undent all lines in the block.
  522.         --- Press <ESC> to continue ---\
  523. B -V
  524. EE(@)
  525. B
  526. V
  527.  
  528. EE(1)
  529. B#K
  530. I\Most file handling can be performed with the "File" sub-menu.  Press <ALT-F>.
  531. Then press <ALT-F1> and the on-line help will explain each item in the menu.
  532.  
  533. To prevent destroying the demo files, don't try any of the File operations at
  534. this time except for "Directory" which is covered next.
  535.  
  536.     --- Remove the Menu system and press <ESC> to continue ---\
  537. B -V
  538. EE(@)
  539. V
  540.  
  541. EE(1)
  542. B#K
  543. I/For example, you can display the directory:
  544.  
  545. Press <ALT-F> for the "File" sub-menu.  Press "D" for "Directory".  To display
  546. the entire directory, press <Enter> at the "Filename:" prompt.  To display
  547. only files with a filename extension of ".HLP" type "*.HLP" and <Enter> at the
  548. prompt.
  549.  
  550.         --- Press <ESC> to continue ---/
  551. B -V
  552. EE(@)
  553. V
  554.  
  555. EE(1)
  556. B#K
  557. I/In this tutorial the <ESC> key is used to go to the next step.  Normally,
  558. however, the <ESC> key puts up the "ESCAPE MENU".  From this menu you can go
  559. to Command Mode (VEDIT PLUS only), remove block markers, exit VEDIT saving
  560. your file(s) or quit VEDIT.
  561.  
  562. The <ESC> key has now been switched to perform its normal function.  Press
  563. <ESC>.  Select "Command Mode" and press <Enter> to return to the main menu
  564. of this demo.  (Selecting anything else may stop the demo!)
  565.     --- Press <ESC> and select "Command Mode" ---/
  566. B -V
  567. EE(@)
  568. -YYE        !Restore ESC key to normal operation
  569. V
  570.