IntelliJ: Replace text while preserving case


How many times have you replaced text twice because the basic word was the same, but the starting letter in different cases was a difference case?

If you use IntelliJ, you don’t need to do that.

In the replace dialog is an option for ‘Preserve case’. Click it, and IntelliJ will do the right thing.

e.g. change This text to this text

Replace ‘this’ with ‘that’. IntelliJ will convert text to

change That text to that text.