1

Could you please help me to hide the summary comments when I press F12 (Go to definition) in Visual Studio Code? I do not want to see summary comments as they are too long.

Could you please help me see only declarations of classes, methods, e.g. but not summary comments? There is the screen when I press F12 on int.

code sample

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88

2 Answers2

2

You can try with the following keyboard shortcut:

Ctrl + M + O

If you want to expand again you can use Ctrl + M + L

Alternatively you can try: Edit > Outlining > Collapse to Definitions enter image description here

You can check for more similar shortcuts here: https://learn.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019

Dobromir Ivanov
  • 313
  • 4
  • 12
  • I do not have "Outlining" popup in Visual studio code, also, unfortunately, Ctrl+M+O does not work for me. I checked shortcuts in File=>Preferencies=>Keyboard Shortcuts, I do not have this shortcut – Yuliia Serhiienko Apr 17 '21 at 12:49
  • Oh sorry, my mistake, I just saw that you are using visual studio code, not visual studio. Check this post -> might help you. From what I read it looks like the shortcut is `Ctrl + K + 0` https://stackoverflow.com/questions/30067767/how-do-i-collapse-sections-of-code-in-visual-studio-code-for-windows – Dobromir Ivanov Apr 17 '21 at 13:02
  • I have this shortcut for folding. When I press it, nothing happens. Folding is not what I need, I want completely do not to see comments in metadata, only declarations of classes, methods, properties, e.g – Yuliia Serhiienko Apr 17 '21 at 13:27
2

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.

enter image description here

However, it seems impossilbe to collapse the summary to definitions in VS code. I tried it in vain before long.

Because the summaries are embeded in the assembly(the *.dll file), it is impossible to removed them. Even it is open via F12, it is readonly.

Jeff
  • 126
  • 4