Does anyone know a keyboard shortcut to close all tabs except for the current one in Visual Studio? And while we're at it, the shortcut for closing all tabs? Is there a Resharper option for this? I've looked in the past and have never been able to find it.
I don't think there is one by default, but you can go to Options>Environment>Keyboard and bind a key to File.CloseAllButThis.
I use ctrl+alt+w
Right-click on a File Tab and select Close All But This. This command will close all the other files in the editor, except for the currently-activated file. There isn't a keyboard shortcut by default but you can bind it to a keyboard shortcut in the general environment settings (Options->Environment->Keyboard), the command is File.CloseAllButThis.
Sara Ford has a lot of tips like these about Visual Studio
Here's one that references what aaronjensen said about File.CloseAllButThis:
I follow aarojensen's method, but put it in the file menu (right click on the menu and select customize). Then Alt-F-B closes all but the current.
If you find yourself using "Close all but this" too often, you can also try Tools \ Options \ Environment \ Documents \ [x] Reuse current document window, if saved. Combined with ReSharper's Recent Edits (ctrl-, or ctrl-e depending on keymap) you can avoid having too much open documents all the time and still quickly navigate between recently opened.
I close all documents using ALT + W + L.
This is available in Visual Studio without any special plugins or configuration. It just uses the tool bar mnemonics.
This is a great tip. The less time I spend using the mouse the better. The only problem is remembering to look out for when you need these features so that you don't just accept the defaults settings.
In order to close all documents:
Tools->Customize...->Keyboard..->Environment->Keyboard
There I've mapped command Window.CloseAllDocuments to Alt+Ctrl+F4