Compute auto-indent for newline insertion.
Current document lines
Cursor position
Tab size in spaces
Indent string to prepend to new line
Compute auto-indent for newline insertion.