title: Execute Macro in All Buffers tags: vim macro ``` :argdo execute "normal @a" ``` # Example: prepend license Record a macro `a` that does ``` :0r license.txt :w ``` then ``` :args *.c ``` and either ``` :argdo execute "normal @a" ``` or ``` :argdo normal @a ``` and the macro will be executed for each file. The `execute` variant allows us to use the `|` to do ``` :argdo execute "normal @a" | write ```