Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for aligning with declaration words (let,var,const,etc.) #94

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

sylido
Copy link

@sylido sylido commented Feb 19, 2020

This seems to solve the main problem I was having with this package for a while, being able to select all my vars and use the alignment to auto-align.

The declaration words are customizable through the new declarations field in the settings file, by default those are the "var", "let", "const" ones.

Added : to the list of defailt alignment characters as it is very useful for json formatting. The : will now also get an empty space in front and behind it as well.

Can format a whole file correctly as well, but it's buggy with longer files. Just have to not select anything in the file to trigger that with the same shortcut.

Includes fixes from some other PRs in the hope of getting this reviewed and merged in.

Have tested it for a year+ without having any issues with my usual workflow.

vanrijn and others added 22 commits March 9, 2013 18:11
Fixed the 'unassigned' variables bug
Update with a bunch of PRs
More useful handling of multiple selection
…faults - they are configurable through the settings.

Now aligning all rows based on the row that has the declaration statement.
If there are more than one spaces/tabs after the declaration they get trimmed to only one.

To be able to format correctly, you currently have to run the alignment twice - to be fixed in a future version.

Reformatted some code and aligned all the variables with this plugin.
…ly format the text.

Worked on formatting multi-character operators better.
Added a setting to turn on/off whole file alignment as it's currently buggy.
…ers in a string before the real alignment character i.e. "xml:ns" : "something" would be now aligned properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants