Automatically Add Space in Parens/Braces


#1

Though not all follow this convention, I prefer to have spaces around the code in between braces. Many other editors will add the space before the closing brace if you add one after the opening. Atom, so far, not so much.

So this:
{ * }

Instead of this:
{ *}

where * == cursor position

The same could apply to parentheses as well.


#2

Is there a work around for this, while the feature is not implemented?


#3

No progress on this? Maybe a package suggestion?


#4

Bump.

Any progress?


#5

Are there any packages for this?


#6

Try out this package: https://atom.io/packages/spaces-in-braces


#7

Looks like we tackled the same problem at the same time. :grin:

I just created a package that does this and also takes spaces into account when closing parentheses/braces. So that if you have { a: 1| } and type }, it will result in { a: 1 }| instead of { a: 1}| }.