Visual Studio Customize Code Editor


You can personalize Visual Studio in various ways to best support your development style and requirements. Many of your settings can also be shared with another developer or you can also use the same settings on another device.

  • You can also reset to Visual Studio default settings by using the Import and Export Settings... wizard command on the Tools menu.
  • In the Import and Export Settings... wizard, you can change selected general settings or language and project-specific settings.

But there are also few customizations which developer can make to increase their productivity and write code with ease on that particular Visual Studio instance or particular machine, such as, Full-Screen Mode, Split window, etc.

Enable virtual space mode

In Virtual Space mode, spaces are inserted at the end of each line of code. You can choose this option to position comments at a consistent point next to your code.

You can enable/disable this option from Tools > Options > Text Editor > All Languages > General, and under Settings, select Enable Virtual Space.

Split an Editor Window

An instance of an editor window can be split into two separate views for easier editing. Click within the editor window to give it focus.

Select the Window > Split menu option and you will see the editing area divides into two panes separated by a splitter bar.

  • You can scroll these panes independently to view and edit different parts of the active document at the same time.
  • Any changes made in one pane are reflected in the other.
  • To make one pane larger than the other, drag the splitter bar upward or downward.
  • To return to a single-pane view, select the Window > Remove Split menu option.

Change Fonts and Colors

You can change the default Font and Size, and change the foreground and background colors for various text Display items in the code editor.

  • The Font and Size settings are global for all text elements in all Visual Studio editors.
  • The names of fixed-width fonts are listed in bold.
  • Item foreground, Item background, and Bold options can be set for each type of text element. For example, if you change colors and select Bold for Comment and Bookmarks, other types of text elements will be unaffected.

You can change the settings from the Tools > Options > Environment > Fonts and Colors.

Let's change the size to 12 and also change the color of the Comment display item and make it bold as shown below.

Now you will see the changes in the editor.

You can export all your setting from Tools > Import and Export Settings... menu.

Click the Next button and will see all the settings which you can export.

You can exclude some settings which you don't want exported by unchecking the check-boxes of these particular settings and click the Next button once you are done.

Specify the name for your file and click the Finish button.

You will see the Export Complete message when the file is successfully created.

There are many more settings that can be customized which are mentioned in the official documentation in Customize the editor section https://docs.microsoft.com/en-us/visualstudio/ide/writing-code-in-the-code-and-text-editor.