2

How can I collapse only current method which cursor is currently located in its block inside VS2019(Windows)?

I know about Ctrl+M,Ctrl+O but I want shortcut for to collapse only one method not more.

VSB
  • 9,825
  • 16
  • 72
  • 145
  • Does this answer your question? [Collapse all methods in Visual Studio Code](https://stackoverflow.com/questions/42660670/collapse-all-methods-in-visual-studio-code) – Aviternus Dec 05 '19 at 06:35
  • https://learn.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019 – Herohtar Dec 05 '19 at 06:39
  • @Herohtar I could not find the correct shortcut in documentaions – VSB Dec 05 '19 at 06:43
  • In addition to that document, a Google search for [exactly what you want to do](https://www.google.com/search?q=Visual+Studio+2019+collapse+current+method) returns [this page](https://learn.microsoft.com/en-us/visualstudio/ide/outlining?view=vs-2019) which gives the correct answer in the third sentence on the page. – Herohtar Dec 05 '19 at 06:45

4 Answers4

3

please use below shortcut to collapse one method CTL+M+M

Hari
  • 134
  • 5
0

you can use Ctrl+M+M, resolve your problem

0

CTL+M+M collapses only the method that your cursor is blinking on. This other thread has more information on Visual Studio shortcuts.

Aviternus
  • 45
  • 7
-2

you can use ctrl + shift + [, this might work

Ved
  • 716
  • 4
  • 8