Often I have code that I want to align based on similar structure of lines, not just the left-side auto indent. Is there a script out there that can do something like this? Here is an example of what I want to do. Given:
self.colorOfBackground =? colorOfBackground self.colorOfLineForTime =? colorOfLineForTime self.marginOnBottom =? marginOnBottom self.marginOnTop =? marginOnTop ...
I want to run a script and align each "column" on a tab so that they are aligned and easier to visually parse:
self.colorOfBackground =? colorOfBackground self.colorOfLineForTime =? colorOfLineForTime self.marginOnBottom =? marginOnBottom self.marginOnTop =? marginOnTop ...
I am thinking that a Perl or Python or AWK or some other scripting language could do this, but alas I know none of these. Till now I have been using Vim and its regex based substitution capabilities but I still spend most of the time manually spacing out the columns.
tbl
andnroff
to format things how you like in monospaced ASCII, Been a while since I used them, so I can't make a detailed answer"foo bar"
) or comments or anything else in your input file that might contain blanks that you do not want to be considered "column" separators?