1

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.

Kai
  • 3,997
  • 4
  • 30
  • 36

2 Answers2

3

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
  • 2,438
  • 23
  • 30
2

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.

Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • 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 Oct 29 '09 at 15:52