YAML Indentation and Structure/Reveal hidden whitespace

Print tabs and line endings to spot indentation issues.

Section: Linting and safe edits

Reveal hidden whitespace

bash
bash
sed -n 'l' config.yaml
Explanation

Useful when a file looks correct but still fails because of hidden whitespace or tabs.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Linting and safe edits
Run yamllint with a custom config
Use a project-specific lint profile.
OpenIn sheetbashsame section
Find tabs in YAML files
Locate tab characters that may break parsing.
OpenIn sheetbashsame section
Format YAML with Prettier
Normalize indentation and layout automatically.
OpenIn sheetbashsame section
Two-space indentation
Use consistent spaces for nested levels.
OpenIn sheetyaml1 tag match
Mixed indentation example
Illustrate a broken file caused by inconsistent nesting.
OpenIn sheetyaml1 tag match
Sequence nested under a key
Indent list items under their parent key.
OpenIn sheetyaml1 tag match