Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>bracket-padderNew to Visual Studio Code? Get it now.
bracket-padder

bracket-padder

Viable lab

|
39,539 installs
| (3) | Free
Smart whitespace padding & auto-closing for bracket pairs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

bracket-padder

... for Visual Studio Code

A simple package that provides smart whitespace padding and closing of bracket pairs: () [] {}

package gif

Examples

The | character represents cursor position.

Auto padding

(|) + Space results in ( | ) instead of ( |).

Auto closing

( | ) + ) results in ( )| instead of ( )| ).

Other Implementations

  • Atom

Note

This is the result of a short experimentation with the Visual Studio Code API, and there's likely a better solution to solve this problem. The initial approach was to provide commands like "smartCloseCurlyBracket" that would just perform the expected default behavior unless some conditions were met. Ran into trouble here as manually inserting characters didn't play well with the built-in auto-closing of bracket pairs that you normally get when inputting certain characters.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft