Enable configurable indentation
See original GitHub issuee.g.
foo.json
{
"test": {
"s1": "bar",
"s2": [
"snowflake",
"s3",
"gcloud"
]
}
}
yq -y . foo.json
test:
s1: bar
s2:
- snowflake
- s3
- gcloud
When valid yaml should be:
test:
s1: bar
s2:
- snowflake
- s3
- gcloud
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Indentation | IntelliJ IDEA Documentation - JetBrains
Open indentation settings in code style scheme. Click the widget and select Configure Indents for 'Language'. Configure Indents for Java.
Read more >Use a screen reader to change the indentation and spacing ...
To set the indentation size, press the Tab key. You hear "By" and the current indentation size. Then type the value in inches,...
Read more >How to Change Tabs to Space, Auto Indent, Code Folding Lines
TIMESTAMP 0:00 Notepad++ Indentation Settings 1:23 How To Configure Indentation Settings? (Convert Tabs to Spaces) 6:19 How To Auto- Indent ...
Read more >How to change indentation mode in Atom? - Stack Overflow
I use the auto-detect-indentation plugin, which not only will automatically configure the tab key to do whatever is already in the file, but...
Read more >ocp-indent - Automatic indentation of OCaml source files
-c CONFIG, --config=CONFIG Configure the indentation parameters. See section CONFIGURATION for more information. -d, --debug Enable debug output to stderr.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have found a way to address this issue. By default,
yq -y
will now indent block lists by 2 spaces (- item
instead of- item
). The old behavior (0 spaces, the PyYAML default) can be triggered viayq -y --indentless-lists
.Released in v2.8.0, please test.
@kislyuk it’s working for me