Visual Studio Code 80 Character Line



Enabling Guidelines in Visual Studio

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Change 80 character line indicator to 120. Visual Studio 19. Visual Studio-Preferences-Source Code-Code Formatting-Text file. And set Desired file width there, but you can uncheck Use default settings and set it for just C# source code instead.

Lots of people wants to limit the number of character in one line of their code to be maximum of 80/100. This is done basically for readability. Believe me, code looks really readable if you follow the character limit for one line. Here is the way to have character guidelines in microsoft visual studio editor.
First, shut down Visual Studio if already started.Open Registry editor (start>run>regedit.exe). Browse to
[here 7.1 is used for visual studio 2003, look for 8.0 if you use vs 2005, or 9.0 for vs 2008]. Create a string value called
Set Guides to the following
Where x,y,z are the RGB values and n is the column number. You can have at most 13 guidelines. For example set the Guides value data to,
This will place a Red guideline at column numbers 80 and 100.
Visual studio code 80 character line artAnd now launch VS and open any text file.
Disabling Guidelines

Visual Studio Code Editor

Just delete the Guides keys you created above. Restart VS, and no more guidelines.

Visual Studio Code 80 Character Line Drawing

Easier Way:Visual
You can download following registry file and run which will do the same thing.
vs2003_guideline.reg
vs2005_guideline.reg
Studiovs2008_guideline.reg
vcs2008ExpressEdition_guideline.reg
If you find this post useful, you might also like [this] and [this] post by me as well.
Thanks