I just switched from geany to eclipse and I have a little problem
How can I change that highlight color which is VERY annoying
As you can see, whenever I highlight anything and click somewhere else, it changes like this. How can fix this little bug?
Open Window>Preferences>General>Editors>Text Editors>Annotations
Modify the color for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". Obviously I'm using eclipse PHP but you should see similar options in the annotations list for non-PHP eclipse.
Here's what worked for me:
Open Windows -> Preferences -> General -> Editors -> Text Editors ->
Annotations
Select "Occurrences (PyDev)." The "Text as" drop down box on the right should read "Highlighted," and the color is very light.
Click the color button and change it to something easier on the eyes.
I found the best thing to do is to go into GWindows -> Preferences -> General -> Editors -> Text Editors -> Annotations and change everything from Highlighted to Underlined and choose the underline color to suit.
If you are using Python in eclipse (using PyDev) than the above solution won't help.
Than you have to go to
"Open Windows>Preferences>General>Editors>Text Editors> Annotations"
and change the color of Breakpoints(PyDev).
Once you do that the color of all which are matching your current selection will be in the color you chose and not the annoying yellowish highlight color.
General->Editors->Text Editors->Annotations preference
section. Look for C/C++ Occurrences and C/C++ Write Occurrences.
I had to spend an inordinate amount of time searching for an answer to this question. Here is a picture of the Preferences showing which selection is for changing the background color of text you have selected with your mouse in the editor. This is totally different from the Occurrences that people keep pointing out.
If you're using PyDev, use the following:
Open Window>Preferences>General>Editors>Text Editors>Annotations
in the list of Annotation types there is the "Occurrences (PyDev)" Option, which is the one you'll want to change.
I found a blue highlight for dark mode works well in PyDev.
For me, this is what did it (seems it's different for everyone):
Open Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations
Under "Annotation Types":
select "Boot Dynamic Info", then uncheck the "Text as" checkbox on the right.
Using the answers above to set the colours, here are some that I found worked in RGB:
(65, 66, 36)
(83, 55, 55)
In my case, Spring Tool Suite 4.14.0 (202203), changing "LSP Read Occurrence" color under Windows -> Editors -> Text Editors -> Annotations solved my problem.
https://i.stack.imgur.com/v74Of.png
I had the same issue with highlighted inactive code.
I was able to change it in Window>Preferences>C/C++(or other programming language)>Editor under "Appearance color options:" select "Inactive code highlight" and change to the desired color.
Similar post about inactive code in Eclipse.
Also check "Vwrapper Search" color setting if you are using that plugin
Under Open Window > Preferences > General > Editors > Text Editors > Annotations
For some reason it overrides other defaults. Tested with the Darkest Dark theme on Eclipse 2022-09.
Annotations is the setting you want to Change (whatever Eclipse you are using - example below is CDT):
annotations / Occurences in Eclipse preferences
I'm trying to make my eclipse full dark on windows OS. This is what happened:
The scroll is still white (on the right), both in "Dark" and "Moonrise" theme. I googled a lot and found out that i must update my eclipse to 4.4.1. I updated my eclipse, but the problem persists.
Please help me. Thanks for your time.
It's because scrollbars color is set in your desktop environment settings. E.g. windows, or gnome.
To make eclipse using dark scheme you need few steps:
Install/configure any dark theme for your desktop environment. For linux / Gnome 3 Flashback I suggest using GnomishDark.
Install "Eclipse Color Themes" plugin to Eclipse from Marketplace.
Choose theme you like in Eclipse (General -> Appearance -> Color Theme). E.g. I used Wombat.
If you want change some other colors, look here:
General -> Appearance -> Colors and Fonts
General -> Editors ->Text Editors -> Annotations
General -> Editors ->Text Editors -> Quick Diff
General -> Editors ->Structured Text Editors
You can see my eclipse with GnomishDark theme here.
I know I'm not the first to need this. I am working on an in house created codebase and I would like to apply highlighting to it within Eclipse. In Notepad++ I can set language for the file I'm looking at. Is there any way to do this for Eclipse?
The code I'm working on would use the same syntax styling as C++.
Your best bet is to go to Preferences -> General -> Editors -> File associations. Add the file extension of the thing you are trying to open and add the C++ editor as the associated default editor.
If there is no file extension, then things are a little harder. Instead of double-clicking to open the file, right-click -> Open with... -> other -> C++ editor. This will remember your choice for that file only.
As Andrew Eisenberg said, go to Window --> Preferences --> General --> Editors --> File Associations and ensure your choices for editor for each file type are correct according to your desires.
However, for Eclipse CDT most of your file types are set in Preferences --> C/C++ --> File Types instead.
Also, like he said, you can use the right-click menu to choose your own editor, including an external system editor, such as Sublime Text 3, Atom, Visual Studio Code, Notepad++, etc.
Right click on the file --> Open With --> Other... --> choose an "Internal editor" or "External program" to your liking, optionally checking the box at the bottom to make this the default choice next time.
Is there a way to configure tab spaces for Eclipse Compare/Merge editor?
I have the Text Editor to use 2 spaces for tab and "Insert spaces for tabs" but this doesn't seem to take effect in the Compare/Merge editor. It's quite annoying since it's occasionally messing up the indentation in the source code. I guess my other option is to use an external tool but it would be great if this can be configured within Eclipse.
I'm using Indigo SR2 (64-bit)
--
This appears to be a related Eclipse bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259410
You can choose to ignore whitespaces in the compare editor. Either you right click in the editor and choose Ignore White Space or you set this in eclipses preferences Window -> Preferences -> General -> Compare/Patch -> Ignore White Space
I don't want Eclipse to display any keyword in bold. I've browsed through a lot of options in the Preferences window, but could not find a way to do this. Is it possible?
This depends on the type of file you're editing. For example, in Java:
Window menu -> Preferences -> Jave -> Editor -> Syntax Colouring -> Java (in the "Element" box) -> Keywords excluding 'return' -> Uncheck bold
Similarly for "Keyword 'return'".
Look at the preview to check everything you want is no longer bold.