home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!indetech!hsv3!mvp
- From: mvp@hsv3.lsil.com (Mike Van Pelt)
- Subject: Re: vi (cut and paste)
- Message-ID: <1992Aug21.183741.26407@hsv3.lsil.com>
- Keywords: vi
- Organization: LSI Logic/Headland Technology
- References: <3815@keele.keele.ac.uk> <1992Aug17.200149.7817@s912%bnf.com> <515@alden.UUCP>
- Date: Fri, 21 Aug 1992 18:37:41 GMT
- Lines: 54
-
- In article <515@alden.UUCP> sgr@alden.UUCP (Stan Ryckman) writes:
- >In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
- >>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
- >>> How do i cut from here > text text text ..........
- >>> ............... n number of lines .....
- >>> ...... to here < into the named buffer "a for example?
-
- >>1) position the cursor at the beginning of the range to be cut (1Gfb will work
- >> in this example).
- >>2) ma (mark the location with marker a)
- >>3) move to the end of the range (Gfc will work in this example)
- >>4) "ad`a will cut the range and put it into buffer a
- >
- >NOT!
- >This grabs all three full lines. (I tried it! Did you?)
-
- I just tried it, and it worked for me.
-
- Did you use d`a or d'a? 'a moves to the beginning of the
- marked line, `a moves to the marked character.
-
- I'm in vi now, and trying it.
-
- Here's my test case:
-
- ------------------------------
- cut everything from < to the
- corresponding end marker
- character > in another line.
- ------------------------------
-
- OK, copy it, and try it out.
- ma and mb are set on the < and > characters.
- Then I type `a"a`b and here's the result.
-
- ------------------------------
- cut everything from > in another line.
- ------------------------------
-
- The trailing marker character is not cut, so this must
- affect your selection of where to set the ending mark.
-
- Here's the contents of "a
-
- ------------------------------
- < to the
- corresponding end marker
- character
- ------------------------------
- --
- Let's face it, when it comes to utilities, Microsoft has | Mike Van Pelt
- performed about as well as a savings and loan. These are | Headland Tech.
- the guys, remember, who put BACKUP and RESTORE - not to | mvp@hsv3.lsil.com
- mention EDLIN - on your hard disk. - Lincoln Spector +----
-