fastcodejava
fastcodejava

Reputation: 41117

How to cancel search highlight in Eclipse

When I search something in Eclipse, the search items stay highlighted for some time. How do I remove this after I have found what I was looking for?

Upvotes: 61

Views: 16950

Answers (5)

Noumenon
Noumenon

Reputation: 6452

For a single instance, delete the line and undo it: Ctrl+DCtrl+Z. This is faster than the other answers, and worked when they failed (for some buggy JSP I had).

Upvotes: 1

andrzej.szmukala
andrzej.szmukala

Reputation: 961

An alternative way is to run a search that will yield no results. For example file search, containing text - leave this field empty, files - some stupid extension like ".qwe".

For people concerned that https://stackoverflow.com/a/3545215/6012102 removes search results from history.

Select the search from history, press "Run the current search again" (2 rotating arrows icon). This will run the search and you will get all the results back (this brings back the text highlight as well unfortunately).

Upvotes: 2

AAA
AAA

Reputation: 11

Disable Preferences->General->Text Editors->Annotations->Search Results->Text as.

Upvotes: 1

Andreas Dolk
Andreas Dolk

Reputation: 114817

AFIAK, the search result view has a toolbar button to clear the search results. This removes the highlighting in the editor.

Upvotes: 10

K Erlandsson
K Erlandsson

Reputation: 13696

Remove your matches in the search view, that will remove the highlighting. I.e., click the button with the two X's in the search view.

If you cannot see that view, navigate to window -> show view -> Search

Upvotes: 95

Related Questions