27

I have been able to change the background color after installing the updates by changing

Tool / Options / Environment / Text Editor / Highlight Current Line (Active)

Is there a way to change the highlights border width or color?

I like having the highlight so I would prefer not to just disable it. But it would be nice to either eliminate the border, make it smaller or change the color.

5 Answers 5

28

You can make the border go away by going to

Tools > Options... > Environment > Fonts and Colors > Show settings for: Text Editor > Display items: Highlight Current Line (Active) / (Inactive)

In order to change border color you should change the setting "Item foreground" for both of them. You can choose any background color also, but there seems to be no way to change the width.

2
  • 1
    +1 Setting the foreground and background color to be the same made the line "normal width" for me
    – LostSalad
    Nov 21, 2013 at 14:53
  • VS 2017: Tools > Options > Environment > Fonts and Colors > Highlight Current Line
    – Andrew
    Apr 28, 2019 at 12:52
26

Seems to be this behavior was fixed since original answer was written. So answer needs update and here it is:

https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3012415-remove-the-light-border-around-highlight-current

You can remove the border by matching the Background color of the
Highlight Current Line (Active) setting in Fonts and Colors to the
Foreground color. This is a simple customization.

Go to Tools > Options > Environment > Fonts and Colors and look there for Highlight Current line, active and inactive. To remove border as described by VS team by link and cite above.

enter image description here

6
  • 1
    Who said buy?! I've said that there are a lot of free extensions for that, and personally I use extension from DevExpress.
    – Regfor
    Jun 30, 2012 at 17:43
  • 2
    Please don't just link to threads on forums. The answer on that thread is now empty. Please include the relevant bits in your answers and use the link for reference. Jul 19, 2013 at 12:14
  • Despite this being the accepted answer it is not true. You CAN change the color, which greatly affects the visual width. What is the protocol for changing the accepted answer?
    – James
    May 25, 2014 at 22:49
  • @James This answer is pretty old as you see. And behavior was fixed since that time. I've updated answer. Accepted answer can change only author of question, because such solution worked for him at that time he accepted it.
    – Regfor
    May 26, 2014 at 11:06
  • Can you please have a look here . It seems related but still didn't find an answer.
    – Royi Namir
    Oct 1, 2015 at 16:30
11

From MSDN Thread courtesy of Cathy Sullivan Visual Studio Program Manager

Go to Fonts and Colors in Tools > Options > Environment > Fonts and Colors. Make sure "Show Settings For" is set to "Text Editor" and find the "Highlight Current Line (Active)" item in the "Display Items" list. Match the foreground color to the background color for that item and you'll notice the lighter border around the Highlight Current Line "disappears."

1
  • 1
    The exact path for this option is Tools -> Options -> Environment -> Fonts and Colors -> Display items: Highlight Current Line (Active). Thanks.
    – Aremyst
    Jan 23, 2013 at 18:28
3

Try these settings out...

Tools (menu) > Options
Environment (tab) > General

Set Color Theme to Dark.

Environment (tab) > Fonts and Colors
Display Items > 'Highlight Current Line (Active)' (list item)

Set 'Item Foreground' to 'Default'
Set 'Item Background' to 'Automatic'

The border around the current line should no longer feel oppressively thick '-)

1

I like to use a black background for code, so I changed the line highlight colour to very dark grey [via TOOLS > Options... > Environment > Fonts and Colors > Display Items: > Highlight Current Line (Active)] so that it's not as visible against the background. Helpfully, although the border is too thick, text is actually rendered over the top of the border, which is nice.

Definitely, though, a thinner line and the ability to change the colour of the whole line, not just the border, would be welcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.