Wednesday, September 08, 2010
 

Search
Latest entries in the Euricom Team blog
Sep 4

Written by: Euricom
9/4/2009 2:38 PM 

A lot of times you see developers writing code that, in order to read it, you have to scroll half an hour to the right because one line of code contains like a thousand characters. To (try to) avoid this, you can add a registry setting that displays a line in a specific color and at a specific position to indicate a marker for the desired maximum line length in the Visual Studio Text Editor.

To enable this marker, close visual studio and open the registry editor (regedit.exe). Navigate to the following key:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor

Add a new string value named "Guides" to the key with the following value:

RGB(128,128,128) 80

The RGB determines the color of the marker (light gray in this case), the value 80 determines the column where the marker should be shown. Note that you can have up to 13 guides by separating them with commas.
The result is a marker in the visual studio text editor like this:

Visual Studio text editor guide

By Kurt Torfs, .Net Solutions Architect

Tags:

1 comment(s) so far...

Re: How To: Add a line guide to Visual Studio

Finally! This should be mandatory for al those 'let's put all parameters on 1 line'-developers.

Think vertical!
Newlines for everyone!

By Hans De Smedt on   9/29/2009 10:40 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
Copyright (c) 2010 Euricom ::Terms Of Use::Privacy Statement