Page 1 of 1

yaml: How to tab out to higher level?

Posted: Thu Jun 26, 2025 2:41 pm
by cweiske
I'm trying to write a OpenAPI yaml file and have a hard time adding new lines that are on a higher level (less indented) than the previous one.

Example:

Code: Select all

components:
  schemas:
    Process:
      description: Information about a process type
      type: object
      properties:
        key:
          type: string|
I've indicated the cursor position with "|". When I press enter/return, I'm on the next line at the same indentation level.
Now I want to add a new property on the same level as "key", so I use shift+tab to go a level back. Unfortunately, this selects the whole line from the beginning to the cursor position (all spaces). Now when typing something, I'm overwriting all the indentation spaces and have no indentation at all.

Screenshot:
Image

What's the correct way to quickly tab out to some higher level?

Re: yaml: How to tab out to higher level?

Posted: Thu Jun 26, 2025 6:24 pm
by florin_nica
Hello,

Thank you for the feedback and for the example.

Unfortunately, there isn't a quicker solution for this at the moment — partly because YAML doesn't support tab characters for indentation. You'll either need to manually remove the extra spaces from the upper-level line or use Shift + Tab to decrease the indentation, then press the Right arrow to adjust the cursor position. I am not sure if we can offer a more convenient option for this.

Regards,
Florin

Re: yaml: How to tab out to higher level?

Posted: Fri Jun 27, 2025 9:01 am
by cweiske
I am not sure if we can offer a more convenient option for this.
Why are all the spaces up to the beginning of the line selected when using shift-tab? All would be fine if this wasn't the case.