While in insert mode, pressing ^F or at the end of the line 3 results in the following:
test:
- role: foo
- role: bar
Expected: no change in the indent.
Suggested fix (I'd be happy to send a pull request):
InGetAnsibleIndent, check to see if the current line matches array_entry. If so, return its current indent level (i.e. don't change the indentation). Alternatively, I could imagine always keeping the current indent level for any line with non-whitespace characters. The statement about gg=G in the README makes me think that indenting existing (e.g. non-empty) lines is not intended to be supported at this time.
Example:
While in insert mode, pressing ^F or at the end of the line 3 results in the following:
Expected: no change in the indent.
Suggested fix (I'd be happy to send a pull request): In
GetAnsibleIndent
, check to see if the current line matchesarray_entry
. If so, return its current indent level (i.e. don't change the indentation). Alternatively, I could imagine always keeping the current indent level for any line with non-whitespace characters. The statement about gg=G in the README makes me think that indenting existing (e.g. non-empty) lines is not intended to be supported at this time.