How can I search and replace recursively in a directory in Vim? May 9, 2023 by Tarik args and argdo should do what you need, e.g. :args spec/javascripts/**/*.* :argdo %s/foo/bar/g See this page.