Tuesday, February 5, 2008

[.NET] Top 5 Visual Studio Hotkeys

Ok, to cut a long story short, these are the 5 Visual Studio Hotkeys I would bring with me on a desert island (if I had to go there with just my Viz, mylaptop, and an electrical generator):

(5) CTRL+SHIFT+B: Build - This is quite banal, you use it all the time so even if it ain't so sweet as hotkey it manages to enter my top 5. If you don't know this, man, you're out. Bread and butter (like the good old F7 in Visual Studio 6).

(4) F12: Go to definition - it's kind of nice sometimes to pull it in front of people: you just lose them. The move.

(3) CTRL+F6: Next IDE Window - Ain't is sweet? No more Window->Windows then selecting from that ugly list on that cheap dialog. Lightspeed!

(2) F5: Start with Debug - This is a well known 2-in-1 hotkey: you start the debugger and whenever you hit a breakpoint you just push it again to get going. Can't live without.

(1) F9: Toggle/Untoggle Breakpoint - This is my favourite: I just can't get enough of those red dots. Addictive.

(BONUS) CTRL+Tab: Tab Between Windows - Really useful. Not as immediate as CTRL+F6 but you can choose which window you wanna open, and in VS2008 this one lets you see a preview of what's in the documents. It performs as CTRL+F6 in VS2003 and VS6. Secret Weapon.

So, those were my favourite 5 Viz hotkeys; all of them work in all VS versions unless specified differently. Keep the good butchering up and share your hotstuff (keys included)!

Update [09/04/08] - Commenting/Uncommenting HOTKeys:

This are really helpful hotkeys I had to cut off from my top 5 even if I use them a lot:
COMMENTING -> select (with mouse or keys) the block of code you want to comment and then go with the following keys chord: CTRL+K to select - CTRL+C to comment what you just selected.
UNCOMMENTING -> select (with mouse or keys) the block of code you want to uncomment and then go with the following keys chord: CTRL+K to select - CTRL+U to uncomment what you just selected (must be commented to work).


DewiMorgan said...

Thanks, I didn't know at least half of these!

As I work inthe designer a lot, one of my most used is:
F7 - view code for current thing
Shift F7 - view designer for current thing

Darren said...

Instead of CTRL+SHIFT+B, just use F6 for build.

Anonymous said...

I would add CTRL+E,F/D to format the document or selection