简体   繁体   English

如何隐藏<summary>在 Visual Studio 代码中按 F12(转到定义)时的 [元数据]</summary>

[英]How to hide <summary> in [metadata] when press F12 (Go to definition) in visual studio code

Could you please help me to hide the summary comments when I press F12 (Go to definition) in Visual Studio Code?当我在 Visual Studio Code 中按 F12(转到定义)时,您能帮我隐藏摘要注释吗? I do not want to see summary comments as they are too long.我不想看到摘要评论,因为它们太长了。

Could you please help me see only declarations of classes, methods, eg but not summary comments?您能否帮我只查看类、方法的声明,例如但不查看摘要注释? There is the screen when I press F12 on int.当我在 int 上按 F12 时出现屏幕。

代码示例

The summary comments are helpful metadata in the assembly.摘要注释是程序集中有用的元数据。 If you open it in Visual Studio 2019/2017 etc, it is feasible to collapse them.如果在 Visual Studio 2019/2017 等中打开它,折叠它们是可行的。

在此处输入图像描述

However, it seems impossilbe to collapse the summary to definitions in VS code.但是,似乎不可能将摘要折叠为 VS 代码中的定义。 I tried it in vain before long.没多久,我试过了。

Because the summaries are embeded in the assembly(the *.dll file), it is impossible to removed them.因为摘要嵌入在程序集中(*.dll 文件),所以无法删除它们。 Even it is open via F12, it is readonly.即使它是通过 F12 打开的,它也是只读的。

You can try with the following keyboard shortcut:您可以尝试使用以下键盘快捷键:

Ctrl + M + O

If you want to expand again you can use Ctrl + M + L如果要再次展开,可以使用Ctrl + M + L

Alternatively you can try: Edit > Outlining > Collapse to Definitions或者,您可以尝试:编辑 > 大纲 > 折叠到定义在此处输入图像描述

You can check for more similar shortcuts here: https://docs.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019您可以在此处查看更多类似的快捷方式: https://docs.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当按F12进入Visual Studio 2015 / C#中的定义时出现错误 - I got error when press F12 Go to definition in Visual Studio 2015 / C# Visual Studio转到定义(F12)打开对象浏览器而不是代码视图 - Visual Studio Go to Definition (F12) opens Object Browser instead of Code View (函数,全局变量)之间的Visual Studio 2019脚本标记(在cshtml中)转到定义(F12)不起作用 - Visual Studio 2019 script tags (in cshtml) between (function,global variable) go to definition (F12) doesn't work 如何使用F12在Visual Studio中查看C#代码详细信息? - How to see the c# code detail in visual studio using F12? 如何通过单击F12在Visual Studio 2015中查看依赖项的源代码? - How to view source code of dependencies in Visual Studio 2015 by clicking F12? 当使用不同装配中的步骤定义时,转到定义(F12)不起作用 - Go To Definition (F12) not working when step definitions are used from a different assembly VSCode C#“转到定义”(F12)不起作用 - VSCode C# "go to definition" (F12) not working VS2010 C#:如何在按F12键时查看内部​​类的定义? - VS2010 C#: How to view internal classes definitions when I press F12? 如何防止任何人在按F12键时看到方法语句代码? - How to prevent anyone sees method statements code when pressing F12? Visual Studio Dom Explorer和IE F12工具Dom Explorer之间的区别 - Difference between Visual Studio Dom Explorer and I.E. F12 tools Dom Explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM