pascalre / vscode-yaml-sort

This VS Code extension exposes the possibility to sort, format and validate yaml files.
https://marketplace.visualstudio.com/items?itemName=PascalReitermann93.vscode-yaml-sort
MIT License
41 stars 2 forks source link

Add option to keep quotes #200

Open Joris29 opened 3 months ago

Joris29 commented 3 months ago

Could you add an option to just keep quotes as they are when sorting.

Example. parent_key: 'Pkey2 with space': k1: v1 k2: 'v2' 'Pkey1 with space': k1: 'v1' k2: v2

Would become: parent_key: Pkey1 with space: k1: v1 k2: v2 Pkey2 with space: k1: v1 k2: v2

What it should be if original quotes are ignored: parent_key: 'Pkey1 with space': k1: v1 k2: 'v2' 'Pkey2 with space': k1: 'v1' k2: v2

Joris29 commented 1 month ago

@pascalre ?

paulcalabro commented 6 days ago

Yeah, I agree this is my only annoyance. This breaks my Ansible playbooks since some values need to be quoted, for example when you have a leading "{{".