I wrote a vim function allowing you to search and replace all occurences of a word within vim, thanks to the amazing ripgrep. Assuming that you have ripgrep installed, you can can just copy and paste this function in your .vimrc :

function! SearchAndReplace(search, replace)                                                                             
   execute 'args `rg -l ' . a:search . '` | argdo %s/' . a:search . '/'. a:replace . '/gc | w'

endfunction                                                                                                             
command! -nargs=* RA call SearchAndReplace(<f-args>)

You can then reload vim and use it like this :

:RA word_to_search word_to_replace