Home > windows > Add Line Length Marker in Visual Studio

Add Line Length Marker in Visual Studio

February 17th, 2009

To add a guiding verical line for the length of the lines in Visual Studio do as follows:

  1. Open registry editor
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\*.0\Text Editor (* depends on your version of VS, 8.0 = VS 2005 and 9.0 = VS 2008)
  3. On the right pane add a new string value and name it "Guides"
  4. Double click on the newly created string value "Guides" and put the following as its value "RGB(255, 20, 147) 80" including the apostrophes. The string specifies two properties – RGB(255, 20, 147) – the color of the line and 80 the line length. You can adjust them to suite your needs.
  5. Close registry editor and restart the Visual Studio.

 

windows , , ,

  1. rie819
    June 12th, 2009 at 16:03 | #1

    Brilliant! Thanks.

  2. codeDeamon
    November 23rd, 2009 at 12:15 | #2

    Great work. But there is a problem with this method. The red marker gets added to the output window and command window also. If this can be avoided, it will be great.

  3. Dunky Donuts
    May 25th, 2010 at 20:15 | #3

    Your trick worked very well with VS2008. However, it does not work for VS2010. Do you have any idea how one can do the same thing VS2010?

  4. June 13th, 2010 at 13:20 | #4

    I don’t have VS 2010 installed.

  1. No trackbacks yet.