Multi line search (Find + Find/Replace)

We used to have a button that allowed to search for text with multiple lines (line breaks):

findText.png

This button seems to be have disabled in IntelliJ 15 (or is there another way to accomplish this?):

Screen Shot 2015-11-24 at 9.27.01 AM.png

I know this can be accomplished with regex, but it's sometimes a bit easier to paste a selection with line breaks in the Find box.

If this has been asked elsewhere, I apologize.

1
4 comments
Avatar
Permanently deleted user

You probably want to vote for IDEA-145720 Search/Replace bar - Multiline & Find All buttons - Please bring them back.

As a workaround for now, you can get a multi-line search by selecting two or more lines in the editor and then hitting Ctrl+F. If you want Multi-line find & replace, you still need to first to type Ctrl+F after selecting the multiple lines, and then type Ctrl+R (after the find bar opens) to get the multi-line find & replace. If you hit Ctrl+R straight from the editor after selecting multiple lines, you still only get the single line boxes.

-1

You can also use ALT-Enter to add a new line in either the "search" or the "replace" field.

4

Thanks Stephen - at last the answer I was looking for!

1

In Mac OSX, press `cmd + shift + enter` to drop into the next line. Use regex search (add .* to the end of your first line). Sample:

 

@Column.*
private

0

Please sign in to leave a comment.