Is there a way to highlight the currently active code block in Visual Studio 2010?

后端 未结 4 459
陌清茗
陌清茗 2021-01-04 22:12

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

4条回答
  •  隐瞒了意图╮
    2021-01-04 22:52

    This can be done using bookmarks. The out-of-the-box configuration of bookmarks does not highlight, however this can be changed easily:

    bookmark without highlight

    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.

    bookmark with highlight

    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

提交回复
热议问题