That's what the auto_indent property does, no need to do it yourself when the feature is already available.