How to change border width and color of "highlight current line" in Visual Studio 11
Asked Answered
W

5

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.

Winters answered 21/4, 2012 at 19:47 Comment(0)
N
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

Nerland answered 24/4, 2012 at 13:5 Comment(6)
Who said buy?! I've said that there are a lot of free extensions for that, and personally I use extension from DevExpress.Nerland
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.Downpipe
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?Meridithmeriel
@Meridithmeriel 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.Nerland
Can you please have a look here . It seems related but still didn't find an answer.Augie
This removes the border but what if I just want to reduce the width/thickness?Rod
B
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.

Bury answered 10/9, 2012 at 9:49 Comment(2)
+1 Setting the foreground and background color to be the same made the line "normal width" for meFromenty
VS 2017: Tools > Options > Environment > Fonts and Colors > Highlight Current LineChryselephantine
N
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

Nerland answered 24/4, 2012 at 13:5 Comment(6)
Who said buy?! I've said that there are a lot of free extensions for that, and personally I use extension from DevExpress.Nerland
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.Downpipe
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?Meridithmeriel
@Meridithmeriel 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.Nerland
Can you please have a look here . It seems related but still didn't find an answer.Augie
This removes the border but what if I just want to reduce the width/thickness?Rod
C
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."

Cathepsin answered 10/9, 2012 at 15:7 Comment(1)
The exact path for this option is Tools -> Options -> Environment -> Fonts and Colors -> Display items: Highlight Current Line (Active). Thanks.Kayekayla
M
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 '-)

Meridithmeriel answered 25/5, 2014 at 22:40 Comment(0)
O
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.

Orsola answered 4/12, 2013 at 14:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.