Here's how to change Codelens Indicator style in Visual Studio

Here's how to change Codelens Indicator style in Visual Studio


Code lens is a feature, first introduced in Visual Studio 2013, which helps you to understand important aspects about your code without leaving your favorite editor. It tells us the code changes in a fantastic way, within the code editor.

 

In this small tips & tricks post on Visual Studio, we will learn how to change the font and color settings of Code Lens.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

Using 'Code Lens', you will have a deep focus on your code. It will tell you about reference history, changes in your code, author of the code, unit test status, bugs/tasks associated with an item and commit/change history in a trackable manner.

 

You can change the style of the Code Lens information from Visual Studio 'Options', that includes fonts, size, color etc. In general, the default font set to it is 'Calibri' of Size: 8 and decorated in light gray. When you hover on it, the color changes to bluish as shown below:

 

Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

To change the font, color and size of Code Lens, open the Visual Studio 'Options' from IDE menu 'Tools | Option' and then navigate to 'Fonts and Colors'. The following dialog will popup in the screen. To change the code lens formatting, select 'CodeLens' from the dropdown labeled 'Show settings for'.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

You can set the Font family and the size. You can also set it's color. There are five categories of color indicators available: Indicator Text, Indicator Text (Hovered), Indicator Text (Selected), Indicator Text (Disabled) and Indicator Separator.

 

Choose the one that you want to change and from the 'Item foreground' dropdown, select the appropriate color. You can also click the 'Custom...' button to select a custom color, not part of the dropdown list.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

Once done, click 'OK' button to apply the changes. It will apply immediately, but in few case you may have to restart Visual Studio for the settings to take effect.

 

Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

This is applicable to both Visual Studio 2013, Visual Studio 2015 and Visual Studio 2017. Was the post helpful? Do let us know below in the comment section.

 

 



If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

1 comments

  1. Thanks for the information you brought to us. They are very interesting and new. Look forward to reading more useful and new articles from you!

    ReplyDelete

 
© 2008-2017 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top