I had the same needs occasionally, and I see two solutions:
First:
- Go through all relevant lines, and repeatedly use 'parse rest with start rest' until 'rest' is empty. For every iteration note the strlen of 'start' to find out the longest item in that position.
- set the tabstops to be further apart than the longest items in each position
- replace every whitespace with _one_ tab, therewith aligning all columns
- if required, use 'tab2space'
Or second:
- Replace all tabs with spaces
- on ech line, replace the first sequence of spaces with a (fixed) sequence large enough to make column one and the rest disjunct (column two will still have a ragged left side)
- go to the first element, in a column position one beyond the legth of the longest first column element, and start a block selection there, extending until the last line with a width to encompass the full ragged left side for all lines
- Use a regex to delete all spaces _within_ the selection before the second column, thereby aligning column two.
- Repeat for all columns
For a macro, the first method is easier and more foolproof, for manual execution the second method is easier. I currently do not have the time to develop this into a full-fledged macro, but since I occasionally need it myself, I might get round to it in the next few weeks, if still needed.
FWIW,
Johan