Vimjas / vim-python-pep8-indent

A nicer Python indentation style for vim.
Creative Commons Zero v1.0 Universal
790 stars 69 forks source link

Use double shiftwidth when indenting function arguments as per PEP8 #30

Closed wwentland closed 9 years ago

wwentland commented 10 years ago

PEP8 has the following recommendation:

# Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
                         var_three, var_four)

# More indentation included to distinguish this from the rest.
def long_function_name(
        var_one, var_two, var_three,
        var_four):
    print(var_one)

# Hanging indents should add a level.
foo = long_function_name(
    var_one, var_two,
    var_three, var_four)

This indent script gets the first and the last case right, but does not add more indentation (e.g. double sw) as recommended. It would be much appreciated if you could add support for that.

Coacher commented 9 years ago

Same applies to class definitions. Please fix.