I’m using Neovim with AstroNvim, and the key maps below will be different depending on your setup. You can find my configuration here.
To find and replace a string in multiple files, you can use this workflow:
<leader>fw)C-q)cfdo command to replace the string for all occurrences in the quickfix list: cfdo %s/<old-string>/<new-string>/g | writeTo open the quickfix list, type: <leader>xq, or using Trouble: <leader>xQ.
Also check out these blog posts: