Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!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: 27 Mar 91 23:28:49 GMT References: <5831@male.EBay.Sun.COM> Sender: daemon@ucbvax.BERKELEY.EDU Lines: 28 carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS) writes: > In article , Dan_Bloch@TRANSARC.COM writes: > >> :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. > > Que? What did you mean by this last bit, as everything I have tried > works more than once. My apologies. This does reveal a bug in vi, but it's not the one I thought it was, nor is it nearly as serious. If you do some of the more complicated forms of the y command (e.g. :g/foo/y A) once or twice, vi gets into a state where it can't remember the contents of any of its buffers. Once you edit your file in any way (e.g. deleting a character and undoing the change), vi remembers the buffers again. So, use the commands in good health. If vi beeps when you try to paste the buffer, make any change and it should work. > Cheers, Cheers- Dan