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