-
Notifications
You must be signed in to change notification settings - Fork 109
Patch to sublime_alignment to allow user to configure how key, separator, varspace, and value are positioned #42
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
base: master
Are you sure you want to change the base?
Conversation
|
@wbond: I know you're busy with all the package control stuff for ST3, but have you had a chance to look at this yet? |
… separator, and value end up.
|
I really like the idea from #27 so I modified my code to allow sublime_alignment to do all 3 of the following: // This plugin can align the selected lines in a number of ways.
// background-color: black;
// color: white;
// "alignment_format": "key-separator-varspace-value"
// ... or ...
// background-color: black;
// color: white;
// "alignment_format": "varspace-key-separator-value"
// ... or the default ...
// background-color: black;
// color : white;
"alignment_format": "key-varspace-separator-value" |
|
Looks good - going to be handy :-) |
|
Please merge this |
|
I like the change, but...is it hard to make both situations work? and for JS: Unfortunately I cannot use both options at the same time. Is it possible that it will do the key/value alignment based on key-separator-varspace-value |
|
Let's get this merged. |
|
@eric, you mean you can make this work? That would be awesome |
|
Well, at the time, I was just showing that there was still interest in this pull. However, since writing that, I forked this repo and pulled in a number of the currently pending pull requests, including this one. It works fairly well I'd say. You should be able to have two different alignment options by editing |
|
I have set the the javascript.sublime-settings as: But in CSS it is mid aligning the : which I do not want, in JS it is mid-aligning the = which is good, but it is also mid-aligning the : which I would not like |
|
Hmm, I couldn't get it to work either. I'll have to see if I can figure out why. |
|
Glad you had the same result |
|
👍 on getting this into the main project. I hacked together essentially the same solution for my own needs, but would love to see this get in. How can I help? |
|
👍 Except alignment_format should be for each alignment_char "alignment_chars": [
"=": "key-varspace-separator-value",
":": "key-separator-varspace-value"
]
//or
"alignment_chars": [
{
"char": "=",
"format": "key-varspace-separator-value"
},
{
"char": ":",
"format": "key-separator-varspace-value"
},
] |
|
👍 I would love to see this being merged in the near future. |
|
+1 |
|
👍 for merge, please! |
|
please make it real :) ! 👍 btw: how about that? |
|
Any news on this? |
This change satisfies my need that I requested at #37 and also adds the functionality that was requested at #27
Namely, it adds a new config option called alignment_format to allow for the following possible alignment configurations:
Thanks!