// search keyword on files and load files to buffers
:args `rg -l pattern path/`
// list buffers
:buffers
// substitute word for each buffers and save
:argdo %s/pattern/newpattern/ge | update
// run the given command to each line of the quickfix list.
:Ack! pattern
:cdo %s/pattern/newpattern/ge | w