Skip to content
Extension for Visual Studio Code
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Spaces Inside Braces

Reformats braces (and others) as you type.


Spaces braces {}, parentheses (), brackets [], and angle brackets <> as you type.

When { is typed to create a pair of curly braces, the following appears with the cursor in between the two braces.


Pressing space once by default gives the following:

{ |}

By installing this extension, it autoformats to:

{ | }

Removing the space returns the braces to the original state:


The extension works with multiple cursors, however all cursors must either be in a position to space or unspace. Otherwise, normal behaviour will be preserved.


All options are by default enabled.

  • spaces-inside-braces.enable: enable/disable the extension.
  • spaces-inside-braces.enableForBraces: enable/disable spacing for braces.
  • spaces-inside-braces.enableForParens: enable/disable spacing for parentheses.
  • spaces-inside-braces.enableForBrackets: enable/disable spacing for brackets.
  • spaces-inside-braces.enableForAngle: enable/disable spacing for angle brackets.

Known Behaviour

Pressing delete in the following configuration results in the cursor getting reset.

{|  }


{ | }


The icon is from the set "Curly Brackets" by Marek Polakovic from the Noun Project, available at The Noun Project under Creative Commons Attribution 3.0 (CC BY 3.0 US). Full terms at Creative Commons.

The icon was cropped and resized from its original resolution to 128 by 128 pixels.

You can’t perform that action at this time.