Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

enter image description here

like image 920
HappyTown Avatar asked Sep 25 '18 16:09

HappyTown


4 Answers

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
like image 143
Houcheng Avatar answered Oct 08 '22 17:10

Houcheng


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.

like image 40
Jeff R. Avatar answered Oct 08 '22 17:10

Jeff R.


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.

like image 2
rbento Avatar answered Oct 08 '22 19:10

rbento


There is Hot Windows extension that provides additional commands for tool windows management.

like image 1
Sergey Vlasov Avatar answered Oct 08 '22 19:10

Sergey Vlasov