Keyboard shortcut for going to beginning of switch block?
I'm working with a lot of files that have huge `switch` statements, some of these files have multiple `switch` statements that are big (yes, I know it's poorly-coded and these should probably be class objects), and often it's hard to see the context. I want a keyboard shortcut for "go to beginning of switch block or statement", but the keyboard shortcut to go to the beginning of a block (or opening brace) will only do that for the current sub-block in a `case` block (like if the caret is in a function or if/else or for loop etc)...
Did I miss something? Maybe if there isn't or can't be a keyboard shortcut for this, what other way can I try to help better contextualize the case block other than text search or scrolling?
Please sign in to leave a comment.
I can't reproduce that, for me in the following snippet, both
Ctrl+[
(Move Caret to Code Block Start) andCtrl+Shift+M
(Move Caret to Matching Brace) place the caret at the beginning of the switch block.What am I missing?
Your `switch` block is not inside of another block.
Do you think you could create a brief code sample marking where the caret is and where you want it to go? It'd help understand the request greatly. Thanks!