Is there a way for vim to open all .C and .H files in a directory and all its subdirectories?
问题 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? 回答1: Start Vim at the root of your project: $ vim /path/to/project Add the relevant files to the arglist, recursively: :argadd **/*.C **/*.H See :h starstar and :h