How to enable "live search" in eclipse?

4.3k views Asked by At

In Komodo Edit, an input field is available in the toolbar. When I type text in it, it highlights matching search results. Is there something like this in Eclipse, either directly or via a plugin?

5

There are 5 answers

0
TK Gospodinov On

The closest thing to the functionality you are asking about is the 'incremental search' mode, which is triggered by checking the 'Incremental' checkbox in the Options group on the Find/Replace dialog in Eclipse (Ctrl+F from the code editor). This will make it start highlighting matches as you type, and if they are keywords, Eclipse will highlight other occurrences (references) in the code editor. Matches inside strings or Javadoc will not be highlighted, however, unless it happens to be the first match after your cursor's position inside the editor.

1
Eldar Abusalimov On

As TK Gospodinov has already mentioned, there is an Incremental option in Find/Replace (Ctrl+F) dialog.

There is also a special key binding for Incremental search in Eclipse (and personally I use it more frequently). From Eclipse Tips and Tricks:

Use Edit > Incremental Find Next (Ctrl+J) or Edit > Incremental Find Previous (Ctrl+Shift+J) to enter the incremental find mode, and start typing the string to match. Matches are found incrementally as you type. The search string is shown in the status line. Press Ctrl+J or Ctrl+Shift+J to go to the next or previous match. Press Enter or Esc to exit incremental find mode.

0
dbrank0 On

One similar thing (not the same) is just enabling "mark occurences", then selecting function name, variable etc.

2
Amos M. Carpenter On

If you'd like to have search functionality in a toolbar, you may be interested in the eclipse-glance plugin, which allows you to use the incremental search function in a toolbar by pressing Ctrl + Alt + F while in any text area.

0
Teja On

This feature is already available in eclipse. No need to install any plug-in. Press Ctrl+F, and the Find pop up appears.

enter image description here

Now check the incremental checkbox, and then your texts will be found as you type. No need to hit return.

OR

Use Ctrl+J and you can activate the live search, just that there wont be any UI visible, but you can see the status in eclipse status bar at the bottom.

Press Ctrl+J, start typing the text you want to search for. Press esc to go back to edit mode