简体   繁体   中英

Keyboard shortcut for show/hide the lower pane (Error List, Output, Watch) in Visual Studio

Is there any keyboard shortcut or alternative way to show/hide the lower pane (Error List, Output, Watch etc. tabs) in Visual Studio. I am looking for something similar to Ctrl + R in Microsoft SQL Management Studio which toggles the Results pane.

I understand I can pin/unpin, resize or move around the lower pane but it is not very convenient. I like the fact that when I am typing code, Visual Studio on-the-fly shows the any coding errors, but for that I have to keep the Errors pane pinned, but that reduces my coding window, specially when working on single-monitor systems or on laptops. If I keep it unpinned, then I have to every now and then click on the Error List tab to check.

在此处输入图片说明

There is no command in VS2017 for toggle the tool window. For me, I install the macro extension, write a script for hiding all tool windows and binds a shortcut key to this macro.

Here is the steps:

1) First, you will need to install the Macros for Visual Studio

2) Then in macro explorer, Tools> Macro> Macro Explorer , add this macro:

var windows = dte.Windows;    
for (var i = 1; i <= windows.Count; i++) {
    var window = windows.Item(i);

    // Check that this is a tool window and not a document
    if (window.Document == null && window.Visible) {
        window.Activate();
        dte.ExecuteCommand("Window.Hide");
    }
}

3) Set this macro as macro command 1 in macro explorer.

4) Finally, in Tools> Options> Environment> Keyboard , assign the "Tool.MacroCommand1" to your favorite keyboard shortcut.

Peronsally, I configure Alt + * for showing/ hiding tool windows

  • Alt + ` : Tool MacroCommand1 (for hide all tool window)
  • Alt + 1 : View Solution explorer
  • Alt + 2 : View Bookmark
  • Alt + 3 : View Find results
  • Alt + 4 : View Output
  • Alt + 5 : View Call heirarchy
  • Alt + 6 : View Task List

I haven't changed much from the default setup and on mine shortcuts currently exist for:

  • Ctrl + Alt + O - display the output window
  • Ctrl +- \\ , Ctrl + E - display Error window

They don't toggle though as far as I know.

Hot Windows扩展为工具窗口管理提供了额外的命令。

Alternatively, in Visual Studio 2019...

Display or focus on a lower pane, if not already focused

Ctrl + Alt + O ( Output Window, for instance )

Once any lower pane is focused, repeat the close sequence until all lower panes are closed.

Close a lower pane

Shift + Esc

This works with the default settings and no plugins are required.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM