Showing a vertical rule in Visual Studio

If you are a .NET, Java or Delphi developer, make sure to take a look at our advanced logging tool SmartInspect.

If you want Visual Studio to draw a vertical rule in the text editor just like Delphi does, then you’ve come to the right place. According to this posting, you can get one by simply adding a new value to the following registry key:

HKCU\\Software\\Microsoft\\VisualStudio\\7.1\\Text Editor

The value to add is a string called “Guides”. Now, just assign a value like “RGB(128,0,0) 79″, restart Visual Studio and you have a vertical line after 80 characters (the value in the registry is 0-based). I tried it and it works as expected:

Showing a vertical rule in Visual Studio
Showing a vertical rule in Visual Studio (larger image)

You can even change the color of this rule by adjusting the RGB values or display more than one rule by separating them with commas: “RGB(128,0,0) 79, 99″. I use it with Visual Studio 2003 but Visual Studio 2005 Beta 2 seems to support it, too. In order to get it working with Visual Studio 2005, just change the version in the registry key to 8.0.

This entry was posted in Development. Bookmark the permalink. Both comments and trackbacks are currently closed.

2 Comments

  1. Bruce McGee
    Posted August 22, 2005 at 6:51 pm | Permalink

    Cool. Also seems to work in the VS2005 beta. Just change 7.1 to 8.0.

  2. Posted August 23, 2005 at 12:50 am | Permalink

    Yep, also works in the beta versions of Visual Studio 2005. Hopefully this feature makes it into the final version, too.