If you are looking for a quick way to select everything between matching brackets or quotes in VSCode, the following VSCode tips are for you.
Smart Select in VSCode
The build in keyboard shortcut for smartSelect is:
Shift + Alt + Right Arrow
This will grow your selection and smartly select everything between the matching brackets or quotes.
If you press this keyboard shortcut multiple times your selection will grow to the next matching brackets or tag.
If you want to shrink your selection use:
Shift + Alt + Left Arrow
Quick and Simple Text Selection
The build in keyboard shortcuts are great but if you want even more control over your selection checkout the Quick and Simple Text Selection extension by David Bankier.
What I like the most about this extension is the ability to choose everything inside of a single quotes, double quotes, back ticks, brackets, square brackets or tag with a single keyboard shortcut.
What can be done by repeating the build in shortcut can be done with a single keyboard shortcut using this extension.
This extension lets you to:
Ctrl + K '
select everything between single quotesCtrl + K "
select everything between double quotesCtrl + K `
select everything between back ticksCtrl + K (
select everything inside parenthesisCtrl + K )
select everything inside parenthesis and include themCtrl + K [ or ]
select everything between square brackets and include themCtrl + K { or }
select everything between curly braces and include themCtrl + K < or >
select everything between angle brackets and include them
Conclusion
Hope you have found this VSCode tip useful.
Do you use any other extensions that lets you to quickly select code in VSCode?
Let me know in the comments below.
Related VSCode Tips
Like What You're Reading?
Sign up to receive my future tutorials and demos straight to your inbox.
No spam, Unsubscribe at any time.
Wow! Very useful.
This is remind me of vim. In vim, you can select by using type “v i” follows by quote, parenthesis, etc.
Hello, thank you very much, I was looking for something like that a long time ago. I didn’t think it existed as an extension. How very grateful.