Recently , I found some shortcut key really helpful which I never used before . Such keys like 'F7' ,'F3' ,'Ctrl+g' help me a lot when editing and debuging. What are your most frequently used shortcut keys in visual studio?
including Resharper's shortcuts:
- Ctrl-Shift-B (build)
- F12 (go to definition)
- Shift-F12 (find usages)
- Ctrl-minus (go to last location)
- Alt-Shift-L (go to current file in the solution explorer)
- Alt-\ (find member)
- Ctrl-T (find type)
- Ctrl-Shift-T (find file)
- Shift-Esc (close current dialog)
- Ctrl-Shift-S (save all files - VS tends to forget)
EDIT: added explanations
Ctrl-B which for me is build current project. I use it less in VS2008 SP1 with the error highlighting so Ctrl-D which for me is Go To Definition is starting to edge it out.
Ctrl-D and then ">of $filename" (open filename), Ctrl+K+C (comment selection), Ctrl+K+F (format), Ctrl-X and Ctrl+C on a line to cut or copy the entire line
The list is endless. To maximize readble code space, I've removed all my toolbars. If I want to do it, I have to know the keyboard shortcut for it.
Aside from the basics, I constantly use things like Ctrl-M,O, Ctrl-K,C, Ctrl-K,U, Ctrl-K,D, Ctrl-Alt-E, Ctrl-Alt-P. I have also made a little smiley-face button for "Remove and Sort Usings" because navigating through the right-click menu takes too long and it doesn't have a hotkey that I know of.
The most used keyboard shortcut is Ctrl-Tab to switch between tabs.
Another one I use alot is Ctrl-I to start incremental search.
I use many, but most useful I think is ctrl+k k for setting a bookmark and ctrl+k n for going to next bookmark and ctrl+k p for previous
Control-. for bringing up the smart tag for adding namespaces, renaming/refactoring, etc.
I also remapped Ctrl-B to build, Ctrl-Shift-P to Build Selection (in a sense, Build Project) and Ctrl-W to close window.
I always use the debugging keyboard shortcuts - F9 (toggle breakpoint), F10 (step over) and F11 (step into). I can't believe that some of my coworkers actually use the toolbar buttons for this - it's insanely more efficient to use the shortcuts.
I never can remember shortcuts, but Ctrl - . is one of the few I can remember and use often. With Resharper installed, Alt Enter is Ctrl . on steroids. Both intelligently resolve a variety of errors or refactorings.
I use the bookmark shortcuts alot: Ctrl-K Ctrl-K to create a bookmark, Ctrl-K Ctrl-N to cycle through them.
Ctrl-Shift-B to build is probably the most executed though.
Standard VS keys of F12 for going to the definition and then CTRL+"-" to go back to where I was before that.
Probably the two shortcuts that get me around VS and my code quicker than any other.
CTRL-K CTRL-C for comment selection and CTRL-K CTRL-U for uncomment selection (They may be mapped to CTRL-E CTRL-C and CTRL-E CTRL-C in some standard keyboard mappings, but the first two will generally still work...)
Ctrl+Shift+F9 to delete all the break points in a solution. Very handy when people leave them spattered all over the solution!