Visual Studio Jump to Beginning of Function

前端 未结 7 891
情书的邮戳
情书的邮戳 2021-02-05 00:48

I know that Ctrl+} will take you to the corresponding brace in Visual Studio, but say I\'m in the middle of a gigantic function and I don\'t know where the

7条回答
  •  余生分开走
    2021-02-05 01:40

    Alt+Ctrl+UP,Tab,Tab,Enter
    This sequence will move you through Project selctor > Scope selector > Function selector > Current Function.

    Ctrl+M,Ctrl+M
    This sequence will toggle between collapse/expand current block.
    Place cursor at any line that is immediately enclosed by the function. Collapse. Place cursor at the end of the collapsed function, i.e after { ... }. Expand the function to get to its last brace.

    Note:
    If you have difficulty in finding a line immediately enclosed by the function(for example, when the function has lots of nested blocks), you can always goto the beginning to collapse the function.

提交回复
热议问题