home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10131 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!iWarp.intel.com|ichips!sedona!bhoughto
  3. From: bhoughto@sedona.intel.com (Blair P. Houghton)
  4. Subject: Re: vi (cut and paste)
  5. Message-ID: <1992Aug17.170416.15036@ichips.intel.com>
  6. Keywords: vi
  7. Sender: news@ichips.intel.com (News Account)
  8. Organization: Intel Corp., Chandler, Arizona
  9. References: <3815@keele.keele.ac.uk>
  10. Date: Mon, 17 Aug 1992 17:04:16 GMT
  11. Lines: 29
  12.  
  13. In article <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
  14. >    Does anyone know how you cut a range of text to one
  15. >    of the named buffers, where the range does not cover
  16. >   an integer number of lines, i.e., 
  17. >  How do i cut from here > text  text text ..........
  18. >  ............... n number of lines .....
  19. > ...... to here <  into the named buffer "a for example?
  20.  
  21. Go to one end of the range and set a mark, then go to the
  22. other end and buffer-yank-to-marked-character, using
  23. double-quote and back-tick; for example, (the mark is "a"
  24. and the buffer is "f", the first letter in the range is the
  25. "b" in "bazz" and the last is the double-quote before the
  26. "b" in "bar"):
  27.  
  28.     /bazz
  29.     ma            <-- set the mark
  30.     /bar
  31.     "fy`a            <-- yank to marked character
  32.     /result
  33.     nn"fp
  34.  
  35. The result is:
  36. The rbazz" and the last is the double-quote before the
  37. "b" in "esult is:
  38.  
  39.  
  40.                 --Blair
  41.                   "Cake."
  42.