Quick tip: Find and replace with Neovim

Dec. 3, 2023

In this article I describe how to replace some word on multiple files using neovim.

Use :Telescope live_grep to search for what you want to replace:

Populate the results to the quick fix list with ctrl + q

Then run find and replace:

:cdo s/search/replace/g

The :cdo will execute the specified command in every entry in the quick fix list.

After that, every entry have to be saved, you can go in every buffer and save manually or to save every buffer:

:cdo update

References