在 Visual Studio 2010 中,什么是/如何设置热键来固定和取消固定活动窗格?

发布于 2024-09-25 15:47:41 字数 176 浏览 2 评论 0原文

我经常运行测试并需要固定测试结果窗格。在其他时间,我主要处理编写代码和编译 - 我更喜欢在编译时自动查看输出窗格(与测试结果窗格共享相同的空间)并在完成后折叠(即取消固定) )。

我需要一个热键来快速将窗格切换到固定/取消固定状态。我怎样才能做到这一点?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寂寞笑我太脆弱 2024-10-02 15:47:41

查看这篇文章 Visual Studio 2010 - 键盘快捷键

  1. 使用 CTRL+ALT+O 选择输出窗口
  2. 使用 ALT+ 固定输出>W+K
  3. 使用 ALT+W+A 自动隐藏输出

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
眼眸印温柔 2024-10-02 15:47:41

在 VS 2017 中,您可以将自己的热键分配给命令 Window.PinTab,该命令可以固定和取消固定选项卡。

选项 >键盘快捷键

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

Options > Keyboard Shortcuts

脱离于你 2024-10-02 15:47:41

您可以在选项对话框中找到命令(工具 -> 选项 -> 环境 -> 键盘),并指定您想要的任何键盘快捷键。但是,在您的情况下,它有两个命令:一个用于“固定”,另一个用于“取消固定”。另一种选择是编写一个组合命令的宏:

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

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

然后您可以使用键盘选项为这些宏分配快捷键。

当然,您可以通过更高级的方式来完成此操作。假设您有命令 SetCodingMode,它将停靠输出窗口隐藏测试结果窗口,而 SetTestMode 则执行相反的操作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文