Let's say I have 10 files inside a folder and I open them all with
vim *. All those files will be opened in the buffer. Many times when I want to edit all of them at once, I create a small macro that does the things that I want, then I save the file and go to the next one. It ends up being something like the following:
$ vi * qa$BcwnewWord<ESC>:w:nq
By doing that, I can easily repeat this macro on the next file using
@a, or, alternatively, on all files by putting a number on it like
10@a. This logic is completely functional and it works fine. However, I'm curious if there's an internal command that allows me to edit all files inside the buffer at once. Is it possible? Just like the
:g allow me to execute vim commands on all lines inside a file, is there a way of executing a command on all buffered files at once?