Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace Eclipse search dialog?

Tags:

eclipse

Is it possible to replace Eclipse search dialog to something more convenient, like the search dialog in Firefox or Chrome? The default one doesn't support F3 to search for the next match, it doesn't move itself away if the match is underneath the box and doesn't allow to highlight all the matches - and these are the features I really miss...

like image 660
Fluffy Avatar asked Jul 08 '10 09:07

Fluffy


2 Answers

I don't think you can replace the Find dialog easily. You would probable need to (re-)write parts of Eclipse. Definitely doable, but not a small task...

That said, most of your problems can probably be addressed by the current dialog:

The default one doesn't support F3 to search for the next match

"search next match" is Ctrl-K by default. You can configure the keybindings under "Preferences / General / Keys": change the keybinding for "Find Next".

it doesn't move itself away if the match is underneath the box

Yes, that would be nifty. The dialog does however remember where you last put it, so just put it somewhere out of the way (e.g. over the package browser, or to the right), and it will stay there.

and doesn't allow to highlight all the matches

This is not yet available (though it has been discussed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 ). There are however two ways of getting a similar result:

  • Use the search function from the toolbar ("File Search" from the "torch" button). If you search there, it will highlight all matches in the editor (and provide marks in the editor ruler, and a list in the search view).
  • For Java elements, activate "Mark Occurences" ("highlight pen" button). This will highlight all occurences of a Java element if you mark in in the editor.

Maybe one of these will help you.

Finally, you can just open any file in an external editor (like (g)vim or Notepad++) right from inside Eclipse (right-click -> Open with). Then you can use any editor you want...

like image 109
sleske Avatar answered Sep 18 '22 18:09

sleske


While it may not be exactely what you want, have you ever used the incremental search (Ctrl + J)? In my opinion it is much more convenient than the standard search.

like image 30
helpermethod Avatar answered Sep 19 '22 18:09

helpermethod