views:

961

answers:

10

Possible Duplicates:
Visual Studio 6 tips and tricks
Visual Studio 2005 Shortcuts
Favorite Visual Studio keyboard shortcuts

I am a big fan of shortcuts in VS2008, it can save a lot of time and keep your fingers on the keyboard instead of the mouse.

Recently I downloaded the entire list of keyboard shortcuts for VS 2008 and went through them all finding my favourites.

Currently here are the top one's I use:

  1. Shift + DEL: Deletes an entire line
  2. Ctrl + Shift + F10: Brings up the Using / Resolution box
  3. cw[tabx2]: Inserts Console.Writeline code
  4. ctor[tabx2]: Inserts default constructor code

What other ones do people know that saves time / are actually useful?

+3  A: 

Incremental Search - Ctrl+I

Search your code, just like in Firefox/IE8. Doesn't work with regions however.

Ch00k
it does if you have selected "search hidden text" on a previous normal search.
Entrodus
Really? That didn't have any effect on incremental search last time I tried it, but I will have to try again. This could end the region debate in our company!
Ch00k
oups!!! no it doesnt. I wish i could at least have a way to expand all regions (the opposite of ctrl+m+o)
Entrodus
At least I'm not going crazy :)Ctrl M, P will stop outlining, which has basically the same effect as expanding all
Ch00k
CTRL+M,P doesnt seem to expand anything. At least not in VS 2005 VB.NET i am currently working on. Will try it at home on VS 2008 and see how it goes...
Entrodus
A: 

Most of my "shortcuts" come from ReSharper and ViEmu, so R#'s Alt+Enter and various Vim features top my list.

Brian Rasmussen
+2  A: 

Ctrl+. : Opens the current smart tag in the text editor. This saves sooo much time when you use smart tags.

By the way, the tab-tab things are code snippets rather than short-cuts. Shouldn't make a difference for this question though.

OregonGhost
"using"... 'nuff said... +1 ;-p
Marc Gravell
A: 
F5, F5, F5 and F5
Robin Day
That's just too obvious ;)
OregonGhost
That may be, but I can hand on heart, honestly say, it is the Visual Studio shortcut that I use the most.
Robin Day
CTRL + F5 runs your program but detaches it from the debugger - makes it faster :)
Chris
For some reason, in many cases, I click on the Debug button rather than press F5. Don't know, maybe it's because the coding (i.e. typing) phase is over then ;)
OregonGhost
@OregonGhost: I too can't figure out why I dont press F5 and almost always click on debug button !! pretty strange.
Kunal S
A: 

Shift + F11 -> Set the Next Execution Statement [while debugging]

AB Kolan
A: 

Shift+Alt+F10 > include namespace

Ctrl+R+E > Refactor, ecapsulate field

Shift+F6 > build current project

Ctrl+Alt+Q > Quick Watch in debugger

Ctrl++ and Ctrl+- > navigate back and forward in code

F2 > Refactor, Rename > my favorite one

Andrija
A: 

Shift + F5: Stop debugging

Mr. Brownstone
A: 

Ctrl+M+O : collapses all regions and methods

Ctrl+M+M : toggle outlining for the current region or method

Thomas Levesque
A: 

I use Resharper that offers the major refactoring and search functionallity with different shortcuts.

crauscher
+3  A: 
Zaagmans