Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut to close all tabs but current one in Visual Studio?

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.

like image 518
Ted Avatar asked Sep 18 '08 21:09

Ted


People also ask

How do I close all tabs in Visual Studio?

Press CTRL ( CMD On a Mac) + K + W to close all your open tabs.

What is Ctrl Shift F in Visual Studio?

Ctrl-Shift-F is used to find all the ocuurance of a string with in entire solution and display find result window as shown below. Ctrl-F is used to find a string in the current document, project and all open documents one by one.

What does Ctrl d do in Visual Studio?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.


2 Answers

I don't think there is one by default, but you can go to Tools>Options>Environment>Keyboard and bind a key to File.CloseAllButThis.

I use ctrl+alt+w

like image 138
Aaron Jensen Avatar answered Sep 21 '22 13:09

Aaron Jensen


By default, the command File.CloseAllButThis does not have a keyboard binding. You can set one up yourself though, as shown here:

In this example, I'm going to map CTRL + SHIFT + ALT + W to File.CloseAllButThis in global scope. You may like to set the scope to only the text editor.


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. The corresponding command is Window.CloseAllDocuments in case you wish to bind it to something else.

like image 42
Drew Noakes Avatar answered Sep 23 '22 13:09

Drew Noakes