Monday, August 31, 2020

Re: Trying to apply macro to all files under a folder

Hi TIm,


-----Original Message-----
From: Tim Chase <vim@tim.thechases.com>
To: russurquhart1 via vim_use <vim_use@googlegroups.com>
Sent: Mon, Aug 31, 2020 6:14 pm
Subject: Re: Trying to apply macro to all files under a folder

On 2020-08-31 22:57, russurquhart1 via vim_use wrote:
> My next step would have been: :argdo :normal @b

I *think* you need to apply the :normal to the whole file unless the
macro itself does everything in one invocation.


The @b macro only adds a single line of text.



If I had to point my finger at my first suspect as to why your
attempt isn't working the way you want, this is it.

> Then i would save my files:
> :argdo :write
> Should this work?

this should work as long as 'hidden' is set.  It used to default to
off, but I think that recent changes in the defalts flipped this.
Regardless, you want to make sure you

  :set hidden

I'll check this!

The only other wrinkle is that I am working on a git local branch. I haven't had any issues using Vim in this situation.

When you set the arg list, where does it start? from your current working directory?

(Just tried copying the Site directory from the git branch to a directory, and then trying the same commands, still the same thing. Just gets the first file in site and does not check the other directories in site.)

Thanks

Russ

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/155979643.974477.1598917007276%40mail.yahoo.com.

No comments:

Post a Comment