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

Advertisements

Actions

Information

2 responses

15 01 2009
cppkid

You can use the same feature in Visual AssistX (an add on for Visual Studio).
Go to Visual AssitX Options -> Advanced ->Display -> Display indicator after column.

http://cppkid.wordpress.com

15 01 2009
cpptips

Thank u very much for this valuable information. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: