Continuation indent does not work


I have my indent set to 2 and my continuation indent set to 4 and the continuation indent has no effect.

For example, if I am writing this line (cursor marked with "|" character:

variable =|

and I hit enter, I get:

variable = \


What I expect, obviously is for there to be 4 spaces before the cursor, not two. Why isn't the continuation indent being respected? This is a simple case, but it literally never works ever. Please help!

Comment actions Permalink

I have the same problem. I have indent set to 4 and continuation indent set to 8. Yet when I run "Reformat Code", continuation lines are only indented 4.

Comment actions Permalink

I am experiencing the same issue (Indent: 2, Continuation indent: 4). It works with function definition parameters, for example:

def long_function_name(
    var_one, var_two, var_three,  # <--- indented 4
    var_four):  # <--- indented 4
  print(var_one)  # <--- indented 2

... but it doesn't work with function calls, for example:

  var_one, var_two, var_three,  # <--- indented 2
  var_four)  # <--- indented 2

Comment actions Permalink

So, JetBrains, maybe you should fix this.

Comment actions Permalink

I just ran into this issue and found a solution.

Open up settings -> Editor -> Code Style -> Python. Under the "Other" tab there is a setting "Use continuation indent for arguments". I ticked that and it solved the problem.

I'm using the pro edition so I'm not sure if the community edition has this setting as well.

Comment actions Permalink

Yep, they released the fix in version 2017.1 (

I'm using the community edition and it's working for me too.

Comment actions Permalink

After much confusion and guessing at the issue, I discovered that disabling EditorConfig support in Settings -> Editor -> Code Style made it so my continuation indent settings took effect during code formatting.

Comment actions Permalink

Yes, EditorConfig is the issue... And you guessed it, still not fixed in 2019.


Please sign in to leave a comment.