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.
{|}
^cursor
Pressing space once by default gives the following:
{ |}
^cursor
By installing this extension, it autoformats to:
{ | }
^cursor
Removing the space returns the braces to the original state:
{|}
^cursor
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.
Pressing delete in the following configuration results in the cursor getting reset.
{| }
^cursor
to
{ | }
^cursor
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.