The issue I am referring to is the indentation behavior of lists and other things in Python when on two lines. The result I am looking for is for Sublime to automatically indent like this example, making the code a little prettier:
def testmethod(argument1, argument2,
argument3, argument4):
pass
But in Sublime, when you press enter after line 1, and then type the remaining arguments, this happens:
def testmethod(argument1, argument2,
argument3, argument4):
pass
Obviously, this isn't very readable (and uncompliant with PEP 8 style conventions). I Googled around and found a few unresolved threads, no solutions. Running latest version of Sublime Text 2, on a Mac. Any help would be appreciated.
Sublime Text can be used for much more than Python development and there are many useful tutorials that are not targeted at a specific programming language which are still useful. Super charge your Sublime Text 3 to increase your productivity provides many shortcuts and tricks for using the editor.
Sublime Text 4 is the current version of Sublime Text. For bleeding-edge releases, see the dev builds. Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.
The first stable release of Sublime Text 4 has finally arrived! We've worked hard on providing improvements without losing focus on what makes Sublime Text great. There are some new major features that we hope will significantly improve your workflow and a countless number of minor improvements across the board.
This can (partially) be fixed by adding:
"indent_to_bracket": true
to your Packages/User/Preferences.sublime-settings
file (linux). But unfortunetly it currently only seems to work for ()
, and not {}[]
.
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