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

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!mips!munnari.oz.au!bunyip.cc.uq.oz.au!nestor.nmpd.oz.au!ianh
  3. From: ianh@nmpd.oz.au (Ian Holland)
  4. Subject: Re: vi (cut and paste)
  5. Message-ID: <ianh.714279888@romeo>
  6. Keywords: vi
  7. Sender: news@nmpd.oz.au
  8. Nntp-Posting-Host: romeo
  9. Reply-To: ianh@nmpd.oz.au
  10. Organization: NMPD Telecom
  11. References: <3815@keele.keele.ac.uk> <1992Aug17.200149.7817@s912%bnf.com> <515@alden.UUCP>
  12. Date: 20 Aug 92 03:04:48 GMT
  13. Lines: 58
  14.  
  15. sgr@alden.UUCP (Stan Ryckman) writes:
  16.  
  17. >In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
  18. >>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
  19. >>> hi, 
  20. >>>    Does anyone know how you cut a range of text to one
  21. >>>    of the named buffers, where the range does not cover
  22. >>>   an integer number of lines, i.e., 
  23. >>>  How do i cut from here > text  text text ..........
  24. >>>  ............... n number of lines .....
  25. >>> ...... to here <  into the named buffer "a for example?
  26. >>>    Cheers,
  27. >>>              Dave.
  28. >>In the following texT:
  29. >>aaabbbbbb
  30. >>bbbbbbbbb
  31. >>bbbbccccc
  32. >>
  33. >>I'll assume you want to cut the b's out and save them into buffer a.
  34. >>1) position the cursor at the beginning of the range to be cut (1Gfb will work
  35. >>   in this example).
  36. >>2) ma (mark the location with marker a)
  37. >>3) move to the end of the range (Gfc will work in this example)
  38. >>4) "ad`a will cut the range and put it into buffer a
  39.  
  40. >NOT!
  41.  
  42. I think I have worked out the English translation for this exclamation :-)
  43.  
  44. >This grabs all three full lines.  (I tried it!  Did you?)
  45.  
  46. The given example works with SunOS's vi.  Perhaps you have an inferior
  47. version (though this makes me sick in the stomack when I think about it),
  48. or maybe (just maybe) you used ' instead of `.
  49.  
  50.     .
  51.     .
  52.     .
  53.  
  54. >"Mark" (the "m" command) only marks the line, NOT the cursor
  55. >position within the line.
  56.  
  57. This is totally incorrect.
  58.  
  59. >Am cross-posting to comp.editors, since someone there may know
  60. >for sure whether there _is_ a way to do this, and if I'm wrong I'd
  61. >like to know.  But please, _TRY_ it before posting!
  62.  
  63. Yes I did try the original (valid) suggestion before you read this.
  64.  
  65. best of luck,
  66. --
  67.  
  68. - ian...
  69.  
  70. Ian Holland. NMPD, Telecom. % Ph:  +61 7 837 5075 % Explicit hoc totum,
  71. E-Mail: ianh@nmpd.oz.au     % Fax: +61 7 837 5253 % Pro Christo da mihi potum!
  72.  
  73.