(self)
Enter pressed.
        Insert properly indented block
Enter pressed.
        Insert properly indented block
Enter pressed . Insert properly indented block
def _insertNewBlock(self):
        """Enter pressed.
        Insert properly indented block
        """
        cursor = self.textCursor()
        atStartOfLine = cursor.positionInBlock() == 0
        with self:
            cursor.insertBlock()
            if not atStartOfLine:  # if whole line is moved down - just leave it as is
                self._indenter.autoIndentBlock(cursor.block())
        self.ensureCursorVisible()
def _insertNewBlock ( self ) : cursor = self . textCursor ( ) atStartOfLine = cursor . positionInBlock ( ) == 0 with self : cursor . insertBlock ( ) if not atStartOfLine : # if whole line is moved down - just leave it as is self . _indenter . autoIndentBlock ( cursor . block ( ) ) self . ensureCursorVisible ( )