locked
VS2010: How to turn off block highlighting RRS feed

  • Question

  • Whenever dragging the cursor from the text editor to a panel on the left (e.g., Solution Explorer, Class Viewer, etc), the text editor will flicker. This occurs when the mouse cursor passes over the "selection tree" in the editor that allows you to expand/collapse section of code. When the cursor is in this region, the selection block is automatically highlighted. This new feature is driving me nuts; is there any way to disable this feature or at least a way to configure a time delay so that the cursor has to hover over the spot for a period of time before the code is highlighted?
    Wednesday, April 14, 2010 12:39 PM

Answers

  • Although there's no option, checkbox, etc. for "turn off this highlight," you can effectively disable it by going to Tools->Options->Environment->Fonts and Colors and setting the Collapsible Region background color to your editor background color.  If you use a custom background color, especially something dark, you might also find the highlight less distracting if you change its background color to something that fits better with your color scheme (e.g. the default light gray is very bright on black backgrounds, so a dark gray highlight tends to look much better in that case).  The outlining highlight will also turn off in RC and RTM if you uncheck the "Enable rich client visual experience" box in Tools->Options->Environment->General, though that will disable more than just this particular mini-feature.

    Could you change the color and let us know whether it helps?  Thanks for trying VS 2010 and sending your feedback!

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    • Proposed as answer by Brittany Behrens Wednesday, April 14, 2010 11:40 PM
    • Marked as answer by NTDeveloper Thursday, April 15, 2010 11:20 AM
    Wednesday, April 14, 2010 11:40 PM

