Improvements to VS 2010 Text Selection

Improvements to VS 2010 Text Selection

Rate This
  • Comments 40

Brittany Behrens Brittany Behrens – Program Manager, Visual Studio Editor Team
Short Bio: I’m Brittany, a Program Manager on the Visual Studio Editor team.  Some of you may recognize me from Connect bugs or as the main voice of @VSEditor on Twitter, and I’m responsible for a variety of Editor features.  I love hearing from customers, so please let me know what you think!

 

As you may have noticed, text selection in Visual Studio 2010 is a bit more colorful than in previous versions.  In VS 2008 and earlier, selected text had a single foreground color and a single background color, usually white text on a navy blue background by default.  However, we have made substantial changes and improvements to the Visual Studio Editor for this release, including the new for VS 2010 ability to compose different display layers together. One of the many benefits of this is that we can combine the background color for selection with the foreground colors for a variety of other display items (plain text, keywords, comments, etc.) to show syntax coloring not only for unselected text but now for selected text as well, which we think makes selected code easier to understand.  Check out this side-by-side comparison to see the difference:

Selection in Visual Studio 2008 vs. Visual Studio 2010

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.  We’ve already updated this internally so that for VS 2010 RTM, the Item Foreground Color dropdown and the Sample preview box will show your default Plain Text foreground color instead of white, giving you a more accurate idea of what selected text will look like in the editor.

This is one of many improvements we were able to make by moving the editor to WPF – hope you enjoy it!

Brittany Behrens
Program Manager, Visual Studio Editor Team

Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post
  • Agree 100% with "Fredrik"

    Like others, nice idea in concept.

    If you have the default color scheme, maybe it's usable.

    I akin this to the office suites Ribbon modifications, it looks pretty but it's a complete productivity loss for no good reason. If I ever loose my toolbars and menu customization in visual studio and have to deal with that stupid interface I'll snap like a dried twig.

    I don't use the default color scheme, I prefere a black background based scheme because it allows much better highlight variations and is easier on my eyes.

    I do it also because a medical problem with my eyes and this is much easier to deal with.

    For basic Highlighting purposes you can see it (like just selecting text) but it's VERY weak.

    The main issue to me is when I do CTRL+F to find something, especially something short or small and the screen jumps to it. I simply cannot find the selected text on the screen. I have to active the window (click the title bar to not loose selection) then move the cursor down or up with the arrows to find it, then hopefully it's still close enough to the text it found that I can find it.

    At the least the default behaviour should be an option or the intensity of the contrast could be selectable. or possibly the option to add an additional outline around the selected region would be helpful to some degree.

    Going to try the add-in.

    Darren.

  • Any chance the background color could be added to the extension?

    If microsoft ever does fix this I would also suggest the following minor additions.

    -Add an "Apply" button for the "font and colors", everyone has experienced this painful and needless open, find option, change, close, reopen, find option, change, close, etc...

    -Add a "Filter" textbox to allow you to find something in the list.

    -And, for the love of god, make more of the windows re-sizeable in visual studio, even if not every window supports  the size change some of the worst ones could be made to strech. At the least just simply make them larger period, I mean I upgraded to a 1024 monitor about 12 years ago.

  • Sorry, background color IS supported, scratch the last comment. (not the additions though) Black bold Text with Yellow backgroudn works great on a dark colour scheme.

  • I want to be able to turn of this function. when I set the background color black, I can not recognize the selected area.

  • This is a useless feature (for me) which I should be able to turn off, but no, I have to live with a washed out selection color because the black background bleeds through it.  Doesn't anyone at MS test this stuff prior to release?

  • I don't like it!

    How dare you mess with MY color preferences by DISABLING foreground color selection!  It's not your choice!  If YOU don't want a different color for selected text, then YOU don't change it -- It's none of your business whether I change it!

    I'm reminded why I hate Microsoft almost daily!

  • In normal circumstance, this may be an interesting feature.

    However, for those who have applied color coding and have customized theme in their editor, this could introduce a serious problem in terms of color contrast, especially if the background is in dark color, e.g. black. This tends to degrade the readiness of the selected text, thus causes the workflow to suffer...  a definitely no go. So, it is necessary to allow users to choose between and new and the old style.

  • Even with the default colour schemes it doesn't work. I set my desktop theme to the default, but with "Silver" colouring rather than blue. I think this is a legitimate choice, since it is one of the three offered by default. However, the resulting "selected background" colour is indistinguishable from the normal background colour. I tried it with "Olive Green" as well and that was barely visible. The only one that works is the blue.

  • Visual Studio color management is a fckng joke.  If one does not know the fckng geeky name that was opted for an item, good luck finding it in all the different buckets massive stupid nerdy lists you provide.  Again, one has no idea what bucket you decided it should be in.  IS THERE NOT AN ALPHABETICAL  MASTER LIST of all the colored items?! with a cross reference to your PIECE OF SHITE EYE DAMAGING GEEKY STUPID PIGEON HOLE color select controls in the color management tools?!  ...that way one can look up the item in the master list on a full screen size tool like SIMPLE ASS notepad!!!   and then the cross reference will tell where in the *** it is in the VS color management interface!  fckng idiots!  The internet is splattered with a waste of questions on that subject and a massive pile of SHITE answers at THE COST OF HOURS OF SEARCHING and NO RESULTS!!!!!  DID YOUR YEARS OF COLLEGE MAKE YOU FORGET SIMPLE COMMON SENSE!...  or is this an orchestrated deal?!  Even the extensions they provide ARE SHITE!

  • Hello, in general it can sound as very good feature, but with my coloring scheme it is totally unusable. I use custom coloring for comments in the source code: dark green color (0, 64, 0) as background and Lime color (0, 255, 0) as foreground. The selection is completely invisible in such comments (e.g. when I want to just copy one comment or part of the comment from the source code). As the IDE allows to setup custom background colors for certain items, I can say it is a bug in this new selection and I have to use extension from Noah Richards. Unfortunately same behavior gets also to Visual Studio 2013 :-(

Page 3 of 3 (40 items) 123