Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!umbc3.umbc.edu!math13.math.umbc.edu!rouben From: rouben@math13.math.umbc.edu (Rouben Rostamian) Newsgroups: comp.editors Subject: Re: Paste from macro in VI Message-ID: <1991Jun11.113800.16672@umbc3.umbc.edu> Date: 11 Jun 91 11:38:00 GMT References: <1991Jun11.183544.514@otago.ac.nz> Sender: newspost@umbc3.umbc.edu (News posting account) Organization: University of Maryland Baltimore County, Mathmatics Department Lines: 23 In article <1991Jun11.183544.514@otago.ac.nz> andrew@otago.ac.nz writes: >For a long time I have been trying to find a way around an anoying feature of >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 >"Cannot put inside global/macro". I'm runnin on a SUN3/60 with SUNOS that >announces itself as "Sun UNX 4.2 Release 3.5" and the version of vi that comes >with it. On ultrix you can get around this problem by yanking into a named buffer, as in: "aY"aPJ which will do what you want, but not perfectly. For one thing, the terminal beeps each time you execute the macro--I do not know why. For another thing, you may expect that after executing the macro, the buffer "a to contain the previously yanked string, but it doesn't. The bufer remains empty. -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County bitnet: rostamian@umbc.bitnet Baltimore, MD 21228, U.S.A. internet: rouben@math9.math.umbc.edu