How to enable "live search" in eclipse?
Asked Answered
S

5

12

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?

Stilt answered 10/10, 2011 at 9:20 Comment(0)
L
14

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.

Lavalley answered 19/1, 2012 at 7:5 Comment(1)
You can also use up arrow/ down arrow to navigate once you enter incremental find modeDitzel
M
5

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.

Menchaca answered 19/1, 2012 at 7:40 Comment(2)
Looks nice. Just installed it. :)Balaton
Yes, it does come in handy. Now if only they could get a nicer implementation for the Find/Replace dialog... ;-)Menchaca
I
4

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

Irenairene answered 2/8, 2016 at 5:45 Comment(0)
M
0

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.

Maurist answered 19/1, 2012 at 4:25 Comment(0)
B
0

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

Balaton answered 19/1, 2012 at 7:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.