Closed gadenbuie closed 6 years ago
Looks great! Since you did quite a bit of work, I will add you as an author.
This technique seems very relevant to the newer (and very experimental) AlignRegex package. I'm dreadfully slow at these things, so it may be a few weeks before I started experimenting around with that package.
First, thank you for this addin! I use it daily and it's saved me a bunch of time. I've made a few changes to the addin based on my workflow, and I figured I'd at least offer my changes as a PR. If you're interested I can also update README and other things, if not then no worries and feel free to close this.
Given that I use the addin a lot, I decided to streamline the interface a bit and I added a heuristic to guess the operator that should be aligned. With the heuristic in place, I can just select "Align Assign" and the addin chooses the most reasonable operator to align.
For disambiguation, I also renamed the addins in the menu:
Align Assign
: Guesses operator to alignAlign Assign Arrow
: Aligns arrows (replaces currentAlign Assign
)Align Assign Equal
: Aligns equals (replaces currentAlign Assign 2
)The heuristic is basically the following rules applied in this order:
<-
with warning message in the console.