I want to execute a substitution in vim on around 20 *.C and *.H files, and I want to open them all at once. All files are distributed in multiple nested directories, and the command is executed in the top parent directory. Can I do this using only vim, or do I need the “find” command and the “-p” option as shown on this answer?
Share
Start Vim at the root of your project:
Add the relevant files to the arglist, recursively:
See
:h starstarand:h :argadd.Perform your substitution on every file in the arglist:
See
:h argdoand:h s_flags.