Eclipse highlights the same word occurrence

In Notepad ++, it has a very good feature: if I select a word, it will highlight all the same words in the text. Added to this, I can set hotkeys to highlight up to five different words with different styles (see Effect below).

enter image description here

Are there any ways / plugins to get a similar effect in eclipse? I know when editing Java, it selects all the same variables, but will not work when I select comments and edit other types of files (e.g. xml, html, js, css, etc.).

+44
eclipse syntax-highlighting eclipse-plugin
Aug 30 '11 at 3:23
source share
10 answers

I have been working with Eclipse for a long time, and I am quite sure that the canonical way to this does not exist.

In Eclipse, these things are managed based on each editor, and the Java editor does not support what you are looking for for everything I know. At least for the Java editor, you can make a little configuration in what is highlighted and how ( Preferences > Java > Editor > Mark Occurrences ), but I think you already know that.

As for the plugins, I do not know a single plugin that achieves what you are looking for. Actually, I would be surprised if there really was a plugin that does what you are looking for.

If something comes, I would really appreciate that you share it here, I tried to achieve decent lighting in Eclipse for years unsuccessfully ... :)

+29
Aug 30 '11 at 12:40
source share

Here is the plugin for eclipse: http://ystrot.imtqy.com/glance/

It selects all occurrences, like using notepad ++ when pressing Ctrl + Alt + F.

+29
May 24 '13 at 18:59
source share

If you turn on "Mark Occurrences", then all words that match the ones you marked will be highlighted.

You can enable it in two ways:

  • Alt + Shift + O
  • Preferences > Java > Editor > Mark Occurrences

    enter image description here

+21
Nov 19 '12 at 9:18
source share

Below is what I found for me, but you can also assign a key label "Find text in file":

  • Select a word or section of text
  • Press CTR+3 to activate the Quick Access search.
  • Enter "Find text in file"
  • Run

As @Kislingk already mentioned, you can change how words are highlighted / marked in Preferences> General> Editors> Text Editors> Annotations.

eclipse-highlight-search-results-in-file

+3
Apr 26 '15 at 3:18
source share

Using file search to search for a selected resource can highlight the same word in a single file.

+1
Sep 13 '13 at 1:29
source share

Another useful eclipse plugin is eclipse instasearch . It has an extensive feature set. It is also available in the eclipse market.

+1
Dec 04 '14 at 9:58
source share

Here is the closest solution I found:

  • Create a shortcut in Settings / General / Keys, enter in the search field: "Find text in file" By default, it has nothing assigned, so just assign it a key binding.

  • Annotations can help with sidebar display

enter image description here

+1
May 30 '17 at 7:55
source share

There are other options required to enable. (Settings> General> Editors> Text Editors> Annotations). Find Events and WriteOccurrences and Include Text as "Highlight"

0
Jul 19 '12 at 23:26
source share

Tried all of the above answers, but all of them do not work. In the end, I found that due to the fact that I accidentally deleted from the JRE System Library , after adding back, it works correctly

0
Mar 23 '17 at 5:56 on
source share

Window> Preferences> Java> Editor> Mark Incidents

0
Dec 08 '17 at 14:12
source share



All Articles