Reputation: 1104
This is Visual Studio Code question regarding shortcut. I know I can jump between match tag using CTRL+SHIFT+{
But how to jump from bracket (from here) to bracket (to here)? I mean go to closest parent's bracket. Possible?
a: { //to here
b: {
},
c: function() { //not here
}, //from here
}
Alternatively if not possible, any shortcut to close all siblings bracket? So that I can quickly know the parent? Or get the parent's info (eg function name or line number)
Upvotes: 2
Views: 4370
Reputation: 459
As per default this shortcut is not set, but it's possible to set:
Preferences: Open Keyboard Shortcuts
Go to Parent Fold
. In the When
column, I set editorFocus
.Alternatively you can edit the keybindings.json
, e.g. via Preferences: Open Keyboard Shortcuts (JSON)
and add
{
"key": "<your_keybinding>",
"command": "editor.gotoParentFold",
"when": "editorFocus"
}
Upvotes: 0
Reputation: 1104
I post same question at many places. So 1 of them came back with solution.
Open the Command Palette (Ctrl+Shift+P), select "Go To Parent Fold".
Upvotes: 15