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

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!indetech!hsv3!mvp
  3. From: mvp@hsv3.lsil.com (Mike Van Pelt)
  4. Subject: Re: vi (cut and paste)
  5. Message-ID: <1992Aug21.183741.26407@hsv3.lsil.com>
  6. Keywords: vi
  7. Organization: LSI Logic/Headland Technology
  8. References: <3815@keele.keele.ac.uk> <1992Aug17.200149.7817@s912%bnf.com> <515@alden.UUCP>
  9. Date: Fri, 21 Aug 1992 18:37:41 GMT
  10. Lines: 54
  11.  
  12. In article <515@alden.UUCP> sgr@alden.UUCP (Stan Ryckman) writes:
  13. >In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
  14. >>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
  15. >>>  How do i cut from here > text  text text ..........
  16. >>>  ............... n number of lines .....
  17. >>> ...... to here <  into the named buffer "a for example?
  18.  
  19. >>1) position the cursor at the beginning of the range to be cut (1Gfb will work
  20. >>   in this example).
  21. >>2) ma (mark the location with marker a)
  22. >>3) move to the end of the range (Gfc will work in this example)
  23. >>4) "ad`a will cut the range and put it into buffer a
  24. >
  25. >NOT!
  26. >This grabs all three full lines.  (I tried it!  Did you?)
  27.  
  28. I just tried it, and it worked for me.
  29.  
  30. Did you use d`a or d'a?  'a moves to the beginning of the
  31. marked line, `a moves to the marked character.
  32.  
  33. I'm in vi now, and trying it.
  34.  
  35. Here's my test case:
  36.  
  37. ------------------------------
  38. cut everything from < to the
  39. corresponding end marker
  40. character > in another line.
  41. ------------------------------
  42.  
  43. OK, copy it, and try it out.
  44. ma and mb are set on the < and > characters.
  45. Then I type `a"a`b and here's the result.
  46.  
  47. ------------------------------
  48. cut everything from > in another line.
  49. ------------------------------
  50.  
  51. The trailing marker character is not cut, so this must
  52. affect your selection of where to set the ending mark.
  53.  
  54. Here's the contents of "a
  55.  
  56. ------------------------------
  57. < to the
  58. corresponding end marker
  59. character 
  60. ------------------------------
  61. -- 
  62. Let's face it, when it comes to utilities,  Microsoft has | Mike Van Pelt
  63. performed about as well as a savings and loan.  These are | Headland Tech.
  64. the guys,  remember,  who put BACKUP and RESTORE - not to | mvp@hsv3.lsil.com
  65. mention EDLIN - on your hard disk.  - Lincoln Spector     +----
  66.