F12 - Go To Definition
F12 itself invokes the "Go To Definition" (GTD) command. This works on types, members, locals, range variables, etc. It uses all the compiler's internal understanding of the code to make sure it takes you to the right member - even when there are many overloads or if your code is using a lot of type inference.
Metadata As Source
One of the additions to "Go To Definition" support in Visual Studio 2005 was something we call "Metadata as Source". If you go to definition on a type which is defined in a referenced assembly - you will be presented with a "header file"-style view of the corresponding type and it's members. This keeps you in the editor - and gives a convenient view of the type. You can continue to navigate other members/types directly from the Metadata As Source view by using GTD again on those tokens. Backward and Forward navigation
If you use GTD a lot, you'll probably find yourself wanting to go "back" to where you invoked "go to definition" from. It turns out there is a keybinding for this:
ctrl-shift-8: Takes you back in the GTD stack, to the the last place you invoked GTD
ctrl-shift-7: Takes you forward in the GTD stack, to the last place you invoked back
Code Definition Window
The Code Definition Window is toolwindow which shows a live GTD of whatever symbol is currently under the cursor in the editor. If you find yourself using GTD a lot, you may want to pop up the Code Definition Window with ctrl-w-d.
BTW - If you are looking for more useful keyboard shortcuts using the C# Profile in Visual Studio - take a look at the C# keybinding posters Karen blogged about a little while ago.
Multiple copy/pastes
Ctrl+Shift+V cycles through the clipboard ring. You can copy/cut multiple times from one area of code, then go to another area and paste them one after another.
Drag and drop code snippets
The Toolbox (Ctrl+Alt+X) window has multiple tabs. You can drag and drop code onto this window and copy it elsewhere. Some tabs do not allow dropping code into them; those that allow will have the appropriate icon. The General tab works for me.
Previous cursor positions
Ctrl+- i.e. Ctrl + Hyphen. This cycles you through the code positions you visited.
Ctrl+Shift+- to navigate in the opposite direction.
Incremental search
To incrementally search for text as you type, first press Ctrl+i. Then type the word you want to search. Hit backspace to clear a character and enter to finish. Pressing F3 after this will work as usual, i.e. search for the next occurrence of previous search.
Ctrl+i - Ctrl+i works like F3.
Matching brace/comment/region/quote
Ctrl+] takes you to the matching brace. It also takes you to the matching comment, region or quote depending on what is at the cursor now.
Vertical block selection
Press Alt and then select the area you want with your mouse.
Closing/Showing support windows
There are a bunch of necessary/useful windows in the Visual Studio IDE like Properties (F4), Solution Explorer (Ctrl+Alt+L), Output Window (Ctrl+Alt+O), Task List (Ctrl+Alt+K) etc. However, they take up a lot of space. An easy way around this is to use the auto hide feature.
Open the window you want. Right click on its title and choose Auto Hide. The window will dock in whenever your mouse is not hovering over it.
Tab groups - group code editor windows
If you have many source code windows open, you can group them logically using tab groups. Right click the tab of the code window and choose New Horizontal Tab Group. This will move the window into a split window, allowing you to see both files. You can add more files to this new tab group and also move files back to the previous group by choosing Move To Previous Tab Group.
Track things you have to do with Task List
The Task List window (Ctrl+Alt+K) allows you to keep track of the things you have to do. Right click on the Task List window and choose Show TasksAll to see a list of tasks. Ctrl+Shift+F12 to cycle through your list of tasks.
By default, comments marked with a TODO will appear in the task list.
Edit Task List Comment Tokens
You can add your own set of comment tokens (like the TODO comment token). Goto ToolsOptionsEnvironmentTask ListComment Tokens and make your changes. You can change the priority appearance of each comment token too.
Add Task List Shortcut
Add a shortcut to the task list with Ctrl+K, Ctrl+H. This will add the current line to the task list.
Auto-complete
Press Ctrl+Space or Alt+RightArrow to auto-complete the word. Intellisense suggestions may pop up a window if there is more than one possibility.
Intellisense suggestions window
Press Ctrl+Shift+Space to bring up the intellisense suggestions window. When giving parameters for functions, I often need to escape the suggestions window to check another part of code. To bring it back, I used to delete a comma and then type it again; but this is easier.
Word wrap
Ctrl+R Ctrl+R
or
ToolsOptionsText EditorAll LanguagesGeneralWord Wrap
If you want to set this option for only one language, then choose the appropriate language instead of All Languages.
Line numbering
ToolsOptionsText EditorAll LanguagesGeneralLine numbers.
If you want to set this option for only one language, then choose the appropriate language instead of All Languages.
Favorites window
Your IDE also functions as a browser. To see your list of favorites, press Ctrl+Alt+F or choose ViewOther WindowsFavorites.
Bookmarks
Bookmarks are available through EditBookmarks. Bookmarks allow you to mark places in your code that you would want to come back to.
Create/Remove Bookmark - Ctrl+K, Ctrl+K
Move to next bookmark - Ctrl+K, Ctrl+N
Move to previous bookmark - Ctrl+K, Ctrl+P
Clear all bookmarks - Ctrl+K, Ctrl+L
Code Formatting
Auto-format selection - Ctrl+K, Ctrl+F
Convert to lower case - Ctrl+U
Convert to upper case - Ctrl+Shift+U
Comment selection - Ctrl+K, Ctrl+C
Uncomment selection - Ctrl+K, Ctrl+U
Outlining
I like this feature that allows me to hide code that is irrelevant to what I'm currently working on.
Fold/Unfold the current code block - Ctrl+M, Ctrl+M
Unfold all - Ctrl+M, Ctrl+L
Stop outlining - Ctrl+M, Ctrl+P
Fold all - Ctrl+M, Ctrl+O
Build and Debug
Build - Ctrl+Shift+B
Run - Ctrl+F5
Debug - F5
Cycle through build errors - F8
MSDN Shortcut List