Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In visual studio 2010 what is/how to set the hotkey to pin and unpin an active pane?

I often run tests and need the test-result pane to be pinned. In other time, I mostly work with writting codes and compile - I prefer to have the output pane (which shared the same space with test-result pane) automatically viewed while compiling and collapsed when done (i.e. unpinned).

I need an hotkey to quickly switch the pane to pinned/unpinned state. How can I do that?

like image 823
Nam G VU Avatar asked Sep 30 '10 04:09

Nam G VU


People also ask

How do I change hotkeys in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

What is the shortcut to load the application window in Visual Basic?

Ctrl+Alt+R This hotkey is used to display the web browser window in the Visual Studio.


3 Answers

Check out this post on Visual Studio 2010 - Keyboard Shortcuts

  1. Select the Output windows with CTRL+ALT+O
  2. Pin the Output with ALT+W+K
  3. Auto hide the Output with ALT+W+A
like image 82
nithins Avatar answered Oct 17 '22 21:10

nithins


In VS 2017 you can assign your own hotkey to the command Window.PinTab, which both pins and unpins a tab.

Options > Keyboard Shortcuts

like image 35
Johan Maes Avatar answered Oct 17 '22 22:10

Johan Maes


You can locate the commands in the options dialog (Tools -> Options -> Environment -> Keyboard), and assign whatever keyboard shortcut you want for this. However, in your case it's two commands: one for "pinning" and another for "unpinning". Another option would be to write a macro that combines the commands:

Sub DockOutputWindow()
    DTE.ExecuteCommand("View.Output")
    DTE.ExecuteCommand("Window.Dock")
End Sub

Sub AutoHideOutputWindow()
    DTE.ExecuteCommand("View.Output")
    DTE.ExecuteCommand("Window.AutoHide")
End Sub

Then you can use the keyboard options to assign shortcut keys to these macros.

Of course you can do this in an even more advanced way. Say you have the command SetCodingMode that will both dock the output windows and hide the test-result window and SetTestMode that does the opposite.

like image 33
Fredrik Mörk Avatar answered Oct 17 '22 22:10

Fredrik Mörk