I’m not talking about paint. This tool is global, it affects the whole world. Here’s an article on it: Terrain Material Search & Replace Release
It’s a new feature. Use regions, set size to max to cover the whole world, select the material you want to turn it into and the material you want to replace, and then just transform it.
No manual editing. It will take like 5 minutes.