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

前端 未结 8 1574
轻奢々
轻奢々 2020-12-24 00:03

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 Res

相关标签:
8条回答
  • 2020-12-24 00:33

    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.

    0 讨论(0)
  • 2020-12-24 00:35

    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.

    0 讨论(0)
  • 2020-12-24 00:39

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

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

    https://docs.microsoft.com/en-us/archive/blogs/saraford/did-you-know-you-can-close-all-but-this-on-files-in-the-file-tab-channel-124

    0 讨论(0)
  • 2020-12-24 00:50

    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.

    0 讨论(0)
  • 2020-12-24 00:51

    In order to close all documents:

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

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

    0 讨论(0)
  • 2020-12-24 00:51

    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.

    0 讨论(0)
提交回复
热议问题