Indentation of continuation lines seems wrong

Bug #691185 reported by Skip Montanaro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Opinion
Undecided
Andreas Roehler

Bug Description

I think python-mode should use the normal block indentation offset to indent continuation
lines. Currently, continuation lines are indented to the first character after the first space
(I think):

    def f(val):
        # current behavior - indent to just after the first space
        a_verry_loonng_variable_nammmee = \
                                        val

In this world of descriptive names, other indentation pushing things to the right, the LHS of
the assignment doesn't actually have to be very long for you to waste a lot of white space
to the left.

I would prefer if the normal indentation offset was used:

    def f(val):
        # desired behavior - indent by the normal amount
        a_verry_loonng_variable_nammmee = \
            val

Tags: indentation

Related branches

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi Skip,

would prefer to link an indent inside a compound statement to a specific indent indicating that - ie 4 commonly.

Other linebreaks should differ from that

In your example an alternative would be an indent of 1 or 2.

So far just my opinion.

Andreas

Changed in python-mode:
status: New → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.