Home Download Buy Blog Forum Support

SQL Formatting Plugin

SQL Formatting Plugin

Postby freewizard on Mon Jan 02, 2012 6:54 pm

Hi,

I've written a plugin that formats long SQL statement to a more readable form by using python-sqlparse library.

You may install via Package Control, or find manual setup instructions and examples here: https://github.com/freewizard/SublimeFormatSQL
using Sublime Text 3 dev in OS X 10.8
my ST packages: https://github.com/freewizard
freewizard
 
Posts: 36
Joined: Wed Feb 09, 2011 4:14 am

Re: SQL Formatting Plugin

Postby theadamlt on Tue Jan 03, 2012 8:54 pm

Hi,

I just installed this plugin, but i can't make it work. When i select my SQL statement in a PHP file and click menu "Selection", i don't see any menu called "Format". I'm running Ubuntu 11.10 32bit.

Thank you for creating an awesome plugin like this :)

Thank you in advance
Adam
theadamlt
 
Posts: 5
Joined: Thu Dec 22, 2011 1:39 pm

Re: SQL Formatting Plugin

Postby freewizard on Sat Jan 07, 2012 6:21 am

theadamlt wrote:Hi,

I just installed this plugin, but i can't make it work. When i select my SQL statement in a PHP file and click menu "Selection", i don't see any menu called "Format". I'm running Ubuntu 11.10 32bit.

Thank you for creating an awesome plugin like this :)

Thank you in advance
Adam


Hi,
I tested it with a fresh installed latest dev build (b2160) on my Mac and works ok.

As a troubleshooting step, could you open console and see if the plugin get loaded like this without any error:
Code: Select all
Reloading plugin /Users/xxxx/Library/Application Support/Sublime Text 2/Packages/Format SQL/FormatSQL.py


Also if it did load, can you check if the key bind config mentioned in the web site works?
using Sublime Text 3 dev in OS X 10.8
my ST packages: https://github.com/freewizard
freewizard
 
Posts: 36
Joined: Wed Feb 09, 2011 4:14 am

Re: SQL Formatting Plugin

Postby jtreher on Thu Mar 08, 2012 6:43 pm

Hello. Thanks for the plugin.

Of note, this seems to have problems whenever brackets are present. I had to remove all of my brackets from the sql for it to work.
jtreher
 
Posts: 7
Joined: Mon Mar 05, 2012 3:37 pm

Re: SQL Formatting Plugin

Postby thecrumb on Fri Mar 09, 2012 1:14 pm

This is a great plugin!

Anyone know if it's possible to get comma first formatting with this?

select joe
, bob
, sue

I've tinkered with the settings but so far no luck.

Thanks for great plugin, it's a huge timesaver!

Jim
thecrumb
 
Posts: 15
Joined: Tue Nov 01, 2011 8:59 pm

Re: SQL Formatting Plugin

Postby arul.prashanth on Fri Apr 18, 2014 7:46 pm

Hi,

Am trying to install Format SQL in Sublime Text 3 but Format SQL is not getting listed in Install Package.

Thanks in advance
arul.prashanth
 
Posts: 1
Joined: Fri Apr 18, 2014 7:42 pm

Re: SQL Formatting Plugin

Postby jordan on Sun Apr 20, 2014 10:06 pm

Hello, I found a way to add this to Sublime Text 3, and it appears to be working well.

With package manger installed, you can add a repository. Command is Package Contrl: Add repository

You will want to add https://github.com/freewizard/SublimeFormatSQL

And then you can install the sublimeformatsql package.

For a detailed walkthrough of adding a repository, see http://www.macdrifter.com/2012/08/insta ... ithub.html

Hope that helps.
jordan
 
Posts: 1
Joined: Sat Jul 13, 2013 11:49 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 21 guests