Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Close Any BracketNew to Visual Studio Code? Get it now.
Close Any Bracket

Close Any Bracket

Christian Pulvermacher

|
3,131 installs
| (0) | Free
Automatically close open braces, brackets, or parentheses in the right order.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Close Any Bracket

Latest Release Installs Status License

A Visual Studio Code extension to automatically close open braces, brackets, or parentheses in the right order.

Demo

You may find this particularly useful with callback-heavy languages or frameworks (e.g. jest, vitest) or in conjunction with Copilot tools that are inconsistent in the amount of context they close at the end of a completion.

Features

  • Close all open brackets to current indent - Automatically closes all unclosed (, [, or { at the current line's indentation level or deeper. (Default shortcut: Alt+Shift+Enter, Mac: Control+Shift+Enter)
  • Close last open (, [, or { - Closes the most recently opened (, [, or { that has not been closed yet. (Default shortcut Alt+], Mac: Control+])
  • Detects whether brackets are already closed after the cursor and avoids closing them again. (Configurable using Close Any Bracket: Ignore Already Closed, default: enabled)
  • Supports close to 300 languages including JavaScript, TypeScript, CSS, JSON, Python, Java, Go, C/C++/C#, HTML (with embedded JavaScript or CSS), Nix, TeX, Awk, JSX, TSX, Vue, Svelte.

Limitations

  • Brackets are inserted at the cursor position without any regard for aesthetics, so this works best if combined with automatic formatting.
  • Some nested structures like template strings may not work well, in particular if the syntax is not valid while you're editing.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft