在Visual Studio中显示/隐藏下部窗格(错误列表,输出,监视)的键盘快捷键 [英] Keyboard shortcut for show/hide the lower pane (Error List, Output, Watch) in Visual Studio

查看:535
本文介绍了在Visual Studio中显示/隐藏下部窗格(错误列表,输出,监视)的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中是否存在任何键盘快捷键或替代方法来显示/隐藏下部窗格(错误列表",输出",监视"等选项卡).我正在寻找与Microsoft SQL Management Studio中的Ctrl + R类似的东西,它可以切换结果"窗格.

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.

我知道我可以固定/取消固定,调整大小或在下部窗格中移动,但这不是很方便.我喜欢这样的事实,当我键入代码时,Visual Studio会即时显示任何编码错误,但是为此我必须保持错误"窗格固定,但这会减少我的编码窗口,特别是在使用单显示器时系统或笔记本电脑上.如果我不固定它,那么我现在必须每次都单击,然后单击错误列表"选项卡进行检查.

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.

推荐答案

VS2017 中没有用于切换工具窗口的命令.对我来说,我安装了宏扩展,编写了一个脚本来隐藏所有工具窗口,并将快捷键绑定到该宏.

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.

以下是步骤:

1)首先,您需要安装用于Visual Studio的宏

1) First, you will need to install the Macros for Visual Studio

2)然后在宏资源管理器Tools> Macro> Macro Explorer中,添加以下宏:

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)在宏资源管理器中将此宏设置为宏命令1.

3) Set this macro as macro command 1 in macro explorer.

4)最后,在Tools> Options> Environment> Keyboard中,将 "Tool.MacroCommand1"添加到您最喜欢的键盘快捷方式.

4) Finally, in Tools> Options> Environment> Keyboard, assign the "Tool.MacroCommand1" to your favorite keyboard shortcut.

通常,我配置 Alt + * 用于显示/隐藏工具窗口

Peronsally, I configure Alt + * for showing/ hiding tool windows

  • Alt + `:工具MacroCommand1(用于隐藏所有工具窗口)
  • Alt + 1 :查看解决方案资源管理器
  • Alt + 2 :查看书签
  • Alt + 3 :查看查找结果
  • Alt + 4 :查看输出
  • Alt + 5 :查看通话层次结构
  • Alt + 6 :查看任务列表
  • 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

这篇关于在Visual Studio中显示/隐藏下部窗格(错误列表,输出,监视)的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