In Visual Studio 2010, if you hover your mouse over the little [-] minus sign, it will highlight that block of code for you. My question is, is there a way for this block t
Resharper has some options for this, one will let you outline the braces you are currently in and I think the other lets you highlight the current line
ReSharper is nice, but if you're also looking for something for all kinds of languages, there is Visual Assist X, which also does nice highlighting.
It, too, has the option to highlight matching braces in your current block:
Then you have a line highlighter, either as a simple frame:
Or as a good looking background:
Sadly, there is no option in it to enable a real "block" highlighting like hovering over the [-]
button does. :| I also looked for, but didn't find such an option within the Visual Studio options.
Highlight everything you want your eyes to focus on and press ctrl+H.
Or, highlight everything you DON"T want and right click "Outlining" then select "Hide Selection." The short cut for that is ctrl+M
This can be done using bookmarks. The out-of-the-box configuration of bookmarks does not highlight, however this can be changed easily:
Go to Tools – Options – Environment – Fonts and Colors. Under Display Items, select Bookmark. Now change the background color to something, like red. Then go to Tools – Options – Text Editor – General and uncheck Indicator Margin.
PS Bookmarks can be found in the Text Editor toolbar PS2: To quickly set bookmarks use Ctrl+k+k, but beware of Ctrl+k+l which will wipe out all your bookmarks, it happened to me once!
Adapted from: http://blogs.msdn.com/b/saraford/archive/2007/09/05/did-you-know-how-to-change-a-bookmark-color.aspx