AlignTab icon indicating copy to clipboard operation
AlignTab copied to clipboard

Question about targeting areas to align

Open diVineProportion opened this issue 6 years ago • 3 comments

I'm curious if one is able to align by, say comma, but only align to the commas in the section defined by another regex. So i can perform aligntab on the whole document, but have it align in sections

Figured an example would best express my question

-------------------------------------------------------------------------------
actions\systemStats
-------------------------------------------------------------------------------
    {name = "foobarfoobarfoobarfoobarfoobar", type = "text", def="event_name" } 
    {name = "barfoobarfoobarfoobar", type = "text", def="event_name" } 

-------------------------------------------------------------------------------
actions\tacticalMapControl
-------------------------------------------------------------------------------
    {name = "follow_player", type="bool", def = false}
    {name = "use_scale", type = "bool", def = false}
    {name = "scale", type = "point2", def = [5000, 5000]}

So idea output would be

actions\systemStats
-------------------------------------------------------------------------------
    {name = "foobarfoobarfoobarfoobarfoobar" , type = "text" , def="event_name" }
    {name = "barfoobarfoobarfoobar"          , type = "text" , def="event_name" }
-------------------------------------------------------------------------------
actions\tacticalMapControl
-------------------------------------------------------------------------------
    {name = "follow_player" , type="bool"     , def = false}
    {name = "use_scale"     , type = "bool"   , def = false}
    {name = "scale"         , type = "point2" , def = [5000  , 5000]}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

diVineProportion avatar May 19 '18 23:05 diVineProportion

You could either use the automatic line detection or select the region to align.

randy3k avatar May 19 '18 23:05 randy3k

too many sections to do it select them one at a time. Is automatic line detection smart detection?

diVineProportion avatar May 19 '18 23:05 diVineProportion

yes, then there is no better option now.

randy3k avatar May 20 '18 00:05 randy3k