Issue
I changed my Netbeans default theme to Dracula LaF, I want to change results matching words because it's the same color for the whole sentence.
You can see my problem here.
I search the word "global" and I want to change matching words color.
How can I accomplish this?
Solution
There is no option to specifically change the font color or background color for the search string within the results displayed in the Search Results window. Instead the search string is simply shown in bold in the same color as the font color. That doesn't work well at all for your Darcula theme, but for other themes with black font on a white background it is very clear.
However, even though there is no direct solution for your problem, there are still a couple of options that may or may not work for you.
One approach is to use a different dark theme instead of Darcula to see if the way the search results are rendered with that theme is more to your liking. There are many alternatives available. For example:
- You could try the Dark Look and Feel Themes plugin which is available for installation from Tools -> Plugins.
- This site has 24 themes.
- This site has over 90 themes.
However, my experience is that the highlighting of light fonts does not stand out as well as the highlighting of dark fonts. Given that, an alternative approach is to continue using Darcula for code editing, but some other scheme for the rest of the NetBeans panels and windows.
To do that go to Tools -> Options -> Appearance -> Look and feel and then make a selection from the Preferred look and feel drop list:
I chose Nimbus which has a black font on a white background. Here's the NetBeans screen before the change, using only the Darcula theme:
And here's the same NetBeans screen after adding the Nimbus look and feel and restarting NetBeans:
Aesthetically the pure Darcula screen looks better, but as a practical matter those search strings in the Search Results window are far more visible when using Nimbus. If you spend most of your time in NetBeans with your code window expanded to full screen the change probably won't be relevant most of the time.
As a long term solution, one other thing you could do is raise a bug report with NetBeans requesting the ability to custom configure the Search Results window. They have already done that for the Terminal and Output windows (through Tools -> Options -> Miscellaneous then selecting the Output or Terminal tab).
Answered By - skomisa