Indents the document text under cursor.

        :return: Method success.
        :rtype: bool

def indent(self):
        """
        Indents the document text under cursor.

        :return: Method success.
        :rtype: bool
        """

        cursor = self.textCursor()
        if not cursor.hasSelection():
            cursor.insertText(self.__indent_marker)
        else:
            block = self.document().findBlock(cursor.selectionStart())
            while True:
                block_cursor = self.textCursor()
                block_cursor.setPosition(block.position())
                block_cursor.insertText(self.__indent_marker)
                if block.contains(cursor.selectionEnd()):
                    break
                block = block.next()
        return True