Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!mips!dimacs.rutgers.edu!seismo!beno!stead From: stead@beno.CSS.GOV (Richard Stead) Newsgroups: comp.editors Subject: Re: Paste from macro in VI Summary: It ain't tough Message-ID: <49708@seismo.CSS.GOV> Date: 14 Jun 91 22:43:40 GMT References: <1991Jun11.183544.514@otago.ac.nz> Sender: usenet@seismo.CSS.GOV Lines: 20 In article <1991Jun11.183544.514@otago.ac.nz>, andrew@otago.ac.nz writes: > vi. What I want to do is to create a macro (with :map) that will copy the > contents of this line onto the end of itself. > > This can be done outside a macro with YPJ Withing a macro, I get the message The many other responses seem to be doing it the hard way. vi doesn't like the number of new lines to change during macros (at least that's what seems to make it complain). I never get complaints with something like: :map q 0d$p0Pa ^[ This duplicates YPJ with no error reports, beeping, etc. I am constantly using macros with dwPp commands in them to duplicate portions of lines within lines. -- Richard Stead Center for Seismic Studies Arlington, VA stead@seismo.css.gov