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条回答
你好瞎i
2楼-- · 2020-02-17 04:48

In order to close all documents:

Tools->Customize...->Keyboard..->Environment->Keyboard

There I've mapped command Window.CloseAllDocuments to Alt+Ctrl+F4

查看更多
聊天终结者
3楼-- · 2020-02-17 04:48

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.

查看更多
地球回转人心会变
4楼-- · 2020-02-17 04:51

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.

查看更多
我命由我不由天
5楼-- · 2020-02-17 04:52

Quick answer: ALT+-+A

Tested on Visual Studio 2013. On the window that you want to keep open press ALT+-, this will open the window top left menu, then press A to close all windows but the current one.

查看更多
Ridiculous、
6楼-- · 2020-02-17 04:54

Sara Ford has a lot of tips like these about Visual Studio

Here's one that references what aaronjensen said about File.CloseAllButThis:

http://blogs.msdn.com/saraford/archive/2008/01/08/did-you-know-you-can-close-all-but-this-on-files-in-the-file-tab-channel.aspx

查看更多
你好瞎i
7楼-- · 2020-02-17 04:59

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

查看更多
登录 后发表回答