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.