Search code examples
intellij-ideapycharm

Replace/Exclude option when doing global Find/Replace in Intellij/Pycharm


I use the case-by-case Replace/Exclude feature frequently in Intellij/Pycharm. I thought it applied to Global Find/Replace but maybe I'm misremembering and it's just in a single file? Here is what it looks like in the latter:

enter image description here

Instead in the Global Find/Replace (all files) then it looks like below. Notice it has Replace All but not the options to step through like in the single-file dialog.

enter image description here

Is there such an option for Global Find/Replace that I'm not bumping into this time around?


Solution

  • It appears that there is no direct equivalent of the [One-by-one] Find/Replace in [this] File.

    The closest is to click on Open in Find Window on bottom of the dialog:

    enter image description here

    This opens in a bottom Panel. Within that panel we can accept changes line by line by hitting Option-Enter. Or we can skip an entire line by hitting down arrow.

    *Note that at the line level it is thus all or nothing. For example in the following screenshot I wanted to not replace the first instance of Status but to go ahead with changing the second . Well that's not possible. I will have to skip the update for this line, run through all the changes in other lines and then come back to manually update it.

    enter image description here