Show vertical rule in VisualStudio.NET 2003 and Beta 2 after x chars

Written on August 22, 2005

If you want to limit your code lines in VisualStudio.NET 2003 or 2005 Beta 2 to let's say a length of 80 chars, there's a little help by "hacking" your registry:

You can activate a colored vertical line in the VisualStudio.NET editor that tells you where char number 80 is.

Touch your registry at your own risk! Back it up before modifying it!

Start RegEdit and open the following key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor

Create a new string named "Guides" and assign the value "RGB(128,0,0) 80".

This will display a vertical rule after 80 characters.

It's also possible to create more than one rule, for example "RGB(128,0,0) 80, 95".