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?
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.
Ctrl+Alt+R This hotkey is used to display the web browser window in the Visual Studio.
Check out this post on Visual Studio 2010 - Keyboard Shortcuts
In VS 2017 you can assign your own hotkey to the command Window.PinTab
, which both pins and unpins a tab.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With