Prettify Sql Output Sublime

I would like to find a package which structures and make SQL output more readable.

For example there is a package Pretty JSON for json files. But I would like to have something that make the spaces between columns the same for rows.

x   true    SOME_LONG_OUTPUT_WHICH_DESTROYS_THE_ORDER   NULL    
y   true     Short_output   NULL

What I would like is something like below:

x   true    SOME_LONG_OUTPUT_WHICH_DESTROYS_THE_ORDER   NULL    
y   true    short_output                                NULL

Is this possible?

1 Answer

Install the AlignTab plugin.

To prettify your example, I pasted your text into Sublime Text 3, pressed Ctrl-Shift-P, typed align to select AlignTab, and typed \s+ into the regex to align by spaces and it did what you wanted.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest