Keyboard shortcut to close all tabs but current on

2020-02-17 04:41发布

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.

8条回答
女痞
2楼-- · 2020-02-17 05:06

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.

查看更多
beautiful°
3楼-- · 2020-02-17 05:12

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.

查看更多
登录 后发表回答