Click here to Skip to main content
Licence CPOL
First Posted 8 Sep 2011
Views 7,448
Bookmarked 2 times

Visual Studio Text Editor Guidelines

By | 8 Sep 2011 | Technical Blog
Visual Studio Text Editor Guidelines
A Technical Blog article. View original blog here.[^]

Having guidelines in your code editor makes it a bit easier to maintain your code in a tidy manner. For Visual Studio 2010, I use these free extensions:

  • Indent Guides by Steve Dower – displays indent guides in Visual Studio text editor windows.
  • Editor Guidelines by Paul Harrington – adds vertical guidelines behind the text at user-specified column positions.
  • Editor Guidelines UI by Paul Harrington – adds submenu with three commands to the code editor’s context menu (right click) for managing editor guidelines – no need to edit the registry for guidelines configuration anymore.

For Visual Studio 2008 and older, you have to use regedit. Navigate to:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor

and add a string named “Guides” with value “RGB(0,255,0),80” to create a guideline after column 80. To have more guidelines e.g., after column 80 and 130, set the value to
RGB(0,255,0),80,130“.

Note: Editor Guidelines extension for VS2010 uses a registry entry similar to the one described above, however its syntax is less strict. I found out on VS2008, that “Guides” string value cannot contain any spaces.

For reference, please visit: Adding a guideline to the editor in Visual Studio at StackOverflow.com.


License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Aoi Karasu

Software Developer

Japan Japan

Member

Aoi Karasu is a Software Developer with his first programming experience at the age of 7 (FoxBase and Turbo Pascal for DOS).

Karasu has extensive yet sometimes leaky knowledge and experience with many Microsoft technologies and languages, including C++, C#, WinForms, WPF, .NET Interop, CLI, ActiveX/COM, MFC/ATL/WTL, Windows API, OCS/UCMA/UCC API, reverse engineering (assembly, IL) and lately diving into ASP.NET MVC3.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 8 Sep 2011
Article Copyright 2011 by Aoi Karasu
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid