microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.86k stars 29.51k forks source link

Feature request: Editor: Jump to Next/ Prev Sibling. and Jump to parent, child #234283

Open ar-daniel opened 1 week ago

ar-daniel commented 1 week ago

We can have editor.action.jumpToNextSibling and editor.action.jumpToPrevSibling This moves the cursor to the word end of next or previous symbol at the same nest level

eg, on executing this action

if there are no lines to skip, ie there are no child or nesting or inner scope of a line the action simply moves to the symbol in the next line ( cursor at end of symbol name ) like in case of list of variable declaration, moves to end of next declaration variable name

jump to parent (editor.action.jumpToParent)

jump to child (editor.action.jumpToChild)

This is could be great feature in code navigation. as in large code bases or files with lot of lines, we can quickly move to corresponding else block with different if/ else in between, or in deeply nested json object ( navigate to subsequent keys at a particular inner nest level ), etc

Thank you

camachomarco commented 2 days ago

Been looking for this. This would be amazing.