Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding a guideline to the editor in Visual Studio
    text
    copied!<p><strong>Introduction</strong></p> <p>I've always been searching for a way to make Visual Studio draw a line after a certain amount of characters.</p> <p>Below is a guide to enable these so called <em>guidelines</em> for various versions of Visual Studio.</p> <p><strong>Visual Studio 2013</strong></p> <p>Install Paul Harrington's Editor Guidelines extension for <a href="http://visualstudiogallery.msdn.microsoft.com/da227a0b-0e31-4a11-8f6b-3a149cf2e459/view/Reviews" rel="noreferrer">VS 2013</a></p> <p><strong>Visual Studio 2010 and 2012</strong></p> <ol> <li>Install Paul Harrington's Editor Guidelines extension for <a href="http://visualstudiogallery.msdn.microsoft.com/0fbf2878-e678-4577-9fdb-9030389b338c" rel="noreferrer">VS 2010</a> or <a href="http://visualstudiogallery.msdn.microsoft.com/da227a0b-0e31-4a11-8f6b-3a149cf2e459?SRC=Home" rel="noreferrer">VS 2012</a>.</li> <li>Open the registry at: <br />VS 2010: <code>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Text Editor</code> <br />VS 2012: <code>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Text Editor</code> <br />and add a new string called <code>Guides</code> with the value <code>RGB(100,100,100), 80</code>. The first part specifies the color, while the other one (<code>80</code>) is the column the line will be displayed.</li> <li>Or install the <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/7f2a6727-2993-4c1d-8f58-ae24df14ea91" rel="noreferrer">Guidelines UI</a> extension (which is also a part of the <a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/" rel="noreferrer">Productivity Power Tools</a>), which will add entries to the editor's context menu for adding/removing the entries without needing to edit the registry directly. The current disadvantage of this method is that you can't specify the column directly.</li> </ol> <p><strong>Visual Studio 2008 and Other Versions</strong></p> <p>If you are using Visual Studio 2008 open the registry at <code>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor</code> and add a new string called <code>Guides</code> with the value <code>RGB(100,100,100), 80</code>. The first part specifies the color, while the other one (<code>80</code>) is the column the line will be displayed. The vertical line will appear, when you restart Visual Studio.</p> <p>This trick also works for various other version of Visual Studio, as long as you use the correct path:</p> <pre><code>2003: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor 2005: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor 2008: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor 2008 Express: HKEY_CURRENT_USER\Software\Microsoft\VCExpress\9.0\Text Editor </code></pre> <p><a href="https://stackoverflow.com/a/332577/11387">This also works in SQL Server 2005 and probably other versions.</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload