Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change background color in eclipse for a not defined region?

Tags:

eclipse

Really annoyed by eclipse masking over #if defined region with grey color. I want to either turn off this feature, or make it the same as for normal region. Have been looking for a solution for some time but couldn't find anything.

HELP!

Thanks.

like image 282
Code_So1dier Avatar asked Mar 06 '12 05:03

Code_So1dier


People also ask

Why doesn't my eclipse background change when using a dark theme?

If you are having trouble with Eclipse 2019 and using a dark theme and setting the background and having it not change: There seems to be a recent Eclipse bug. I suggest you look here or here for workarounds. Show activity on this post.

How do I change the background color of the editor?

Editor colors are set chaotically by different editors, search for background in eclipse preferences to find different options. One easy way to get beautiful dark (and not only dark) themes is to install Afae plugin, and then pick theme within its preferences (twilight theme is beautiful, for example) - again, eclipse prefs, Afae group.

How do I change the color of the text in Eclipse?

If you go to Windows, Preferences then select General, Editors, Text editors, you can set colors on that property page (and there's a link for setting MORE colors - General, Appearance, Colors and fonts). That's with an Eclipse 3.3 build anyway.

How to change the background color/font of code highlight?

Window > Preference > [Your Language] > Editor > Syntax Coloring Inside the panel, you should able to find out preference color/font for your language. For C/C++ editor, it has an option call "Inactive code highlight". I went through those settings number of times, but couldn't find background change option for #define / #ifdef / #ifndef.


2 Answers

You can adjust language syntax coloring via

Window > Preference > [Your Language] > Editor > Syntax Coloring

for the language specified background color, you can check

Window > Preference > Appearance > Colors and Fonts

Inside the panel, you should able to find out preference color/font for your language.

UPDATE :

There is an "Appearance Color Option" in

Window > Preference > [Your Language] > Editor

For C/C++ editor, it has an option call "Inactive code highlight".

like image 176
Rangi Lin Avatar answered Sep 22 '22 01:09

Rangi Lin


On Mac:

  1. Eclipse
  2. Preferences
  3. C/C++
  4. Editor
  5. Inactive code highlight (2nd option)
like image 44
Nick Bolton Avatar answered Sep 20 '22 01:09

Nick Bolton