All replies

  • Although there's no option, checkbox, etc. for "turn off this highlight," you can effectively disable it by going to Tools->Options->Environment->Fonts and Colors and setting the Collapsible Region background color to your editor background color.  If you use a custom background color, especially something dark, you might also find the highlight less distracting if you change its background color to something that fits better with your color scheme (e.g. the default light gray is very bright on black backgrounds, so a dark gray highlight tends to look much better in that case).  The outlining highlight will also turn off in RC and RTM if you uncheck the "Enable rich client visual experience" box in Tools->Options->Environment->General, though that will disable more than just this particular mini-feature.

    Could you change the color and let us know whether it helps?  Thanks for trying VS 2010 and sending your feedback!

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    • Proposed as answer by Brittany Behrens Wednesday, April 14, 2010 11:40 PM
    • Marked as answer by NTDeveloper Thursday, April 15, 2010 11:20 AM
    Wednesday, April 14, 2010 11:40 PM
  • Thanks; that did the trick. I thought about that approach as well but didn't know the name of the color property to set.
    Thursday, April 15, 2010 11:20 AM
  • I have VS2010 Ultimate. All I do is highlight some text and then the flickering starts. It is very irritating. Once the flicker starts the whole screen is frozen. The problem is Search/delete or any other operation involving highlighting becomes very difficult.  I did try 

    Tools->Options->Environment->Fonts and Colors and setting the Collapsible Region background color to your editor background color. 

     

    That did not help. Please advice

     

    thanks

    ananda

    Tuesday, April 20, 2010 8:36 PM
  • Hi Ananda,

    Could you clarify what you mean by "highlight some text" - are you making a selection?  Once it starts, does the flickering happen on its own or when you interact with VS (type, move the mouse, etc.)?  The previous posts in this thread are about a piece of UI that appears when moving the mouse over the outlining margin at the left of the editor, and it sounds like your issue is probably unrelated to that.

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, April 20, 2010 8:43 PM
  • Thanks for the quick reply. Sorry I should have been more clear. Yes I meant select. I select by depressing the lest mouse button and drag it horizontally. The flickering starts at the very first letter selection. It is instantaneous and automatic. It flickers for ever until I hit "esc" key. Once it starts flickering it takes about 5 CTRL-C or CTRL-X for any action to happen. The first 4 of them are ignored. It is like the screen is frozen. 

    thanks

    ananda

     

    Tuesday, April 20, 2010 9:51 PM
  • I might add that this flickering is seen on a W2K3 Enterprise x64 SP2 system and not seen in W2K8 x64 R2 Enterprise 
    Tuesday, April 20, 2010 10:53 PM
  • Hi Ananda - Thanks for the update.  This isn't something we've seen before.  Could you file a Connect bug with as much information as you have so we can track the problem and route it to the right team for investigation?  It would also be very helpful if you could record a short video capture of the problem and attach it to the bug.  If you don't already have software that can do this, a free Microsoft program called Community Clips makes screen captures fairly quick and easy.

    Thanks again,
    Brittany

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, April 27, 2010 5:58 AM
  • Hi Brittany,

     

    I did capture the video clip. But the bug submitting site is very bad. It did not allow me to attach file even after completing the survey which I was forced to take even before submitting the bug. That was very funny!! :-) So I have it don't know how I can give it to MSFT?

     

    my email address is

    agvardha@gmail.com

     

    Send me an email to that address and I can send you the video clip. The flicker is very irritating and my work has been greatly impacted.

     

    thanks for the help and advice

    regards

    ananda vardhana

     

    Thursday, April 29, 2010 10:14 PM
  • This was just a bad editor design decision, IMHO.  One of most frequent things that I do as a developer is move my mouse to the left edge of the editor window to do whole line selection.  In Visual Studio 2008, the vertical line that signifies an outline node was just there for decoration, so if I overshot the left margin a bit, no worries, the cursor changed to a right-ward pointing arrow and I could do line selection.  With Visual Studio 2010, you have greedily taken away about an 8-pixel wide swath surrounding that outline node line and decided that should be a hotspot for, what, collapsing the outline node?  Really?  So now I have a much smaller target I have to hit for doing whole line selection.  Really bad tradeoff.  My only real option is to turn outlining completely off, which I'd rather *not* do, since it's a useful feature, but not useful enough to overcome this unfortunate UI design decision.

    At least give me an option to make it work like it did in VS 2008.

    Eric


    Eric
    Wednesday, May 5, 2010 6:04 PM
  • @Eric:  The 8-pixel area in the outlining margin is not purely decorative.  Rather, it allows you to collapse a region not just from its first line, as in VS 2008 and prior, but from anywhere in the region; this was actually a frequent customer request.  That said, we unfortunately can't please every user with every feature, and I'm sorry to hear you don't like it.  There should still be enough space for line selection, especially if you have line numbers on and/or the selection margin (Tools->Options->Text Editor->General->Selection margin), which is intended for exactly this purpose, enabled - is that not the case for you?

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, May 11, 2010 2:47 AM
  • For anyone following this thread, Ananda's issue was resolved in e-mail.  It was caused by a Beta2 extension being loaded on VS 2010 RTM.  Disabling and/or uninstalling the extension fixed the problem.

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, May 11, 2010 2:50 AM
  • In playing around with this, I think partly the issue is that in VS 2008, the vertical decoration line for outlining was *inside* the selection margin, so I could aim for that when I wanted to do line selection.  In VS 2010, there is now an "outline margin" next to the selection margin, and the outline margin is where the vertical line for outlining lives, and of course you can't do line selection when the mouse is over that line anymore.  So there may be just as many pixels in the left margin that are dedicated to line selection as before, but with this outline margin that you can't turn off, there are a bunch more pixels where you *can't* do line selection.  So when you move your mouse to that area, you have a greater chance of missing the line selection portion.

    Question:  Why doesn't what I'm calling the "outline margin" go away when you turn outlining off?  After you turn outlining off, you still have 6 or so pixels of wasted space in the left margin.

    Turning line numbers on is a pretty good workaround for me, though; thanks for suggesting it.  It gives me a large target for line selection.  It is a lot of space to dedicate to line selection, though, so I hope you'll consider removing the outline margin if outlining is turned off; I think if that were gone, the selection margin would be enough.


    Eric
    Tuesday, May 11, 2010 2:17 PM
  • This is also driving me crazy!!!!! It make using a mouse drag to select a line difficult.

     

    I like the highlight concept.  However, if I try to perform a mouse selection from the left of the screen the highlighting takes focus away from the mouse.  This could probably be solved if the highlight didn't take away the mouse focus.  It seems both behaviors could coexist.  

    Tuesday, May 11, 2010 7:47 PM
  • Dear MS,

    Personally I believe this is an annoying feature. However, I can be a grump so I asked everyone I know that has upgraded to VS2010. Out of 20+ people, nobody said that they would use this given the choice. May I ask how your usability testing was performed because I honestly don't see the benefit.

    Changing the highlight colour to match the background colour does not fully solve the problem because the vertical live and collapsible nodes near the left margin are still highlighted. 

    In the interest of my ailing sanity could you please consider a proper disable option for this feature?

    many thanks 

     

     

     

     

     

     

     

     

     

     

     

    Tuesday, May 25, 2010 10:23 PM
  • I can't go into too much detail on the usability study because of confidentiality and non-disclosure requirements.  However, I will reiterate that this was implemented in response to a common customer request for the ability to collapse regions from anywhere in the region (instead of just the first line of the region).  The specifics of the UI went through several rounds of design and testing.  Also note that people who dislike this behavior are far more likely to post on a forum or file a bug than people who do like it.  That certainly doesn't prove anything about relative numbers of people who like vs. dislike this feature; it's just meant as a reminder that people who do find the highlight useful probably won't look for, find, or post on this forum :-).

    All of that said, we will consider adding a more explicit way to disable this highlight, though I can't promise whether or when such an option might be added.  In response to Wibbo's point about the vertical line in the left margin still being highlighted:  that area respects the Foreground color for Collapsible Region in Fonts and Colors.  You can disable all outlining-related highlights by changing both the Foreground and Background colors to match your editor background.  Again, not 100% ideal, but it should work for VS 2010 RTM.

    Thanks everyone for your continued feedback,

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Wednesday, May 26, 2010 12:45 AM
  • Hey, Brittany,

    What I'd like to see you do that I believe would solve everybody's concern here is add a check box for "Outline Margin" to the list of display elements that you can turn on and off under Text Editor > General options.  If we could get rid of that margin like we can the other margins to the left of the code, I think everyone could be happy.  People who like outlining could have that margin turned on and click there to collapse blocks.  People who like outlining but not block highlighting could use the workaround we already have of making the highlight color the same as background.

    The complication might be that outlining can be turned on/off per language but the Text Editor > General options apply to all languages.  So another way to accomplish the same thing would be to automatically not display the outline margin if outlining is turned off for the language of the file being edited.

    I think the changes you've made to outlining are positive changes for people who use outlining, but you just haven't allowed those of use who don't use outlining to get all the new outlining affordances out of our way.

    Thanks,


    Eric
    Wednesday, May 26, 2010 12:56 PM
  • @Eric:  Sorry, I didn't realize some folks on this thread wanted to disable outlining altogether; my mistake.  There is a pretty simple way to do this.  If you want to turn off outlining for a particular file, you can just right-click anywhere in the editor and go to Outlining->Stop Outlining.  If you always want outlining off for a given language, that's possible too, though the exact location of the option does vary by language (not ideal, I know; your suggestion to have an option for this under Text Editor->General would make it easier).  Also note that for some languages you'll have to close and re-open files after you change an outlining option (restarting VS would also work), but after that every file you open for that language should have outlining disabled.
    - For VB:  Text Editor->Basic->VB Specific->Enable outlining mode.
    - For C#:  Text Editor->C#->Advanced->Enter outlining mode when files open.
    - For C or C++:  Text Editor->C/C++->Formatting->Enable Outlining (change it to False).
    - Most other languages also have similar options.  I won't list every language's option here, but if you're looking for this in a particular language I didn't include above, just let me know and I'll do my best to help.

    Does this help?

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Wednesday, May 26, 2010 6:40 PM
  • @Brittany,

    Right, I have long since figured out how to turn outlining off, but that info might be useful for others.  As I keep pointing out like a broken record, the annoyance is that even turning outlining completely off does not get rid of the outline margin.  It stays right there, a 6-pixel wide piece of uselessness.

    Eric


    Eric
    Wednesday, May 26, 2010 6:56 PM
  • @Brittany,

    I agree that it would really help to have a way to completely disable/hide the outlining margin. It sounds like there is no official way to do this in VS 2010, but if you know of a workaround (perhaps a registry tweak or an extension that does this), it would be most welcome. Thanks for taking the time to discuss this with us and listen to our feedback.

    - Charlie

    Monday, June 14, 2010 4:20 PM
  • @Eric:  True.  I've filed a suggestion to make disabling outlining actually turn off the *margin*, not just the margin's contents.  It's too soon to know whether we'll make a change for v.next, but there is now a bug tracking this for the next release.

    @Charlie:  I'm not aware of such a tweak currently available for VS 2010 (registry, extension, etc.), but I just whipped up a quick extension and have it working on my machine.  It has to go through a couple of process steps before I publish it, but stay tuned :-).  I'll post a link hopefully later this week for you guys to try.

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, June 15, 2010 12:43 AM
  • Quick update:  The publication process is taking longer than I originally thought.  I'm still working on getting the extension that completely hides the outlining margin posted to the VS Gallery, though, and I'll reply to this thread as soon as that happens.

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, June 29, 2010 2:44 AM
  • @Brittany,

    Thanks for taking the time to address this issue.  I also find this feature more annoying than useful, but as a UI designer I can appreciate the difficulty in trying to please everyone.  The solution you suggested of making the collapsible region color match the editor background color is an acceptable temporary fix, but here are a couple of suggestions for making the feature more agreeable for all in the future:

    - Swap the selection margin and the outline margin.  As someone who is constantly using the selection margin, I find myself by default clicking to the right of the outline margin.  This will require some usability testing, but it doesn't make sense to me to have to travel all the way over the outline margin to get to the selection margin.

    - As an alternative to swapping the two margins, combine them.  This would be my preferred option.  It would have the same visual appearance as VS 2008, but a single click in the margin would select the line and a double click would collapse the region.

    - Fix the color options for the collapsible region.  As you mentioned above, the collapsible region counterintuitively respects the foreground color rather than the background color.  Also, there doesn't seem to be a way to change the color of the line itself (which still changes color when I move over it).  A good solution would be to have two different color settings: Collapsible Region and Collapsible Region (Highlight).  For both settings, the background color should affect the margin color and the foreground color should affect the line color.

    Thanks,

    Jonathan

    Tuesday, August 17, 2010 7:41 PM
  • Any news on extension that completely hides the outlining margin?

    Paul.

    Monday, September 6, 2010 1:20 AM
  • Hi Brittany,

     

    I'm also interested in the extension completely removing the outlining margin. How is the process going?

    (it's *really* annoying to select text if you're coming from vs2005)

     

     

    Wednesday, November 17, 2010 9:06 AM
  • I have turned on show line numbers, even though I don't use them very much, it gives a much larger area to do a line selection with. And then you don't have to worry about hitting the outlining area.
    Monday, December 13, 2010 5:37 AM
  • Anything new on that extension? Its been a couple of months.
    I would really love to get rid of that margin.

    Sunday, January 30, 2011 12:09 PM
  • Hello. Just wanted to say that Brittany's initial suggestion of changing the background color of the Collapsible Region works pretty well for me and I like it that I still see a highlight on the 8 pixels margin, showing me the region, but without that annoying full-code background changing ::- ).

    At least in my VS 2010 SP1 things look great.

    Saturday, May 7, 2011 10:47 PM

  • I started using Visual C++ 2010 Express a couple weeks ago after using 2008 for several years. The flicker mentioned in the first post was starting to become really annoying, but I figured it was one of those Microsoft design features you can't disable (e.g. ClearType in IE9) in their hopes to convert you.

    I thought I'd search for a fix anyways and was pleasantly surprised to find the answer here on a Microsoft web page. What's more, Brittany is responsive to user comments and sounds desirous to help! I nominate her to be promoted several levels and institute a culture change at Microsoft.

     

    Wednesday, September 7, 2011 9:06 PM