home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 103_01 / help.edi < prev    next >
Text File  |  1985-03-10  |  11KB  |  356 lines

  1.     THis is a HELP file for Scott and Neal's QED editor in BDS C.
  2. When in EDIT itself, you can get a brief listing of all commands by 
  3. using the "h" command, but here I've tried to give a bit more explan-
  4. ation, and a few examples. In what follows, whenever I say "range"
  5. of lines, I mean two numbers separated by a comma, like   4,20   .
  6. If you are doing something over a range of lines (search, subs.,
  7. print, whatever ) and you want to stop, just hit a <cr>.
  8.     Whenever you make a change while EDITing, the line numbers
  9. are automatically readjusted as necessary - so check them out after
  10. any changes that rearrange lines, unless you like surprises......
  11.     To get into this program and get this WITTY message, just type
  12. "help", OR to get help for one particular item type "help item".
  13. Since you're here already just type one of the following menu 
  14. selections. My arbitrary division of the command types may seem
  15. rather tacky to some people (like neal and scott) but hey, that's 
  16. life.   (this file created May 7, 1981 by Kathy Bacon )
  17.  
  18.  
  19. $$
  20. $MISC$
  21. $LINE$
  22. $FILE$
  23. $PRINT$
  24. $SEARCH$
  25. $ $
  26. $    THAT'S ALL $
  27. $$
  28.  
  29. $MISC$
  30. ********************************************************************
  31.         Miscellaneous Commands
  32. ********************************************************************
  33.  
  34.     A dollar sign ($) stands for the last line of the file.
  35.     A period or dot (.) stands for the current line.
  36.  
  37.  
  38. COMMAND        DESCRIPTION
  39.  
  40. Control-P    Everything shown thereafter will be sent to the
  41.         printer; to stop type another Control-P.
  42.  
  43.    h        Will list a brief description of all commands
  44.  
  45.    u        This is the "user-defined-command". To set it, you
  46.         just say    u=com   and u is set equal to "com".
  47.         "com" can be anything you want - a complicated
  48.         search-and-substitute you'll be doing a lot,
  49.         a  ".,$" , or whatever.
  50.  
  51.  
  52. don't touch that dial! but do hit <cr>
  53. $$$
  54. COMMAND        DESCRIPTION
  55.  
  56.    #        Toggles the line numbers on or off.
  57.  
  58.    <        Turns the prompts on.
  59.  
  60.    >        Turns the prompts off.
  61.  
  62.    =        Has various uses:
  63.  
  64.         f=file    sets default filename to "file"
  65.         $=    tells you last line number
  66.         .=    tells you current line number (useful if
  67.                 you've turned off the numbers)
  68.         u=com    sets the user command to "com"
  69.         u=    tells you what the user command is
  70.  
  71. $FILE$
  72. ***************************************************************
  73.                 Commands Concerning Files
  74. ***************************************************************
  75. I know, I know, they're ALL concerned with files, but read on...
  76.  
  77. COMMAND    
  78.  
  79. r x:filename    Reads in file "filename" from drive x. The default
  80.         is the currently logged in disk if no designation 
  81.         is given.
  82.  
  83. w x:filename    Writes "filename" to disk x. Again, "x" is optional.
  84.         So, for that matter, is the filename: if you don't
  85.         specify, it will use the current default filename
  86.         (there is a default even if you've never specified
  87.         one during your EDITing - it USED to write out a
  88.         file with the descriptive title of " ", which,
  89.         although it saves TYPING, is really not cool...)
  90.  
  91. beat <cr> for more of this witty text !!!!!
  92. $$$
  93. f         Tells you the current default filename.
  94.  
  95. f=file            Sets the default filename to "file".
  96.  
  97. q        Quits the editor. If you try to quit without first
  98.         writing the file (via "w") to disk, EDIT will scream
  99.         (well, ACTUALLY it will only BEEP) at you. If you 
  100.         don't want your most recent changes anyway, and you
  101.         find this  behavior obnoxious, read on...
  102.  
  103. q!        Quits quietly.
  104.  
  105. n x:file    Will read a file of EDIT commands, "file", from drive
  106.         x and use it to EDIT the file you are in.
  107.         This can be used to add all or part of a file to
  108.         another (there's no explicit command for this ).
  109.         Copy the text you want to add into a file, precede
  110.         it with an 'a' for append, follow the text with a
  111.         period, and then use the file to EDIT the file you
  112.         want to add the text to.
  113.              If you don't specify a file name, EDIT will use
  114.         the current default file name, which will most
  115.         likely NOT contain EDIT commands....
  116. $LINE$
  117. ****************************************************************
  118.         Commands Concerning Lines
  119. ****************************************************************
  120.  
  121. To move to a particular line, just type it's number.
  122.  
  123. To print a range of lines, type the range.
  124.  
  125. (line#)a    APPENDS lines of text AFTER the (optional) line
  126.         number. To stop, type a single period (.) on a line.
  127.  
  128. (line#)ac    APPEND COMMENT to (line#). This will add a /* at
  129.         the end of (line#); you type in the text of your
  130.         comment, and then it fills in the closing   */  .
  131.  
  132. (range)c       CHANGES the line or lines specified. To stop, type
  133.         a single period on a line.
  134.  
  135. (range)d    DELETES the line or range of lines specified.
  136.  
  137. (line#)i    INSERTS lines of text BEFORE the (opt.) line
  138.         number. To stop, type a single period (.) on a 
  139.         line.
  140.  
  141.     !!!!! club <cr>  to continue !!!!!!
  142. $$$
  143.  
  144. (line#)j    JOINS the line following "line#" to the end
  145.         of "line#", making the two one line.
  146.  
  147.  
  148. (range)m(dest)    Moves the range of lines specified to the 
  149.         destination specified. They are deleted from 
  150.         their original location.
  151.  
  152. (range)t(dest)    Copies the range of lines specified to the
  153.         destination specified. The lines are NOT 
  154.         deleted form their original location.
  155.  
  156. hit <cr> for an example of "m" and "t"
  157. $$$
  158.     Example:
  159.  
  160. 141>a
  161. 142    line one of ridiculous text
  162. 143    line two la dee da dee da
  163. 144     third boring line
  164. 145    fourth insipid line
  165. 146    boring boring boring
  166. 147    .
  167. 146>142,143m146
  168. 146>142,146
  169. 142    third boring line
  170. 143    fourth insipid line
  171. 144    line one of ridiculous text
  172. 145    line two la dee da dee da
  173. 146    boring boring boring
  174. 146>146t142
  175. 146>142,147
  176. 142    boring boring boring
  177. 143    third boring line
  178. 144    fourth insipid line
  179. 145    line one of ridiculous text
  180. 146    line two la dee da dee da
  181. 147    boring boring boring
  182. $PRINT$
  183. ***********************************************************
  184.         Print Commands
  185. ***********************************************************
  186.  
  187. All line number designations for these commands are OPTIONAL.
  188.     --------------------------------------------------
  189. ^        An up-arrow = .,$   , printing from the current
  190.         line to the last line of the file. This is useful
  191.         because just hitting a key will stop it, so you
  192.         can look at an indefinite range of code.
  193.  
  194. (range)        Will print the range of lines, and set dot to
  195.         the last line in the range.
  196.  
  197. (line#)p    Displays the line designated, and sets dot (.) to
  198.         "line#".
  199.  
  200. (range)l    Displays the range with all control characters
  201.         shown as an up-arrow followed by a letter. The
  202.         only control character this editor will let you
  203.         insert is a tab (^I) but other sneaky little
  204.         beasties may creep in.
  205.  
  206. "hit me! hit me!..." said the masochistic <cr>.......
  207. $$$
  208.  
  209.  
  210. (line#):    Prints from (line#) to (line# + 16); sets dot equal
  211.         to (line#).
  212.  
  213. (line#)&    Prints from (line# - 16) to (line#), leaves dot at
  214.         (line#).
  215.  
  216. (line#)"    Prints from (line# + 1) up to (line# + 17), leaves
  217.         dot at (line#).
  218.  
  219. (line#)~    Prints from (line# - 16) up to (line#), sets dot
  220.         to (line# - 16).
  221.  
  222. (line#)%    Prints from (line# - 8) up to (line# + 8) to
  223.         show the context of a line.
  224. $SEARCH$
  225. *****************************************************************
  226.         Search and Substitute Commands
  227. *****************************************************************
  228.  
  229. These come in several flavors.....depending on your tastes...
  230.  
  231.  
  232. The General "Searches":
  233. ----------------------
  234.  
  235. /string/    Will search FORWARD through the file for the next
  236.         occurrence of "string", and print it out.
  237.  
  238. ?string?    Will search BACKWARD through the file for the last
  239.         occurrence of "string". A "print" is implied.
  240.  
  241.  
  242. g/string/    Will search and print out all occurrences of 
  243.         "string" in the file.
  244.  
  245. v/string/    Will print out all lines in the file which DO
  246.         NOT contain "string".
  247.  
  248.     more delicacies to come if you hit <cr>...
  249. $$$
  250.  
  251. The "Search and Substitutes":
  252. ---------------------------
  253.  
  254. (range)s/search/replace/    Will substitute "replace" for the
  255.                 FIRST occurrence of "search" on all
  256.                 lines in "range".
  257.  
  258. (range)s/search/replace/p    Will do the same, but will print the
  259.                 final result.
  260.  
  261. (range)s/search/replace/gp    Will substitute for ALL occurrences
  262.                 on each line.
  263.  
  264. and for the sophisticated palate....... (hit <cr>)
  265. $$$
  266.  
  267. The "Interactive Substitute":
  268. ----------------------------
  269.  
  270. (range)x/search/replace/p    Will search and print out each
  271.                 occurrence of "search" in "range",
  272.                 and wait for a response - if you
  273.                 reply with a <cr>, it will NOT
  274.                 do the substitution; if you reply
  275.                 with a ".", it will do the subs.
  276.                 and print the result.
  277.  
  278.  
  279. A "/" is generally used to delimit the search and replace
  280. strings, but another character can be used, like a "@".
  281.  
  282.  
  283. you probably know what to do by now...
  284. $$$
  285. There are also some "special characters" that can appear in
  286.     these "search" and "replace" strings:
  287.  
  288. CHARACTER    MEANING
  289.     
  290.     &        In a "replace" string, "&" stands for the string
  291.         you just searched for.
  292.  
  293.     $        In a "search" string, stands for the end-of-line.
  294.  
  295.     ^        Stands for the beginning-of-line.
  296.  
  297.     *        Zero, one, or many of the character immediately
  298.         following it.
  299.  
  300. more characters to come.......club beat mangle <cr>
  301. $$$
  302.     .        A "wild-card": any character.
  303.  
  304.     ~        "not" character: a match will occur for anything 
  305.         EXCEPT the character immediately following the "~".
  306.         You could try to find "th~is", for example. This 
  307.         is especially useful if you're a lousy speller.
  308.  
  309.  
  310.     \        The "force" character: if you want to actually
  311.         look for a string containing one of these special
  312.         characters, precede it with a "\" to "force" it 
  313.         into the string.
  314.  
  315.  
  316.  
  317. hit that <cr> for more enlightenment (ZEN programming...)
  318. $$$
  319. Some Example Substitutions:
  320. --------------------------
  321.  
  322. 309>a
  323. 310    I think I am losing my mind.
  324. 311    .
  325. 310>s/t*.n/am so bore/p
  326. 310    I am so bored.
  327. 310>s/so/& & & /p
  328. 310    I am so so so bored.
  329. 310>a
  330. 311    
  331. 312    snore (snooze)    /* a boring function */
  332. 313    .
  333. 312>s/(*~)/&,fizzle/p
  334. 312    snore (snooze, fizzle)    /* a boring function  */
  335. 312>s//&,zzzzz/p
  336. 312    snore (snooze, fizzle, zzzzz)    /* a boring function */
  337. 312>
  338. The combination "*." stands for any number of any character. Note
  339. that it matches the LONGEST occurrence of the search string. This
  340. is useful, but can be tricky if you're not careful.
  341.     Notice also that it will remember the last search string
  342. if you just say     //
  343. $ $
  344. $$
  345.  
  346.  
  347.  
  348. thats all folks!!!!
  349.  
  350. $$%
  351.  
  352.  ????
  353. $$%
  354.  
  355. $$
  356. t will remember the last search string