To replace the text in multiple files, use the arg commands. First, set the files you’ll be working on, example:
:args app/views/**/*.erb |
Then, run this command:
:argdo :%s/something/some_other_thing/ge | update |
The g flag stands for “do all the replacements”, the e flag stands for “don’t show an error if match is not found”, and the update just writes the modified contents to disk.