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.

This entry was posted in New Features and tagged , . Bookmark the permalink.

15 Responses to In-place Replace in IntelliJ IDEA 10.5

  1. Fredrik says:

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

  2. Alain O'Dea says:

    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. Arnon says:

    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. Larry Gerndt says:

    Innovative and inspiring!

  5. Juan Hernandez says:

    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/

  6. Behrang says:

    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. Dimitar says:

    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. andrey zaytsev says:

    @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. andrey zaytsev says:

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

  10. Behrang says:

    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. Rick R says:

    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. Boris Okunskiy says:

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

  13. Dave Bain says:

    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. Nikita Volkov says:

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

  15. Ken G says:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>