I'm new to plugin developement and I'm trying to write a plugin which has similar behavior to the Auto-Indent Lines feature with the following differences:
1. If text exists on the current line, instead of moving the carret to the following line, it moves the caret to the indent location (i.e. at the start of the indented line)
2. If there is no text on the current line, it moves the carret to where the indented line would be if there was text, rather than not moving the carret at all.
I've looked at a couple of examples and I have a few questions:
1. Is there a way, in the Open API, to determine what the indent setting is?
2. Some lines will be a continuation of a statement on the previous line. Is there any way to determine if this is the case? Is there any way to determine if there is an alignment rule which must be applied? For example, if it's a method parameter to a method call on the previous line, how do I determine if the parameter should be aligned with open parenthesis of the method call?
3. What is the best practice for changing text in the editor?