Stephon Harris
Stephon Harris

Reputation: 81

How do I select text inside of braces in Visual Studio Code?

In Atom I can select inside of brackets with CMD+CTRL+M. How can I do this in Visual Studio Code? I've checked the keyboard bindings, but didn't find anything.

Upvotes: 6

Views: 5994

Answers (2)

SridharKritha
SridharKritha

Reputation: 9651

Shift+Alt+Right for selecting all text inside the braces.

CTRL+Shift+\ for jumping between opening/closing braces (or) parentheses.

Upvotes: 4

kwood
kwood

Reputation: 10964

There are 2 even better alternative commands in the keybinding file you might want to check out:

editor.action.smartSelect.grow

and

editor.action.smartSelect.shrink

They select everything in between the next boundary (quotes, brackets, curly braces...) and the selection grows to the next boundary when you hit the shortcut again.

Default shortcut is ctrl+shift+cmd+right / ctrl+shift+cmd+left, which is a bit too "finger heavy" for my taste, so you might want to rebind it (I use ctrl+up / ctrl+down).

Upvotes: 9

Related Questions