Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection 》 Format 》Format SQL Statement is disabled? #16

Open
kntao opened this issue Jan 2, 2014 · 18 comments
Open

selection 》 Format 》Format SQL Statement is disabled? #16

kntao opened this issue Jan 2, 2014 · 18 comments
Assignees

Comments

@kntao
Copy link

kntao commented Jan 2, 2014

on windows platform, why ”Format SQL Statement“ button is disabled?

@grantmcconnaughey
Copy link

Same for Mac OS X 10.9.1, Sublime Text 2.

@bsiamionau
Copy link

Windows 7, Sublime 2.0.2, same thing

@jonwhittlestone
Copy link

Same for Mac OS X 10.9.1, ST3

@DBD80
Copy link

DBD80 commented Feb 12, 2014

Got same the same issue on Win 7, Sublime Text 2, v 2.0.2, Build: 2221

@bani
Copy link

bani commented Feb 12, 2014

In case anyone is interested, I created a fork that works with Sublime 2:
https://github.com/bani/SublimeFormatSQL
If you are using the package manager you can add this repository.

@iies
Copy link

iies commented Feb 19, 2014

Me too, Mac OSX 10.9.1 / ST2.0.2
but bani's repository is worked! thanks bani.

@adworacz
Copy link

How do you install Bani's version using the package manager?

@osscca
Copy link

osscca commented Apr 27, 2014

@bani Your fork works perfect in ST2! When will ST3 be supported?

@adworacz This is explained on the Package Control website: https://sublime.wbond.net/docs/usage

@bani
Copy link

bani commented Apr 27, 2014

@osscca Apparently supporting both versions is tricky. I don't use ST3, so it's not in my plans.
The last work done for ST3 support seems to be #12 by @kgantsov

@osscca
Copy link

osscca commented Apr 29, 2014

Thanks @bani. I've done some additional testing and apparently this version works correct in ST3 on Windows, but not on OS X.

@rstackhouse
Copy link

Got same the same issue on OS X Maviercks, Sublime Text 2, v 2.0.2, Build: 2221

@du-song du-song self-assigned this May 7, 2014
@travelliu
Copy link

mac os 10.9.3 sublime 3
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 73, in reload_plugin
m = importlib.import_module(modulename)
File "X/importlib/init.py", line 88, in import_module
File "", line 1577, in _gcd_import
File "", line 1558, in _find_and_load
File "", line 1525, in _find_and_load_unlocked
File "", line 586, in _check_name_wrapper
File "", line 1023, in load_module
File "", line 1004, in load_module
File "", line 562, in module_for_loader_wrapper
File "", line 869, in _load_module
File "", line 313, in _call_with_frames_removed
File "/Users/Travel/Library/Application Support/Sublime Text 3/Packages/SublimeFormatSQL/FormatSQL.py", line 6, in
from .sqlparse import format
File "/Users/Travel/Library/Application Support/Sublime Text 3/Packages/SublimeFormatSQL/sqlparse/init.py", line 13, in
from sqlparse import engine
ImportError: No module named 'sqlparse'
plugins loaded

@adworacz
Copy link

adworacz commented Jun 4, 2014

Read the README for this project. It specifically says to have the python sqlparse library installed. This will fix your issue.

@dialex
Copy link

dialex commented Jul 19, 2014

Don't even worry and switch to SQLBeautifier. Works for ST2/3 and doesn't force you to install python. Cheers ;)

@rstackhouse
Copy link

@dialex The docs disagree with you.

This is a SQL formatter plugin using python-sqlparse for both Sublime 2 and 3.

I have had much better luck with SQLBeautifier though. sqlparse is just a pip install python away though.

@taeseong
Copy link

taeseong commented Oct 6, 2014

@bani thank you very much!

@manyata
Copy link

manyata commented Jan 16, 2015

@bani seems to crash on ST2 .. if i press Command+S twice on a selection.

@icalderond
Copy link

Thanks @bani plugging work very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests