Monday, August 31, 2020

Trying to apply macro to all files under a folder

I found a ref to this and some commands that should work, but wont for me.

In my site directory, are other directories and files. I have a macro that I created, @b that i want to run recursively on all files named index.md in all the folders in site.

I had initially set CWD to the site directory.

In vim i did:

: args inde*.md

(Thinking this should put all the index.md files into the arg list. That didn't work, it only found the one index.md file in site.)

My next step would have been:

:argdo :normal @b

(That works for the one file it found.)

Then i would save my files:

:argdo :write

Should this work? How can I get this to work. All examples I've found describe this, but it doesn't want to work for me. 

Any help is greatly appreciated!

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/349437253.960842.1598914623663%40mail.yahoo.com.

No comments: