In-place Replace in IntelliJ IDEA 10.5
April 29th, 2011 by andrey zaytsevHi everyone!
Long time ago IntelliJ IDEA got a face-lift for Find functionality where the old Find dialog was replaced with the editor’s toolbar. Now we’re introducing a similar, more comfortable and less modal Replace.

A planned killer is that when you are doing a regular expression replace you can see the result preview in a tooltip, as shown on the screenshot above.
So, try it in a latest IntelliJ IDEA 10.5 EAP and let us know how it works for you.

April 29th, 2011 at 7:46 am
Improving the day-to-day basics, I like it!
April 29th, 2011 at 8:37 am
I have already said this in another way on Twitter, but this feature is incredibly great. I find myself reaching for VIM less and less for text transform tasks now. Having this in IntelliJ makes my workflow much smoother.
Excellent work folks!
April 29th, 2011 at 12:43 pm
That’s really nice. But at the same time the find functionality has been broken for several EAP releases with problems ranging: focus problem after find and replace operations, find count problems, action button state problems (various buttons being disabled where they should be enabled, and the worst: the whole editor pane scrolling all the way to the top after a find and replace operation. All of these had open bugs for several EAPs and have not been addressed yet.
10.5 should not go to production without all of these being addressed. Adding functionality while breaking basic behavior is pretty bad and not in the track record of JetBrains.
Unrelated, but long lasting is the broken search functionality in help - that was broken since 10.0 (no search at all) - keep more focus on stability than new bells and whistles.
April 29th, 2011 at 1:43 pm
Innovative and inspiring!
April 29th, 2011 at 3:08 pm
Looks like a nice improvement.
Regarding the regular expressions, when highlighting the matches you could display the value of each matching group in a tooltip like in the excellent RegExr tool:
http://gskinner.com/RegExr/
April 30th, 2011 at 9:20 pm
Fantastic! But, at the same time, please pay more attention to the current open bugs. The JRuby debugger has not worked for me since version 9 and it has hindered my productivity very much. I can’t say it has been a pleasure to develop this JRoR app at all.
May 1st, 2011 at 2:28 am
Two usability annoyances I have with the new UI:
There is no easy way to recall a previous search/replace from the keyboard. With the Search functionality, pressing Ctrl+F twice would bring up a list of previously used search expressions. That would have been useful to have for S/R as well. Picking a search pattern in this way (double Ctrl+R), should automatically populate the replace box as well, or you might choose to just retain the replace expression, rather than clearing it up every time.
Another one is that both text-boxes have fixed and rather small sizes. I find myself working on a complex regular expression in a text editor on the side and pasting it in the new text box. The old UI was a bit better, because one could resize the dialog.
It would be an improvement if the text fields had a resizer grip on the side, or if they were taking all available space, or if there was a button to pop the legacy search/replace dialog. The last option can be improved, if we have extended search/replace dialog, which would use text-area instead of text-fields and posibly allow for multi-line expressions and in the case of regex allow to set the flags.
May 2nd, 2011 at 2:52 pm
@Dmitar Thanks for your feedback! Regarding your first issue you can use Ctrl-H short-cut either click toolbar icon to see history pop-up in both search and replace text fields.
Multiline search support is in our road-map.
May 2nd, 2011 at 2:54 pm
@Arnon I added most annoying bugs in my “short-list”. It’ll be fixed asap. Thanks.
May 4th, 2011 at 5:46 am
Earlier I had left a comment about the buggy JRuby debugger of IDEA. I wanted to say that I was wrong and apparently the problem lies within our project’s convoluted and non-standard config. IDEA ROCKS!
June 6th, 2011 at 2:16 pm
I guess I should ask this in the forums, but can someone tell me how I could easily do a search and replace for a multi-line entry? I don’t want to use regex because the lines I’m searching for will have to have so much crap escaped in them.
In jEdit I can do this straight from the find dialog without issue. Would like to be able to do it in IDEA. Thanks.
June 16th, 2011 at 4:20 am
Can I switch back to the good ol’ dialog somehow?
August 17th, 2011 at 12:47 pm
Don’t know when this changed but when you do a search replace with a highlighted section, idea does the replace but then check outside the highlight section and automatically moves the focus to any other instances found. This is a major pain if you’re trying to do multiple search replaces across the same highlight block. Is there any way of stopping this happening?
October 3rd, 2011 at 9:56 am
To have a multiline search I found a simple workarond: instead of . use [\w\W] pattern - this will enable it to search multiple lines
October 12th, 2011 at 8:16 pm
Is there any way to switch back to the old dialog box?