Say I wanted to replace all commas with commas and a new line using Intellij IDEA\'s replace function. What do I put in the search box? In vim I\'d use &\\r
On intellij Ultimate 2017.1:
I didn't need regex. But I could make the multiline replace appear.
You need to check the Regex box and use "\n" for the new line character:
The easiest way that I have done it is to use the regular expression form of replace.
Chances are that you don't want to replace the {
, but just keep in my escaping them if you do want to do so.
For those looking for the old multiline replace in inteliJ with version > 15.x. It seems somewhat hidden, but if you select multiple lines > click CTRL+F
, then immediately click CTRL+R
you are presented with the original multiline replace.
This is working on Mac IntelliJ 2016.1.3
with ⌘+F > ⌘+R