Bracketeer: A VS Code Extension You Didn’t Know You Needed

Recently, while working on a client project, I ran into an issue. I needed to take JSON formatted code and turn it into a format that Terraform would accept in their provided JSON encode function. This required removing a lot of quotation marks and replacing colons with equal signs. Sure, I could do this manually, and it would take a long time. But, I knew there must be a solution that would let me remove the quotation marks in a single keystroke. Enter the VS Code extension Bracketeer.

Helpful Shortcuts

Bracketeer is a VS Code extension that claims to give you “brackets and quotes superpowers at the tip of your fingers.” This extension provides the user with a handful of helpful keyboard shortcuts that let you manipulate quotes and brackets with simple keystrokes.

My immediate use case for this extension was removing the quotation marks surrounding the keys in the AWS-generated JSON. After looking through a bit more of the provided keyboard shortcuts, though, a few specific examples stood out to me.

  • Deleting quotes surrounding text : Shift+Cmd+Alt+’. This was my primary use case for this extension.
  • Swapping quotes : Shift+Cmd+Alt+;. This can be useful if you have a standard string and want to swap it to a template string. This command will rotate through the various quotes including the back-tick used for template strings.
  • Swapping brackets : Shift+Cmd+Alt+K. Use this one when you want to rotate through the different bracket styles!

Pairing Bracketeer with Other Extensions

While it does require adding an extension to your VS Code environment, it might save you a ton of time if you give Bracketeer a chance and learn some of the shortcuts! Pair this with some of my other favorite extensions including change-case, Auto Add Brackets in String Interpolation, and Live Server, and your productivity will certainly increase.

Conversation

Join the conversation

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