🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #2821

Re: Paste from macro in VI

#2821
From: Richard Stead
Date: Fri, 14 Jun 1991 22:43
20 lines
1276 bytes
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 dwP<move>p commands in them to duplicate portions of lines
within lines.
--
Richard Stead
Center for Seismic Studies
Arlington, VA
stead@seismo.css.gov
Technical Details
Message-ID: <49708@seismo.CSS.GOV>
Path: arc1-ca.pugleaf.net!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
References: <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!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