-
Notifications
You must be signed in to change notification settings - Fork 121
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
Align to Nearest Tabstop #58
Comments
I would like to second this. It shouldn't just use "nearest" btw, it should allow some way to specify how many stops out. One way might be to preserve the spacing that precedes the delimiter of the chosen referent line, instead of collapsing it to one space. At least this allows a manual workaround (to manually place the delimiter of the longest identifier at the desired column) that won't get eaten by the alignment operation. Just don't move the delimiter to the left, leave it where it is (and as before, move the delimiters at lesser offsets to the right to align them)
could become:
where today it is always:
if we could add an ordinal somehow to say "space out this many tab stops" that would be even better but allowing manual placement of the furthest-offset one would provide a workaround... (@orbisvicis I think maybe the issue should be re-described here in your first comment, instead of just referring to another project. The text of the linked issue doesn't really make sense anyways for this plugin because it uses a totally different syntax.) |
Thanks for the suggestion. But I don't think I'll have time for this at the moment. And this plugin is already quite complex with many number of options, adding another one while making sure that it's compatible with the pre-existing ones is not going to be trivial. FYI, easy-align sees the snippet in the following way
Note that the length of delimiter is variable and we also need to consider how it should behave when |
In case you guys are still interested. I hacked this plugin to tab align after the delimiter. This solution is by no means correct or complete, but it will align stuff after the delimiter on tab boundaries, based on the current tabstop setting. Currently, this behavior is on all the time, and has no real integration with any of the other formatting options that deal with spacing between the delimiter and right-hand side tokens. If this looks like it's headed in the right direction, I'd appreciate any help or feedback about how to take this feature the rest of the way. So, something like
becomes
|
I opened godlygeek/tabular#38 before discovering this project, but I think the same issue applies. Any thoughts?
The text was updated successfully, but these errors were encountered: