Thanks for the tips.

the put command does NOT seem to work.  The problem is that the line
number will change, from file to file, while the pattern will not.  When
I try

argdo <\/body>P a [to put the contents of register a before the pattern
</body>] I get a trailing characters error message.

I get the same error message with argdo </body>P a


On Thu, 2006-05-25 at 14:05 -0400, James Vega wrote:
> On Thu, May 25, 2006 at 01:59:31PM -0400, Mike Blonder wrote:
> > Hi.
> > 
> > I cannot find a good example in the documentation that would help me use
> > VIM to accomplish what I need to do:
> > 
> > I need to add 6 lines to each of thousands of files.  The location for
> > the lines to be added is the same and definable in a command.  Anybody
> > have any ideas as to a straightforward way to get this done?  I've tried
> > copying the lines to a register and then inserting the register text
> > into an argdo command,
> You were on the right track.  If you have all the text in a register,
> then you can just use the :put command to do what you want.  For
> example, if the text was in register a and you wanted to put it after
> line 24 in every file:
>   :argdo 24put a
> James

Reply via email to