Run A Vim Macro On Every File

I’ll keep this short sweet and simple. You have a vim macro you recorded. qq for example. This will record a macro under @q. If you did qa you would do @a to call the macro.

To call this macro on every file in a list, we can make an arglist of all files using a wildcard.

:args *.js
:argdo execute "normal @q" | write | update

Or on all open buffers:

:bufdo execute "normal @q" | write | update