At the moment, creating a new line anywhere in a python script where the last non-blank line is indented (and not a dedenter) will always indent that line to the previous indentation level. While this may have been indented (as was this pun), it is VERY annoying for editing files with many small class definitions. Not all code blocks have a natural dedenter; and as a matter of fact, if one follows pep8, most of the time, if there is more than one blank line between two lines, the second line will not be indented at all. See also: https://www.python.org/dev/peps/pep-0008/#blank-lines In this light, assuming that the user wants to continue at the same indentation level as a block many lines previous is likely a bug. Reproducible: Always Steps to Reproduce: 1. Open a new file, save as a python script 2. Enter the following: """ class Example(object): def example_method(self) self.mutate() # no return required """ 3. With the cursor on the last line, type <enter> Actual Results: two levels of indentation are inserted Expected Results: insert no indentation, that method is too far away I like Kate a lot and have been using it for years, it's my go-to editor when I have multiple files that i switch between a lot, but this is seriously annoying me, and I can't imagine that most people find this behaviour more useful than annoying. I crudely patched my own indenter and linked the diff, however, I can imagine that there are probably better solutions (my patch checks if the two previous lines are completely empty).