Article View: comp.editors
Article #2789Re: Paste from macro in VI
From: Hans Mulder
Date: Tue, 11 Jun 1991 17:25
Date: Tue, 11 Jun 1991 17:25
23 lines
1377 bytes
1377 bytes
In <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. I'm running SunOS 4.1.1, which comes with a somewhat different version of vi, but I believe that this trick is universal: hide the fact that you are yanking and putting inside the same macro by throwing more macro's at it, e.g. :map K P :map g YKJ works for me. -- Have a nice day, Hans Mulder hansm@cs.kun.nl
Technical Details
Message-ID:
<3640@wn1.sci.kun.nl>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!paperboy!think.com!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansmReferences:
<1991Jun11.183544.514@otago.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!paperboy!think.com!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansm From: hansm@cs.kun.nl (Hans Mulder) Newsgroups: comp.editors Subject: Re: Paste from macro in VI Message-ID: <3640@wn1.sci.kun.nl> Date: 11 Jun 91 17:25:16 GMT References: <1991Jun11.183544.514@otago.ac.nz> Sender: root@sci.kun.nl Organization: University of Nijmegen, The Netherlands Lines: 23