Incremental find. What is that? It is one of many features in SQL Developer that I have managed to overlook. It has been right there though, staring me in the face. I’m betting that many of you have seen it without really SEEING it, just like I have been doing.

Until today that is!

I know that 'Find' does, but what's this other find do?

Let’s take a look at the word ‘incremental’ first:

From http://dictionary.reference.com

in·cre·men·tal   [in-kruh-men-tl, ing-]
adjective
increasing or adding on, especially in a regular series: small, incremental tax hikes.
Origin:
increment + -al1

So it’s like a search that’s increases or adds on?

And really, Dictionary Reference DOTCOM, who uses the word to define said word?

Let’s just see what happens when I use it in SQL Developer.

Our keyboard shortcut is Ctrl+E.

Open a file or PL/SQL object and put your cursor somewhere in the middle of the document.

Ctrl+E

Type in a search string.

Voila! Right away you should see where the ‘incremental’ is coming in. What it means in this case is that it’s an extra-awesome ‘Find.’

Here’s the Ctrl+F find:

'Normal' Ctrl+F Find

Hitting the ‘Up’ and ‘Down’ arrow buttons will cycle through the text finding the next iteration of the search text. SQL Developer Power Tip: Use F3 to advance the search to the next occurrence.

Now, let’s ‘increment’ our find with Ctrl+E

Find and highlight all occurrences of the search string forward

Incremental Find Backward

I’m going to let you figure out what this does. But here’s a hint. Put your cursor before an exception block, and do a Ctrl+Shift+E. Type your search string. SQL Developer will highlight all occurrences of the the string BEFORE your exception block.

Brilliant!

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

5 Comments

  1. Hi Jeff, is there a setting to make the highlighted occurrences stay highlighted even though I click with the mouse in the SQL editing window? Or even if I start typing? I am asking this because sometimes it is extremely useful to have a term highlighted while coding.
    Thank you in advance and congratulations for a great product!
    Peter

  2. Antony Losev Reply

    It’s completely missing from latest releases of SQL*Developer though shortcuts are still in the Settings.
    Now these shortcuts bring the standard search box, not the Incremental Find window.
    It completely removes ability to incremental search backward: after pressing Ctrl+Shift+E and typing something in the search box the cursor jumps to the next occurrence not the previous.

    • the incremental search…highlight all occurrences BEFORE or AFTER the cursor…that looks broken and would be a bug

    • Anton Losev

      Than you for your fast reply, Jeff.
      I’ve checked, it works fine in 4.0.25. The Ctrl-Shift-E shortcut brings the floating window titled ‘Incremental Search Backward’ as on screenshots.
      The whole thing about incremental search backward for me is like “I see some text on the screen that precedes current cursor position. So I do incremental search backward and after it the cursor moves to the exact position I wanted it to move to”.
      The broken behavior in the latest releases does the opposite. It moves the cursor to the next occurrence somewhere I never intended it to move. That in many cases means scrolling the screen down and completely loosing the context. So it does not matter if I can hit Shift-F3 to go to the previous occurrence.

    • the find/replace UI changed completely for version 4.1 from version 4.0 – and I don’t think it will ever come back

      but you can file a bug or ER to get the incremental search to work as it did before, I would agree with you

Reply To Antony Losev Cancel Reply