I am trying to find some package that would auto format python code when using sublime.
There is PythonTidy, but when I use PackageController it says install completed but the package is not installed (does not appear in preferences).
I did try following the instructions in: https://github.com/witsch/SublimePythonTidy
and while i "pip installed" the package in python, sublime would not load, throwing:
terminate called after throwing an instance of 'boost::python::error_already_set'
/usr/bin/subl: line 3: 12415 Aborted
/usr/lib/sublime-text-2/sublime_text --class=sublime-text-2 "$@"
How would I go about installing this without PackageController, or alternatively, can anyone recommend another package?
Beautify on Save sublime-settings : Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X.
Just select all lines ( CTRL + A ) and then from the menu select Edit → Line → Reindent. This will work if your file is saved with an extension that contains HTML like . html or . php .
ctrl+shift+P then Package Control: Install Package
Look for Python PEP8 Autoformat
and install it.
Try doing the following in command line (a bit brute force):
Packages/PythonTidy
folder,~/.config/sublime-text-2/Packages/PythonTidy
~/.config/sublime-text-2/Packages/SublimePythonTidy
Package Control
PythonTidy
folder (which in your case will be empty).git clone https://github.com/witsch/PythonTidy.git
View
-> Show Console
)P.S.
If you are unable to start Sublime
do a:
sudo pip uninstall PythonTidy
Then retry what I wrote above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With