Sunday, June 26, 2005

Visual Studio Guidelines

Via John Robbins, I came across this little gem today. It's a registry setting that lets you display vertical guidelines in Visual Studio (2002, 2003, or 2005). This is handy as a cue that you might be writing lines that will be too long for your teammates to read without scrolling. Looks a bit like this:



Here's a .reg file for doing it in VS.NET 2003. Note that I've set my guides in columns 80 and 120 - you'll probably want something different.


Windows Registry Editor Version 5.00


[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor]
"Guides"="RGB(128,0,0) 80, 120"

9 comments:

  1. Those guides are useful indeed. This tip is also in O'Reilly's "Visual Studio Hacks"; they say it was originally posted by Microsoft's Sara Ford on her weblog.



    What I don't like is that we still have to hack the registry to get these lines in Whidbey... time for an enhancement suggestion I think!

    ReplyDelete
  2. Yes, in fact Sara's weblog is the one I link to. :)

    ReplyDelete
  3. Link Listing - June 26, 2005

    ReplyDelete
  4. Ooo, thanks Craig. This will save me some time when I'm writing code for articles.

    ReplyDelete
  5. How to add rule lined to your Visual Studio text editor window.

    ReplyDelete
  6. I saw Sara Ford's post last week and was meaning to blog about it, then was reminded when I saw Craig Andera's post, the topic being the guidelines feature in Visual Studio which is very useful if you have a...

    ReplyDelete
  7. A little while ago a collegue passed me this tip for adding vertical guides to Visual Studio...

    ReplyDelete
  8. A little while ago a collegue passed me this tip for adding vertical guides to Visual Studio...

    ReplyDelete
  9. The following links to .NET resources have been collated over time with the assistance of colleagues. ...

    ReplyDelete