Open mrjoelkemp opened 10 years ago
Thanks for the report. This is unfortunately probably not something that VAlign will be able to do any time soon, since it's much more sophisticated than what it does right now, which is simply aligning rows based on particular alignment characters like = or :.
There's two ways I could see this working. The plugin could attempt to recognize consecutive if statements, but this would require language-specific handling and would become complicated very quickly. It could also attempt to search for the largest matching substring in each row (in this case, throw new Error('expected
) and align those. That would be my preferred approach, although I would need to think about it for a while to figure out what the implications of that would be.
In either case, I don't have a whole lot of time to work on the plugin at the moment. If you or anyone else would like to add support for this, I'd be happy to take a look at any pull requests.
Expected:
Instead, valign did nothing to indent those lines.