Subscribe

Close

Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Highlight Current Line in Visual Studio 2010

I recently ran into a minor problem with my Visual Studio theme - the current line was highlighted and because of that I had quite a hard time reading the code and comments on the specific line.

Since I've been dealing with Visual Studio themes a bit lately, I knew how to change the theme colours, via Tools -> Options -> Environment -> Fonts and Colors. However - there are quite a lot alternatives to go through and it isn't always easy to find which alternative corresponds to what Visual Studio theme setting.

Then I found how you could change the appearance of the current line. This is how:

  1. Find the Current Line (extension) and Current Line Inactive (extension) rows.
  2. Change foreground and background.

This is how it could look:

Example of highlighted current line in Visual Studio

Now, most of the Visual Studio users might not have those rows under Fonts and Colors. This is because the Productivity Power Tools must be installed.

The Productivity Power Tools will not only give you more control over Visual Studio's current line, but much more. If you're a serious Visual Studio developer, install the tools!

(Thanks to Patrik Totero for providing me with the Visual Studio theme)

Comments

Thanks man, really helped me out!

Do you have any idea why my IDE reset my current line back to the original almost everytime i re-open the application? Thanks.

@Non Intanon:

Try resetting the Visual Studio settings and try again. Tools -> Import and Export Settings and then click Reset all settings.

thanx

Thank you! The highlighting was driving me crazy.

This might be nice if it didn't cause something in VS2010 to crash on every startup. And besides, all I really want is the ability to highlight the current line the cursor is on.

I think the answer is to cursor through the entire list under Fonts & Colors until you find the offending colour in the illustrated example window in the dialogue box.

Noboday has come up with this very simple answer, except me!

The option you are ripping your hair out with is called Matching Braces!

Set that to the desired colour (white?). I have a custom yellow cream colour for my Windowes settings, so I just added a similar (or as similar as I could get using the Visual Studio colour palette) cusomt colour and selected that.

There will obviously be a very slight difference to my original Windows yellow cream background colour setting, but it is now so extememly slight that you can not tell.

the vast majority of folks will just select "White"!

It really is that simple!

:-)

Just to clarify as I angrily wrote the last post too quickly without checking:

Tools -> Options -> Fonts & Colors ->

under "Display items:" find "Brace Matching (Highlight)"

That's the OFFENDING item.

I thank you

:-)

To the top