In-place Replace in IntelliJ IDEA 10.5

Hi 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.

Comments below can no longer be edited.

15 Responses to In-place Replace in IntelliJ IDEA 10.5

  1. Avatar

    Fredrik says:

    April 29, 2011

    Improving the day-to-day basics, I like it!

  2. Avatar

    Alain O'Dea says:

    April 29, 2011

    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!

  3. Avatar

    Arnon says:

    April 29, 2011

    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.

  4. Avatar

    Larry Gerndt says:

    April 29, 2011

    Innovative and inspiring!

  5. Avatar

    Juan Hernandez says:

    April 29, 2011

    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:

  6. Avatar

    Behrang says:

    April 30, 2011

    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.

  7. Avatar

    Dimitar says:

    May 1, 2011

    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.

  8. Avatar

    andrey zaytsev says:

    May 2, 2011

    @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.

  9. Avatar

    andrey zaytsev says:

    May 2, 2011

    @Arnon I added most annoying bugs in my “short-list”. It’ll be fixed asap. Thanks.

  10. Avatar

    Behrang says:

    May 4, 2011

    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!

  11. Avatar

    Rick R says:

    June 6, 2011

    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.

  12. Avatar

    Boris Okunskiy says:

    June 16, 2011

    Can I switch back to the good ol’ dialog somehow?

  13. Avatar

    Dave Bain says:

    August 17, 2011

    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?

  14. Avatar

    Nikita Volkov says:

    October 3, 2011

    To have a multiline search I found a simple workarond: instead of . use [wW] pattern – this will enable it to search multiple lines

  15. Avatar

    Ken G says:

    October 12, 2011

    Is there any way to switch back to the old dialog box?

Discover more