Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!TRANSARC.COM!Dan_Bloch From: Dan_Bloch@TRANSARC.COM Newsgroups: comp.editors Subject: Re: vi yank to buffer (was Re: if you could have anything in vi) Message-ID: Date: 23 Mar 91 22:10:58 GMT References: <1962@quando.quantum.de> Sender: daemon@ucbvax.BERKELEY.EDU Lines: 25 elliott@quando.quantum.de (C. David Elliott) writes: > Is there a way to yank a specified set of lines into a cut-buffer? Like: > > :120,145 "aY > or > :.,/}/ "aY Sort of. The good news is yes, you can say :120,145y a or :.,/}/y a The bad news is that in all the versions of vi I know, it only works once per vi session. By the way, the most interesting use of this is to do something like :g/foo/y A which puts all lines containing "foo" into buffer a. Dan Bloch dan@transarc.com