How do I run the same command across all open buffers at once?
:bufdo
When you need to apply the same change to every file you have open in Vim, switching to each buffer manually is tedious and error-prone.
:bufdo
When you need to apply the same change to every file you have open in Vim, switching to each buffer manually is tedious and error-prone.
:argdo %s/old/new/ge | update
Use :argdo to execute a command in every file in the argument list.
:args **/*.js | argdo %s/old/new/ge | update
The argument list (arglist) is Vim's mechanism for loading a set of files and running commands across all of them.
command-line #command-line #ex-commands #arglist #productivity #batch #editing