VSCode Tips

VSCode tips – How to select everything between brackets or quotes

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

Smart Selection 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

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 quotes
  • Ctrl + K " select everything between double quotes
  • Ctrl + K ` select everything between back ticks
  • Ctrl + K ( select everything inside parenthesis
  • Ctrl + K ) select everything inside parenthesis and include them
  • Ctrl + K [ or ] select everything between square brackets and include them
  • Ctrl + K { or } select everything between curly braces and include them
  • Ctrl + K < or > select everything between angle brackets and include them

Install Extension

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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>