40

Possible Duplicate:
Adding a guideline to the editor in Visual Studio

Is there a way to display a vertical line at 80 or 100 characters in the editor of Visual Studio?

I know it is possible in Eclipse and coudn't find it in VS.

This vertical marker line help seeing when to break a line of code for people that do not go over 80 or 100 characters per line of code.

I am a Java developer that currently develop in C#, my habbit may not correspond to C# style guide.

Thanks in advance.

Community
  • 1
  • 1
Pierre-Antoine
  • 7,939
  • 6
  • 28
  • 36
  • Do you really need a line? I don't like big lines of codes and they clutter your code but in general the size of your monitor should be enough to see when your code is too big. I agree with the idea of a line to help if you work in a team that have different size of monitors. – Adauto Mar 27 '12 at 17:34
  • 7
    The line help to always keep the same line size. – Pierre-Antoine Mar 27 '12 at 18:02

1 Answers1

39

If you are using VS 2010, you can install the Productivity Power Tools extension, which provides this functionality.

The feature you're looking for is called "Column Guides". The PPT website states:

Simply place the cursor at the appropriate column and select Add Guideline from the context menu

Cristian Lupascu
  • 39,078
  • 16
  • 100
  • 137
  • 1
    Thanks. That Was indeed what I was looking for. It is however surprising that this is not part of visual studio by default, especially since visual studio is soo big. – Pierre-Antoine Mar 27 '12 at 17:59
  • 2
    @user1162647 I just found that VS supports this without extensions, but it needs to be configured by hacking the Registry settings (I've no idea why). For details see http://stackoverflow.com/q/84209/390819 – Cristian Lupascu Mar 27 '12 at 19:22
  • Are these guidelines permanent? – Demodave Mar 17 '17 at 15:32
  • 4
    for `visual studio code` the setting i was looking for was `"editor.rulers"` – Nick Brady Dec 29 '17 at 19:09