Close All But This on the File Tab Channel

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

Close All But This on the File Tab Channel

  • Comments 4

Command:  File.CloseAllButThis
Versions:  2008,2010
Published:  4/1/2010
Code:  vstipEnv0011

 

If you ever get the urge to close every file except one you want to keep open then just right-click on the file tab and choose "Close All But This":

image

  • Hi,

    I always wire LCTRL+W to "Close File" (i.e. the current document), and LCTRL+LSHIFT+W to "Close All but This". I've found it's some of the most important functions to keep my workspace tidy while writing code.

    Also, don't forget to take a good look at the Power Commands for Visual Studio 2010 when they become available (they were pulled after VS 2010 RC was made available, afaik).

  • Zain,

    Why there isn't a "Close All (including this)"menu option yet, even in VS2010?

  • Lucaiano,

    There IS a command to do that it's Window.CloseAllDocuments  but sadly it isn't mapped to a keyboard shortcut by default.  Just head over to Tools -> Options -> Keyboard and map the command to a keystroke that is comfortable for you.

    Z

  • Is there a way to remove this option from the open file tab context menu?  I often accidentally click this instead of "Close" and inadvertently close all the files I am working on...

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post