home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!iWarp.intel.com|ichips!intelhf!dawson
- From: dawson@intelhf.hf.intel.com (Bryan Dawson)
- Subject: Re: vi (cut and paste)
- Message-ID: <1992Aug20.174952.73@intelhf.hf.intel.com>
- Keywords: vi
- Organization: Development Tools Operation, Intel Corp., Hillsboro OR
- References: <3815@keele.keele.ac.uk> <1992Aug17.200149.7817@s912%bnf.com> <515@alden.UUCP>
- Date: Thu, 20 Aug 92 17:49:52 GMT
- Lines: 56
-
- 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:
- >>In the following texT:
- >>aaabbbbbb
- >>bbbbbbbbb
- >>bbbbccccc
- >>
- >>I'll assume you want to cut the b's out and save them into buffer a.
- >>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!
-
- WAY!
- Note the subtle distinction between the ' single quote and the ` back quote
- which is sometimes difficult to see... VI uses the ` back quote to mean
- "treat the marks as character positions rather than line positions".
-
- >This grabs all three full lines. (I tried it! Did you?)
-
- I just did and he probably did also... certainly works fine for me.
-
- >aaaccccc
-
- >and the buffer to contain:
- >bbbbbb
- >bbbbbbbbb
- >bbbb
-
- >"Mark" (the "m" command) only marks the line, NOT the cursor
- >position within the line.
-
- As noted above, mark DOES mark the "cursor" (character) position but
- the 'standard' access to marks using the ' single quote accesses entire
- lines. Use the ` back quote to access character positions...
-
- >for sure whether there _is_ a way to do this, and if I'm wrong I'd
- >like to know. But please, _TRY_ it before posting!
-
- >Stan.
- >--
- >This .signature has expired. Call 1-900-YOU-FOOL to find out why.
- > Stan Ryckman sgr@alden.UUCP
-
- _________Thanks and Regards from: _____________________________
-
- >> Bryan_Dawson_at_jfccm1@ccm.hf.intel.com (me @ work)
- >> (503) 696-4231 >> dawson@pdaxs.techbook.com (me @ play)
- At the bank he was shocked to see such a den of equity.
- _______________________________________________________________
-
-