TaoK / PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
946 stars 266 forks source link

Sublime Text plugin? #171

Open TaoK opened 6 years ago

TaoK commented 6 years ago

Timothy Kim asks whether there is a Sublime Text plugin.

While there isn't, there is a command-line formatter (for windows by default - compiling in linux/mono may be not-entirely trivial, it's untested in the last 4 years). With the command-line formatter and some sort of "Invoke Command" glue in sublime text, in-place formatting should be straightforward to achieve.

One sublime text plugin that provides such "Invoke Command" functionality (using STDIN and STDOUT, as supported by the command-line formatter) is "FilterPipes": https://packagecontrol.io/packages/FilterPipes

So it looks like there should be a pretty straightforward workaround... but I haven't tested.

TaoK commented 6 years ago

Nripin Babu had requested the same, much earlier.

TaoK commented 6 years ago

Given the (likely?) possibility/probability of a workaround, this seems hard to justify prioritizing.

Especially with the recent Node/JS-based command-line formatter utility available on any OS ( https://www.npmjs.com/package/poor-mans-t-sql-formatter-cli ), a pipe-based approach seems perfectly acceptable.