VS TnT #7: Fastest draw in the west, how to kill any/all open windows in VS!
Friday, November 19, 2010 9:59 PM
Ever want to just scrap everything you're looking at and start over from scratch? What's the fastest way to do that in Visual Studio? Read on for two customizations to help you out!
Tip'n'Trick: Ever want to start over from scratch? Here's the fastest way to close all the windows down, or everything BUT the one you're working on.
Shortcut: CTRL+ALT+SHIFT+F4 to close all, and CTRL+SHIFT+F4 to close all BUT the current window.
Da "Peter" version (aka, ya, da verbose one)
Ever get into a mood where you just want to PITCH everything out the window and start over from scratch? Ya, been there, done that! Well, when you reach the end of THAT rope, what do you usually do? CTRL+F4 for EVERY code, designer, XAML window you have open right? Tired after four, five, six, seven,......ya, a lot of open windows eh?
Well, I have a FASTER way to get this done, two actually. You're ALREADY used to the CTRL+F4 to close windows right, similar to ALT+F4 (no No NO, don't do tha.... no......ok, you're back, you hit ALT+F4 didn't you, for you people, THAT shortcut closes applications, NOT code windows DOH!). Ok, anyways, JUST like CTRL+F4, we're going to setup a keyboard shortcut customization to close ALL open windows. Open up your Tools, Options window and goto Keyboard.
After you select Keyboard, start typing out the "closealldocuments" in the textbox just like above. Somewhere along the way, you'll see the listbox below pruned to just the one you're looking for (Window.CloseAllDocuments), select that. Then, goto the Press shortcut keys textbox, and press the magical "three finger salute" CTRL+ALT+SHIFT and then F4. And HERE'S THE SECRET, press the Assign button. I can't tell you how many times I've made 2/3/4 changes and forgotten to press the Assign button and lost ALL MY CHANGES! DOH!
Ok, after you do that, you can then add the shortcut for closing all windows BUT this one (the current one you're working on). This is GREAT for when you've opened up a bunch of code windows to help narrow down something but now want to focus/zoom/narrow your focus into one area only and don't want any other distractions.
DON"T FORGET TO HIT THE ASSIGN BUTTON! Yes, I did forget a few too many times and yes, that's why I'm hoping you don't make the same mistake. LOL
Ok, now that you know how to focus on JUST the code you want to do by removing any/all distractions, it's time to grab a coffee and get coding.