Has anyone come up with a continuation of the fix line (Python style) in Sublime Text 2?

The problem I'm talking about is the behavior of indented lists and other things in Python when on two lines. The result I'm looking for is for Sublime to automatically indent, as in this example, which makes the code a bit prettier:

def testmethod(argument1, argument2, argument3, argument4): pass 

But in Sublime, when you press enter after line 1, and then enter the rest of the arguments, this happens:

 def testmethod(argument1, argument2, argument3, argument4): pass 

Obviously, this is not very readable (and incompatible with PEP 8 style conventions). I figured out and found some unresolved threads, no solutions. Launch the latest version of Sublime Text 2 on Mac. Any help would be appreciated.

+6
source share
1 answer

This can be (partially) fixed by adding:

 "indent_to_bracket": true 

into your Packages/User/Preferences.sublime-settings file (linux). But unfortunately, it currently only works for () , not {}[] .

+3
source

Source: https://habr.com/ru/post/917389/


All Articles