Conflict between tab to increase indentation and tab to autocomplete

What’s the best way to handle pressing tab to increase indentation vs pressing tab to autocomplete? An example:

- containsDocument:
    keyWouldBe: 'placed here, 4 spaces in'
^ cursor is placed at start of line

I just wrote or autocompleted “containsDocument:” and hit Enter and am now at the start of the new line. Cody correctly suggests “keyWouldBe” as the key I would like to add, however, first I want to hit tab once or twice to get the indentation I need. Then I would like to autocomplete. If I just hit tab, it will add keyWouldBe at position 0 and I would have to go back and indent the line afterwards.

What’s the idea here?

Hey @chlab

I know this dilemma with indentation. I was looking for an extension that would automatically move my cursor to the correct position after a new line break. It really depends on the programming language, and in your example there is either one built into the IDE or downloadable from the Marketplace for YAML files.

If this does not help, you will have to press a key on your keyboard to jump to the beginning of the line after autocomplete. Sometimes, depending on the IDE, saving the file will automatically format it correctly.

This is the only solution I can think of at the moment.