How to jump to the beginning of function/class/namespace while editing a c++ file in Visual Studio Code? Do I need to install any extensions?
Asked
Active
Viewed 661 times
1
-
1The only shortcut you can use (that I am aware of) is `Ctrl + M, Ctrl + S` which will collapse the current region (function, class, namespace, etc) and then the beginning of the region will be visible to you. – DimChtz Oct 30 '17 at 12:51
-
@DimChtz, thank you, but they seem to do nothing. I am using VS Code version 1.17.1 on Windows 10, C/C++ extension installed. Do I need any other extension? – NameOfTheRose Oct 30 '17 at 13:02
-
Sorry, just saw you were talking about visual studio code. I was talking about Visual Studio. – DimChtz Oct 30 '17 at 13:05
-
Yeah, I know it's not what you need. It was just the closest I knew. – DimChtz Oct 30 '17 at 15:59
-
@DimChtz, I did not know that `Collapse` is the appropriate term, the function exists, only the shortcut is different. [How do I collapse sections of code in Visual Studio Code for Windows](https://stackoverflow.com/questions/30067767/how-do-i-collapse-sections-of-code-in-visual-studio-code-for-windows). It comes very close to what I had in mind, only point is that a subsequent expand will not bring back to original point. Even so it is great help. Thank you again – NameOfTheRose Oct 30 '17 at 16:07