Adding vertical guides to the Visual Studio Text Editor

Source: Internet
Author: User
Tags visual studio 2010
Adding vertical guides to the Visual Studio Text Editor

Something that I 've done and liked since vs2005, has been to add vertical guides to the vs text editor. For example:

I like putting them at the first several tab stops as it helps keep track of indenting. I also have one at position 79 so I know where to wrap lines and comments. so, how do you do this? Well, it's a registry entry. Here are the entries for each version of Visual Studio:

Visual Studio 2005:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER \ Software \ Microsoft \ visualstudio \8.0\ Text Editor]
"Guides" = "RGB (230,230,255) 4, 8, 12, 16, 20, 24, 28, 32, 79"

 

 

 

Visual Studio 2008:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER \ Software \ Microsoft \ visualstudio \9.0\ Text Editor]
"Guides" = "RGB (230,230,255) 4, 8, 12, 16, 20, 24, 28, 32, 79"

Visual Studio 2010:

bad news, here. since the text editor is vs2010 is now a WPF control-this same registry entry doesn' t have any affect. if I find the equivalent of this for vs2010, I will try to post it up here.

Update (4/24/2010): I found this was reported for vs2010, but it will not be implemented. although there is a link in there of how you might be able to write your own extension that does this. see: https://connect.microsoft.com/VisualStudio/feedback/details/490930/text-editor-guides

meanwhile, I just found that on the Visual Studio Gallery, someone implemented this. it's just a quick download and the same registry entry (exception "10.0" vs "8.0", below) works !!!

download: http://visualstudiogallery.msdn.microsoft.com/en-us/0fbf2878-e678-4577-9fdb-9030389b338c

You can either go modify the Registry by hand (warning: Standard "do not modify the registry !" Warnings apply)-or you can copy/paste the contents above into a text file and name it something like "verticalguides. Reg"-Then double-click it to run it.

Also, the RGB is what you might expect CT-this is what sets the color of the line. so (0,255, 0, 0) is all red, (255, 0) is all green, and (,) is all blue-and combinations of those are somewhere in-. after that, the comma-separated list is a list of the vertical positions where you want the actual lines.

Lastly, to remove the guides, just create another file called "removeverticalguides. Reg", paste the contents below and double-click to run:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER \ Software \ Microsoft \ visualstudio \ 8.0 \ Text Editor]
"Guides" =-

 

 

 

setting a value to "-" in A. reg file deletes that entry. Anyhow, I find this very useful so I thought I wocould post it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.