jarod2d / sublime_valign

Vertical alignment plugin for Sublime Text 2 and 3
91 stars 7 forks source link

Doesn't respond well to line breaks #14

Open Givemeyourgits opened 11 years ago

Givemeyourgits commented 11 years ago

If I select the following text

local a = "5" local b = "6"

local d = "15

It will only align a & b, but will ignore c.

jarod2d commented 11 years ago

Apologies for the late reply. It's intentional that the plugin stops trying to align at line breaks. A setting could be added to configure whether line breaks are ignored, although I unfortunately don't have time to work on the plugin at the moment. I'll leave this open for when I have more free time, or I'd be happy to merge a pull request if you or anyone else wants to add the setting.

Givemeyourgits commented 11 years ago

Is the change simple? I don’t know Python and looked through the code but couldn’t figure out what would need to be changed to allow looking over new lines.

All I care about is variable definitions to span new lines.

So the following

Local a = ‘a’ Local abc = ‘abc

Local zyz = ‘zyz’

Would see them all, and not just the first two. The problem is if I goto the second group and hit the Control \ again, it won’t align to the top set, it is independent of the first group’s alignment and ends up looking goofy. So I have to remove all new lines, align, then group them again.