I can't edit selected text foreground color in Visual Studio 2010. Anyone know how to do this?
Asked Answered
C

2

12

Let me show you:

alt text

As you can see "Item foreground" is disabled.

I want to believe there's something wrong on my end because being able to choose the colors you use to program in is a basic right for a programmer. No one should ever take that feature away and go unpunished.

Chastitychasuble answered 13/2, 2010 at 8:27 Comment(2)
Just a suggestion - this question is about a very specific font color (selected text foreground color), so it would be more accurate to note that in the title than "some font colors".R
Nice I have the same exact problem: social.msdn.microsoft.com/Forums/en/vseditor/thread/…Meistersinger
R
10

I just wrote an extension that does this. You can download the extension on the Visual Studio Gallery or directly from the Extension Manager in visual studio (search for my name or the name of the extension, "Selection Foreground").

A few caveats:

  1. I just threw this together, so I don't make any extensive guarantees of correctness.
  2. It uses a different fonts and colors item, named "Selection Foreground", instead of the regular "Selected Text" item. It'll be (alphabetically) towards the bottom.
  3. There will be some amount of performance degradation while changing the selection. This can be improved, but I haven't had time to do so yet.

Also, you can grab the source on github, if you'd like to make any changes.

If you have any comments, you can leave them on my blog. I'll probably write a post about this extension in the next week or so.

R answered 14/2, 2010 at 8:52 Comment(3)
Does not seem to work for me. Downloaded this today, installed it, closed VS re-opened it and I still cannot change for example the foreground for the Indicator Margin in VS 2010Meistersinger
That's not what the extension is for (changing the foreground of the indicator margin) - it's specifically for changing the selection foreground. It sounds like your issue is with the fonts and colors dialog not letting you set the foreground color for things that don't let you modify the foreground color, and this isn't a general solution for that.R
Can't believe we need an extension for this, ugh. But thanks for writing one!Muss
B
7

Seems to be by design because selected areas now retain syntax highlighting:

In light of this new mini-feature, we intentionally disabled the foreground color option for Selected Text in Tools->Options->Environment->Fonts and Colors. Because selected text doesn’t have a single foreground color but instead retains whatever syntax coloring it had when not selected, an option for selected text foreground color doesn’t make sense for Visual Studio 2010. For Beta2, the Tools->Options preview for Selected Text always shows the VS 2008-style white foreground color, which we realize can be confusing.

Belgium answered 13/2, 2010 at 8:45 Comment(2)
This is crazy. They screwed contrast, no single background color has a good contrast for every possible foreground color. Obviously, whoever took this decision is not a programmer himself. I hope they change this in the final version or I won't be switching to VS 2010. The color-scheme is more important to my productivity than any new fancy feature they might have added.Chastitychasuble
@Chastitychasuble well, make sure you let them know, they have comments enabled in their blog.Belgium

© 2022 - 2024 — McMap. All rights reserved.