在 Visual Studio 2010 中,什么是/如何设置热键来固定和取消固定活动窗格?
我经常运行测试并需要固定测试结果窗格。在其他时间,我主要处理编写代码和编译 - 我更喜欢在编译时自动查看输出窗格(与测试结果窗格共享相同的空间)并在完成后折叠(即取消固定) )。
我需要一个热键来快速将窗格切换到固定/取消固定状态。我怎样才能做到这一点?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看这篇文章 Visual Studio 2010 - 键盘快捷键
Check out this post on Visual Studio 2010 - Keyboard Shortcuts
在 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.您可以在选项对话框中找到命令(
工具 -> 选项 -> 环境 -> 键盘
),并指定您想要的任何键盘快捷键。但是,在您的情况下,它有两个命令:一个用于“固定”,另一个用于“取消固定”。另一种选择是编写一个组合命令的宏:然后您可以使用键盘选项为这些宏分配快捷键。
当然,您可以通过更高级的方式来完成此操作。假设您有命令
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: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 andSetTestMode
that does the opposite.