1. 8

  2. 1

    I find bulk find-and-replace to be too risky or fuzzy for me. I prefer to go match-by-match and confirm the replace. My approach is usually something like:

    git grep -l something-regexp | xargs nvim

    Which will open vim with every file that matched that regexp, and then I can do a traditional find/replace flow on each file.

    1. 3

      The article talks about using the c flag on vim substitutions to have it ask for confirmation on each case.

      e.g. :%s/foo/bar/gc will do a global search and replace with confirmation