How to Customize Your Visual Studio

Visual studio

Visual Studio offers a lot of customization options, albeit somewhat buried in the menus. You can apply custom themes, change your style rules, and add custom fonts with ligatures designed for programming.

Configure a custom theme

Microsoft provides a few tools for this, but the newest and easiest to use is the Visual Studio Color Theme Designer. There is also the Color theme editor for older versions. Download and install the designer, then create a new VSTheme project:

Create a new VSTheme project

The cool part about the designer is that it lets you choose three basic colors for most applications. Visual Studio uses the same “Accent Color” system that the rest of Windows follows. If you go for a dark theme, choose a dark shade of gray that you like for the primary color, then an accent color, then a slightly lighter shade of gray for the secondary color, which is used for things like contours on the buttons.

Choose three basic colors for the application

The designer will generate additional colors based on the ones you entered and apply them to all the appropriate places. You can click “Apply” at the bottom to set it as the current theme and see how it looks.

However, if you wish to perform manual overrides, the following screen will display all of the individual settings:

Individual settings

Note that these do not include syntax highlighting. You will need to change these colors in the options menu.

Customizing syntax highlighting

The theme editor changes the colors of the Visual Studio interface, but the syntax highlighting settings are managed separately in the Options menu. Open the options in Tools> Options.

You may notice that the background color has not changed; it is because it is defined here. Under “Plain Text” you can change the background color.

The settings for actually changing what you want are very much buried near the bottom under “User Members”. Here you will find the colors to change methods, fields, parameters, classes, enumerations and pretty much everything.

A very useful thing to do is to set a different color for the settings. By default, they are light blue, which is the same color as the local variables. However, it is quite convenient to be able to differentiate between input arguments and locally defined variables. You can also set different colors for fields and properties, both of which are not colored by default.

The colors of the string literals are a bit higher, as are the color settings for the escape characters.

String literal colors

Beyond the basics, Visual Studio offers specific elements for certain language-specific settings. Therefore, if you see something that is still white, you can probably find it in the list.

Adding a custom font

By default, Visual Studio uses Consolas, which is monospace but a bit basic.

Of course, there are better fonts specifically designed for programming. A die the most popular is FiraCode, which adds custom ligatures to improve the appearance of common elements such as => and! =.

FiraCode font

You will need to install the desired font on your system, then select it from the “Fonts” menu of “Options”.

Install the font of your choice, then select it from the Fonts menu in the options

You may need to restart Visual Studio for it to take full effect.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.