The nuance of the question is what are the features of the Visual Studio environment, that not everyone knows about, that you have come to depend on and that you would like others to know about.
views:
367answers:
17Control+minus : goes back to the previous editor position. This is especially helpful if you have temporarily navigated away from your editting position because you've looked up a symbol declaration or searched for a string. It works between files too. Control+Shift+minus visits the editor positions in the opposite direction.
The ability to unload projects and then to edit them using the text editor. You do this by right-clicking on a project and selecting "Unload Project", the right-clicking on the project and select "Edit project". Sometimes editing the text of the project files is faster than carrying out operations using the gui. For example, having to copy a long list of references from one project to another. Once the editing is done, you right-click on the project and select "Load Project" to return to the normal project view.
Dragging the current location marker in the source window during a debug session to skip statements or re-execute statements. In the debugger the yellow "current statement" arrow is draggable.
Executing C# statements interactively in the debugger using the Immediate Window. You can type statements into the Immediate window of the debugger, and it will execute them in the context of the current statement. Of course, only statements that make sense in the context of the current statement will execute.
In C++, a really handy thing to have is to open the "Code Definition Window". So no matter what .cpp file you are editing, the corresponding .h window is displayed in this extra window.
Leaving bookmarks in your code, with Ctrl + K + K
, then you can navigate to the next bookmark with CTRL + K + N
, and to the previous with CTRL + K + P
.
Ctrl + . to automatically show smart tags, so Ctrl +. then enter will quickly open and use the smart tag value.
Interactive search with Ctrl+I is great for fast searching through a file.
Ctrl + K + C to comment out a selection
Ctrl + K + U to uncomment a selection
Ctrl + . for smart tags
Ctrl + space to bring up intellisense
I also like to use the prop and foreach code snippets.
Highlight all your using statements in VS 2008 and go to Edit -> IntelliSense -> Organize Usings -> Remove Unused Usings :-)
I'd recommend you check out the Webcast for session TL46 from PDC 2008: Microsoft Visual C# IDE: Tips and Tricks. The speaker points out some non-obvious things, and also talks about the free, recently released "express" version of CodeRush and some of the things that it can do.
Ctrl + K + F to format a selection.
Fixes all my crappy indenting messes.
The best tricks I find come across Sara Ford's blog - http://stackoverflow.com/questions/100420/hidden-features-of-visual-studio-2005-2008#100457
Ctrl+K, Ctrl+C to comment out the selected block of text. Ctrl+K, Ctrl+U to uncomment the text.
Priceless.