adrianlee44 / atom-aligner

Easily align multi-line with support for different operators and custom configurations
https://atom.io/packages/aligner
MIT License
78 stars 3 forks source link

Aligning object keys differently #10

Closed ShimShamSam closed 9 years ago

ShimShamSam commented 10 years ago

I'd like to see an option to align objects keys like so:

var foo = {
    test    : 1,
    testing : 2
}

Instead of

var foo = {
    test:    1,
    testing: 2
}

Also, note that there is always at least 1 space before the colons. I would think this could pretty much copy the exact logic used for "="

adrianlee44 commented 10 years ago

This is definitely one of the TODOs I'm working on and will probably have an update in a week.

QuentinRoy commented 9 years ago

+1 (longest week ever ! :-D)

adrianlee44 commented 9 years ago

Thanks for reminding me on this as I completely forgot about it.

ShimShamSam commented 9 years ago

I think this is the first package to support this option. Looking forward to the release!

adrianlee44 commented 9 years ago

I'm still working on the README but should be releasing this very soon. The release should give the user the option to either pad left or right of the operator and if one extra whitespace should be added to the left or right.

adrianlee44 commented 9 years ago

@ShimShamSam, @QuentinRoy

vertical-align has been bumped to v0.8.0 with custom configuration support. After updated the package and restarted Atom, you can find all the options in vertical-align setting page.

More information can be found here, https://github.com/adrianlee44/atom-vertical-align/wiki/User-configurations

Please let me know if you run into any bugs.