home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!pki-nbg!hitkw14!smr
- From: smr@hitkw14.pki-nbg.philips.de (S.Riehm)
- Newsgroups: comp.unix.questions
- Subject: Re: vi (cut and paste)
- Keywords: vi
- Message-ID: <smr.714294202@hitkw14>
- Date: 20 Aug 92 07:03:22 GMT
- References: <3815@keele.keele.ac.uk>
- Sender: news@pki-nbg.philips.de
- Lines: 40
-
- phd85@seq1.keele.ac.uk (D.H. Holden) writes:
-
-
- > hi,
- > Does anyone know how you cut a range of text to one
- >
- > of the named buffers, where the range does not cover
- >
- > an integer number of lines, i.e.,
-
- > How do i cut from here > text text text ..........
-
- > ............... n number of lines .....
-
- > ...... to here < into the named buffer "a for example?
-
- as soon as you mention the word "lines" in vi you get complete lines
- only!
-
- However, You can specify a search pattern, or any movement pattern, so
- you could move the cursor to the start position, then type;
- "ay/< into/^M
-
- using your examply above. This will yank everything up to but not
- including the string in the search pattern.
-
- you could also do stupid things like:
- "ay120W
- which would yank the next 120 blank separated words.
-
- This works for delete, change, >> << etc etc also.
-
- good luck
-
- -----------------------------------------------------------------
- Stephen Riehm Configuration Management _-_|\
- smr@pki-nbg.philips.de Philips Kommunikations Industrie / \
- Work: +49 911 526 2975 Nuernberg, Germany \_.-.*/
- Fax: +49 911 526 2095 "I was there, now I am here!" v
- "My company speaks another language, I CAN'T speak on it's behalf"
-