Skip to content

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

Open
@kntao

Description

@kntao

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

Activity

grantmcconnaughey

grantmcconnaughey commented on Jan 8, 2014

@grantmcconnaughey

Same for Mac OS X 10.9.1, Sublime Text 2.

bsiamionau

bsiamionau commented on Jan 11, 2014

@bsiamionau

Windows 7, Sublime 2.0.2, same thing

jonwhittlestone

jonwhittlestone commented on Jan 28, 2014

@jonwhittlestone

Same for Mac OS X 10.9.1, ST3

DBD80

DBD80 commented on Feb 12, 2014

@DBD80

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

bani

bani commented on Feb 12, 2014

@bani

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

iies commented on Feb 19, 2014

@iies

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

adworacz

adworacz commented on Mar 27, 2014

@adworacz

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

osscca

osscca commented on Apr 27, 2014

@osscca

@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

bani commented on Apr 27, 2014

@bani

@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

osscca commented on Apr 29, 2014

@osscca

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

rstackhouse

rstackhouse commented on May 7, 2014

@rstackhouse

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

self-assigned this
on May 7, 2014
travelliu

travelliu commented on Jun 4, 2014

@travelliu

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

adworacz commented on Jun 4, 2014

@adworacz

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

dialex

dialex commented on Jul 19, 2014

@dialex

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

rstackhouse

rstackhouse commented on Jul 24, 2014

@rstackhouse

@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

taeseong commented on Oct 6, 2014

@taeseong

@bani thank you very much!

manyata

manyata commented on Jan 16, 2015

@manyata

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

icalderond

icalderond commented on Feb 22, 2016

@icalderond

Thanks @bani plugging work very well.

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @du-song@bani@rstackhouse@adworacz@DBD80

      Issue actions

        selection 》 Format 》Format SQL Statement is disabled? · Issue #16 · du-song/SublimeFormatSQL