Reputation: 235
I am using gvim 7.4 on Windows.
I have a macro recorded that I want to apply on specific files (for example, *.sql) under a parent directory. If I open the file and press @q, the macro works perfectly fine.
Is there a way I can recursively search for all .sql files and apply the macro? I can do this manually by opening the individual files but I wanted to see if I could use a "search and apply macro" method.
Thanks!
Upvotes: 1
Views: 327
Reputation: 195229
there are bufdo
and argdo
commands. At least you can trigger your macro in normal
command.
something like:
:bufdo exe 'norm! @q' |w
give it a try.
Note, this will save the file after the macro is played.
Upvotes: 4