What's the vs.net 2010 color item name for highlighted text when searching? - visual-studio

Whenever I do a find/replace in vs.net 2010, I can barely see where the highlighted text is on y screen.
I want to change the background color of the highlighted text during find/replace etc.
In vs.net settings (font and colors), what is the item name that is for the highlighted text during find/replace?

Within Visual Studio 2010
menu: Tools->Options->Environment->Fonts and Colors
in the Selected Items window: choose "Selected Text" (it's the second from the top for me.)
You can then change the background color (on the right side of the dialog window.)

The correct item is inactive selected text.

See Dave's answer here:
visual studio find and replace highlight color
You have to install the Productivity Power Tools extension to change this setting. Then it will be under Find Highlight (Extension).
For me, the selected text setting does not affect the color of highlighting when doing a find/replace or a quick find.

You'll find that one at: Text Editor -> Selected Text. You're looking to set the Item Background property. Be aware, it's the same format used for any time text is selected, not just when find/replace is invoked -- that specific action doesn't have a specific format associated with it.

Related

How to disable triple click in Visual Studio

Is there a way, either built-in or by third-party extension, to disable triple-click from selecting the entire line while in a text editor? Either my mouse is too sensitive, or I'm inadvertently doing it, but more often than not, clicking a word, then copy / pasting it results in pasting of the entire line -- not my intention and very annoying. Ideally, it could be disabled (aka any click more than 1 just selects the word the cursor is over)
As already stated in the comments the problem is most likely that the word highlighting color is so similar to the color of selected text. So seems like we sometimes deselect a word instead of selecting it. And without a selection Ctrl-C copies the whole line. I had the same issue with JetBrains WebStorm. In Visual Studio for me it was ReSharper.
Changing the color helps. Tools -> Options -> Environment -> Fonts and Colors -> "ReSharper Usage of element under cursor". I made that darker such that selected text is clearly distinguishable.

Is there any extension to edit Visual Studio (2017/2019) theme colors easily

So, I was wondering if someone knows a program (VS extension) that you can for example, click on a button (aka option), than you select what element (in your code) you want to edit, pick a new color and save it...?
eg. you click on void, it says something like, selected Data Types, and a window to edit color. Or you click on a scroll bar, it says something like, selected scroll bar, and so one..
I was looking for it, but all I can find is basically like "Color picker", "Color theme editor for Visual Studio"...
Even if it's not extension, maybe program or web site...
Thanks in advance.
OK... So there is some way to make it easier, but it's still quite boring / hard / annoying task to do. (Works only with Visual Studio 2019)
Download Visual Studio Color Theme Designer.
You'll need some sort of capturing technique (eg. Snipping Tool - comes with Windows 10).
Launch your VS2019 and capture element/color you want to edit.
Extract the hex value of that color (eg. Paint 3D - comes with Windows 10).
Follow the instructions on VSCTD website (Marketplace) on creating theme and when you're done with opening solution, in "All elements" page, paste the value you got, and to make it easier to search, select "Sort by: Color".
Edit the color you think corresponds to desired element and check if that's the color that you were looking for.
Repeat until you're done.
This method is similar to using Color Theme Editor for Visual Studio 2019, but it gives you option to create automatically some theme and then you edit small parts of it (removes the trouble of editing huge amounts of colors)
You can edit color themes for types of keywords for a language in Visual Studio. For example, I've set mine so that interfaces are a light purple instead of the normal blue.
As far as I know, you can't set the colors for a specific object (like have variable 1 in orange, and variable 2 in gray), but you can set the font colors for code types (so structs are orange, and classes are gray).
You can read more about this here.

How to locate the formatting of a line in the Options/Fonts and Colors dialog?

I am using Resharper 6.x with VS2010. One of the features is that if you double click on a variable, it is highlighted and then other usages of the variable are highlighted, like so:
The background and foreground colors of the highlighted variable are too close to each other and I am trying to change it in the Options/Fonts and Colors dialog. It has a small Sample window (below). I've gone through the entire list of display items and can't find the one matching what I see in the coding window.
So 2 questions:
Which display item should I change to affect the back/fore colors of the highlighted variables?
Is there some tool that that will point me to the display item in question for any piece of code?
P.S. I am using the Ragnarok as my base color theme.
P.P.S. This may have nothing to do with Resharper. I turned it off and the coloring was still there. I guess my original question still stands - how to affect the colors of the highlighted variables.
Visual Studio 2010 Reference Highlighting
As you already presumed: The reference highlighting of current selection is not a ReSharper feature but a VS 2010 feature. So you need to look at VS items in Fonts and Colors dialog.
The right display item is Highlighted Reference.
ReSharper Reference Highlighting
ReSharper's equivalent is Highlight usages in file by pressing Shift+Alt+F11.
Then all read references have light blue background color (related display item in Fonts and Colors dialog is ReSharper Read Usage).
And all write references have rose background color (related display item in Fonts and Colors dialog is ReSharper Write Usage).
But the disadvantage of ReSharper's reference highlighting is that you need to press a shortcut. VS does the highlighting automatically.

VS 2010 - find text in XAML editor

In VS 2010, when searching for text in the XAML editor, the highlighted text is highlighted in the lightest gray colour when not in focus. Is it possible to change the background colour of the highlighted found item text? I've tried changing the VS theme but cannot find the property which would set this colour. In the screenshot below, the text "Text" is selected but you can barely see it and its driving me mad.
It's a bug that it doesn't show up as the active selection color when you perform a Find. I didn't find a workaround for it until after VS2010 shipped, sorry :( I'll find the Connect bug for you to vote up and then update this answer.
WORKAROUND:
After clicking CTRL + F, then click on the scroll bar in the XAML to regain focus on the XAML and you'll see the find text in the correct colour!

How to make selection color be "on top" when background color for any text element is set in Visual Studio 2010 editor

Faced problem while setting background color for any element in Visual Studio 2010 editor. Selection color doesn't override this background color. So then it's very inconvenient to work with selections in editor.
Case when only string literal is selected it's almost impossible to distinguish colors and see what part of string is selected.
Is there any possibility to fix the problem by changing some options? Or it's a Visual Studio bug?
This is new VS2010 behavior which unfortunately is deliberate. However, Noah Richards (from the editor team) has written a couple of extensions that help mitigate the new behavior:
The first is an extension that draws a border around the selection (the main feature of the extension is a gradient background, but the border is what makes it really useful for me).
Second is an extension to change Selection Foreground color.

Resources