4

I like to restrict to 80 characters in each line in my code for readability. I would like to know if there is any scale to show the line length in visual studio 2012 like how it shows the line number (I mean a horizontal scale?)

John Saunders
  • 160,644
  • 26
  • 247
  • 397
user2529495
  • 113
  • 2
  • 7

2 Answers2

4

The Visual Studio Productivity Power Pack has a column guide setting which will draw a vertical column guide in the editor.

Column Guides

Draws a vertical line in the code editor to remind developers that their full line of code or comments may not fit one a single screen. Simply place the cursor at the appropriate column and select Add Guideline from the context menu

shf301
  • 31,086
  • 2
  • 52
  • 86
1

Visual Studio 9.0 used to have a way to do this:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor]
"Guides"="RGB(200, 200, 200) 80"

Taken from: https://gist.github.com/rsneekes/843732

I seem to recall trying to get it to work when I upgraded to VS 2010, but it got to be more trouble than it was worth. I wonder why (or if) they removed it.

Also: Possible duplicate of: Adding a guideline to the editor in Visual Studio

Of course, I find nothing working without some extension past 2008 for myself.

Community
  • 1
  • 1