From: CSBVAX::MRGATE!@KL.SRI.Com:info-vax-request@kl.sri.com@SMTP 25-OCT-1987 14:47 To: EVERHART Subj: Re: TPUVI Bug Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Sat 24 Oct 87 20:58:03-PDT Received: by ucbvax.Berkeley.EDU (5.58/1.27) id AA06967; Sat, 24 Oct 87 20:55:14 PDT Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-vax@kl.sri.com (info-vax@kl.sri.com) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 21 Oct 87 19:28:25 GMT From: pbox!okstate!gregg@rutgers.edu (Gregg Wonderly) Organization: Oklahoma State Univ., Stillwater Subject: Re: TPUVI Bug Message-Id: <2728@okstate.UUCP> References: <8710201014.AA04165@ucbvax.Berkeley.EDU> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com in article <8710201014.AA04165@ucbvax.Berkeley.EDU>, VAUGHAN@CANISIUS.BITNET (Tom Vaughan @ Computer Center) says: > > I have put up TPU-VI and have encountered a problem: > > using the global substitution command > :g/targetstring/s//replace string/g > > The VI editor goes into an infinite tail spin giving me > that "Line Length at Maximum, Can't Insert Characters" type of message. > You can't break out with ctrl-y or ctrl-c, luckily we are on a PBX > and can disconnect. > You are the second person that I have heard of that uses :g/targetstring/s//replace string/g as opposed to the more obvious :%s/targetstring/replace string/g TPU VI is not attempting to use any special techniques here for determining that the source string of the 's' command is null, so it should use the string from the global command. The global command only identifies a line to act on. The substitute command is then applied to that line. What you are experiencing is TPU always matching a null pattern, and then inserting the 'replace string', thus lengthening the line forever. The simple workaround is to use the second notation given above. I have made TPU VI compatible with this notation, but it was not obvious to me that it should have worked that way. ----- Gregg Wonderly Department of Mathematics Oklahoma State University UUCP: {cbosgd, ihnp4, rutgers}!okstate!nemo.math.okstate.edu!gregg ARPA: gregg@NEMO.MATH.OKSTATE.EDU