How to put a vertical line after a certain amount of chars in VS2008 IDE

15 01 2009

description6

 

 

We are following different coding standards while programming in different languages. That is very effective to improve the readability of the code. Sometimes we need to fix 80th column as the bounday in the Visual Studio text editor. That means it’s better to draw a vertical line after a certain amount of characters in the Text Editor.

vs-2008-vertical-line 

 howcanidoit14 

 

 

First of all open the RegEdit and locate the following. 

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor and create a string called Guides with the value RGB(255,0,0) 80 to have a red vertical line at the column 80 in the VS text editor. You can add multiple lines in your text editor by adding the string value RGB(255, 0, 0) 80, RGB(0,255, 0) 49

Restart Visual Studio after you add these values for the changes to take effect. 

 

mynote5

 

 

I think it is working fine in VS2003 and VS2005 also. If you are using that version please try with the following registry path.

VS2005 : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor

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