views:

301

answers:

2

Is there a setting in Visual C# 2008 to set a character width at which I'd like to see a margin line in the code editors? I do this in eclipse by: Window --> Preferences --> General --> Editors --> Text Editors --> Show Print Margin, Column = 80

But I couldn't find any print margin setting while searching online or poking around in the settings.

+1  A: 

I poked around but couldn't find much. For some languages, you can specify a length that tags will wrap at. For example, HTML:

Tools > Options > Text Editor > HTML > Format > Tag Wrapping

EDIT:

After reading your question more carefully, I did some more digging. Apparently there's a registry hack you can do to make Visual Studio show a margin line at a certain number of characters (you can add up to 13 "guides"), but it sounds like it won't automatically wrap at that guide line when formatting like Eclipse does.

Cory Larson
This sounds exactly like what I'm looking for, but it doesn't work for me. Perhaps it doesn't work for the Express edition. Thanks for the link!
Kai
A: 

AFAIK it's impossible from menu. But ome addins enables this feature, or you can edit the registry manually (not very good, but it works):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor]
"Guides"="RGB(212,212,212) 99, 109"

Here RGB(212,212,212) - margin color; 99, 109 means that we want two margin guides: after 100-th and after 110-th character

Alex