In a refactoring IDE, you never risk overmatching or under-scoping. You just rename the syntactic object and it's renamed exactly where it needs to be, including possibly on the filesystem and in git.
Fair enough. An IDE will generally present you with matching strings on a project level and let you select which ones to change. But if you know where to look, replace within selection seems useful. Apparently IntelliJ supports that, but I've never thought to use it.
The nice thing about replacing via vim is that you can restrict it to a selected block which also gives you a type of safety.
Particularly for the situation I used replacement today, an IDE couldn't make it better and doing it only on a range was helpful.