how to change the background of the current line in eclipse - eclipse

Eclipse:
just as you can see, now the current line in Eclipse is dark green, but i want to change the current line to just a underline, just as what i make in vim, the underline is the current line:
vim
can eclipse make it? i have searched all i can, including preferences in eclipse and google, but still cannot find a solution.

:hi cursorline cterm=underline ctermbg=None

I can't seem to find that option anywhere in the default options of the eclipse.
The only area I see to deal with the 'current line' theme is
Windows > Preferences > General > Editors > Text Editors
In this screen you should see the Appearance colors options which is where you can select the Current line highlight.
Another spot I checked is the Annotations section:
Windows > Preferences > General > Editors > Text Editors > Annotations
But I did not see any kind of current line option. You might have to try a 3rd party plugin for this.

Related

PyDev colors - what is this color called and how do I change it?

I'm using Eclipse 20190917-1200 with PyDev for Eclipse 7.4.0.201910251334. Whenever I move my cursor into a key word it's highlighted as shown below. I can't find this color anywhere in the PyDev settings. One question is, what is that behavior called, but more importantly, how can I change that insane color!
Go to general > editors > text editors > annotations > Occurrences (PyDev) and change the colour or uncheck it.
Hope this works for you !!

How to change color of selected text in Eclipse [duplicate]

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

How can I edit the markdown font colors in Eclipse Luna?

For dark color schemes in eclipse, the default markdown colors are hard to read. This makes it difficult to edit README.md files, for example.
It took me a while to find the right setting to change font color and thought I would share the answer.
In Eclipse, open:
Window > Preferences > General > Editors > Text Editors > WikiText
Select "WikiText", not any of the subfolders.
From here, there are inputs where you can change the color style. For example:
color: #ccc;
You must close and restart Eclipse for the settings to take effect.
There appears to be a bug in WikiText > Appearance, as changes made there did not take effect for me.

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

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.
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".
On Mac:
Eclipse
Preferences
C/C++
Editor
Inactive code highlight (2nd option)

Eclipse: I turned on hidden characters now I can't turn off

Somehow I've turned on hidden characters in Eclipse. It's not the "whitespace" characters in the general editor preferences. When turned on, it adds another layer of hidden characters over the existing ones.
Then I have things like
\r\n
Does anyone know what these are and how to remove them?
It is under Preferences > General > Editors > Text Editors. There is a checkbox labeled "Show whitespace characters". If you uncheck this the editor switches back to normal.
If you click on the link (whitespace characters) (<= v3.6) or (configure visibility) (>= v3.7) in this line you will get a popup window, in which you can define which characters eclipse is supposed to consider as whitespace characters.
In this popup window you also get the option to define the transparency in which each whitespace character is displayed in the editor, which you can use to (indirectly) change their foreground colour. I'm just mentioning it here, because it took me about half an hour to find this setting! ;-)
There is a toggle button 'Show Whitespace Chars' on the Eclipse toolbar
A great tip about using 'quick access' from eclipse forum:
CTRL+3 swc
Allows to turn them on and off
The right shortcut is Ctrl + N
UPDATE From Eclipse 3.7 version, something is changed... Now you have to go to:
Window > Preferences > General > Editors > Text Editors
CTRL + . does the job.
For Aptana Users
To toggle hidden characters in Aptana on and off, use the following keyboard shortcut:
Ctrl+Alt+W
I am using Eclipse Oxygen and can see this option to toggle whitespace characters:
It is actually in two places...
Sandkastenliga points out the obvious one, but you can also show white space with a shortcut key combination. The key combination is separate from the text editor preferences and will superimpose additional characters when active (it uses \r and \n for carriage return an line feed respectively instead of the symbols used by the text editor preference.)
Go to preferences > general > keys and look for the binding for the 'Show Whitespace' command.
I have the text editor preference turned on, so I removed the binding for this command altogether (it was set to Ctrl+. in my profile) to prevent accidental activation as it doesn't affect the other preference.
Go to Window > Preferences > General > Editors > Text Editors
Uncheck the "Show whitespace characters" option on the right side of the page, then click "Apply" at the bottom of the page.
Since this is not a standard setting, it could be the result of one of your extra plugin.
Did you try starting your eclipse with the -clean parameter?
Do you reproduce the issue with a fresh Eclipse installation?
Go to Preferences > General > Editors > Text Editors and restore defaults.
I have done this several times by accidentally hitting some keystrokes.
If you go to Windows/Preferences/General/Keys you will see all the keyboard shortcuts you have.
Mine is set to Control + .
I had to place my cursor inside the document and do it a couple of times to make it work because there is also a keyboard shortcut for Control +
Hope that helps.
You can add "Show Whitespace Characters" button in toolbar by customizing your perspective.
It also contains buttons to toggle word wrap, and toggle selection mode.
Go to Window > Perspective > Customize Perspective > Action Set Availability, then select "Editor Presentation" action set:
This works in Eclipse Neon.
You can also add a key binding for this action.
Go to Preferences > General > Keys > "Show Whitespace Characters"
Sorry this is a bit vague but it's a while since i used Eclipse and i do not have it installed. I think this is it ..... in one of the menus you will find the Eclipse settings, there are two set's of settings, current project and overall Eclipse, you mat need to check them both. In there are various menus in tree form that allow you control the actions and look and feel. But some of them are nested so there is an overall control but some packages have their own options in a sub menu set. The menu's will expand when you click them and i'm afraid you need to walk through them all.
Eclipse > Preference > General > Editors > Text Editors > Show WhiteSpace characters.