yaml: How to tab out to higher level?
Posted: Thu Jun 26, 2025 2:41 pm
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:
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:

What's the correct way to quickly tab out to some higher level?
Example:
Code: Select all
components:
schemas:
Process:
description: Information about a process type
type: object
properties:
key:
type: string|
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:

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