This is originally from Sara's blog.
It also works with almost any version of Visual Studio, you just need to change the "8.0" in the registry key to the appropriate version number for your version of Visual Studio.
The guide line shows up in the Output window too. (Visual Studio 2010 corrects this, and the line only shows up in the code editor window.)
You can also have the guide in multiple columns by listing more than one number after the color specifier:
RGB(230,230,230), 4, 80
Puts a white line at column 4 and column 80. This should be the value of a string value Guides
in "Text Editor" key (see bellow).
Be sure to pick a line color that will be visisble on your background. This color won't show up on the default background color in VS. This is the value for a light grey: RGB(221, 221, 221).
Here are the registry keys that I know of:
Visual Studio 2010: HKCU\Software\Microsoft\VisualStudio\10.0\Text Editor
Visual Studio 2008: HKCU\Software\Microsoft\VisualStudio\9.0\Text Editor
Visual Studio 2005: HKCU\Software\Microsoft\VisualStudio\8.0\Text Editor
Visual Studio 2003: HKCU\Software\Microsoft\VisualStudio\7.1\Text Editor
For those running Visual Studio 2010, you may want to install the following extensions rather than changing the registry yourself:
These are also part of the Productivity Power Tools, which includes many other very useful extensions.
TFS users: If you are using source control that requires you to warn it before your rename files/folders then look at this answer instead which covers the extra steps required.
To rename a project's folder, file (.*proj
) and display name in Visual Studio:
- Close the solution.
- Rename the folder(s) outside Visual Studio. (Rename in TFS if using source control)
- Open the solution, ignoring the warnings (answer "no" if asked to load a project from source control).
- Go through all the unavailable projects and...
- Open the properties window for the project (highlight the project and press Alt+Enter or F4, or right-click > properties).
- Set the property 'File Path' to the new location.
- If the property is not editable (as in Visual Studio 2012), then open the
.sln
file directly in another editor such as Notepad++ and update the paths there instead. (You may need to check-out the solution first in TFS, etc.)
- Reload the project - right-click > reload project.
- Change the display name of the project, by highlighting it and pressing F2, or right-click > rename.
Note: Other suggested solutions that involve removing and then re-adding the project to the solution will break project references.
If you perform these steps then you might also consider renaming the following to match:
- Assembly
- Default/Root Namespace
- Namespace of existing files (use the refactor tools in Visual Studio or ReSharper's inconsistent namespaces tool)
Also consider modifying the values of the following assembly attributes:
AssemblyProductAttribute
AssemblyDescriptionAttribute
AssemblyTitleAttribute
Best Answer
Maybe I'm just crazy, but why don't you just press Shift + Tab instead of backspace if you want to get rid of the tabs?