All Projects → pascalre → vscode-yaml-sort

pascalre / vscode-yaml-sort

Licence: MIT license
This VS Code extension exposes the possibility to sort, format and validate yaml files.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vscode-yaml-sort

Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (+172%)
Mutual labels:  yaml, yaml-format
ShiftSort
Sorting algorithm quicker than MergeSort, and is adaptive and stable.
Stars: ✭ 39 (+56%)
Mutual labels:  sort
dynamic.yaml
DEPRECATED: YAML-based data transformations
Stars: ✭ 14 (-44%)
Mutual labels:  yaml
gohit
Run curl commands from yaml files
Stars: ✭ 19 (-24%)
Mutual labels:  yaml
Angular-Table-Sort-Component
Sorting Algorithm for sorting table values in angular
Stars: ✭ 18 (-28%)
Mutual labels:  sort
yaml-editor
Edit YAML and see it processed by various processors
Stars: ✭ 29 (+16%)
Mutual labels:  yaml
ryaml
Python yaml library using Rust
Stars: ✭ 14 (-44%)
Mutual labels:  yaml
yaml.nvim
🍒 YAML toolkit for Neovim users
Stars: ✭ 81 (+224%)
Mutual labels:  yaml
wp-tag-order
↕︎ Sort tags manually in individual posts (not site-globally) on WordPress.
Stars: ✭ 16 (-36%)
Mutual labels:  sort
sortboard
A small ES6 library for easy sorting and filtering of elements.
Stars: ✭ 29 (+16%)
Mutual labels:  sort
bafi
Universal JSON, BSON, YAML, CSV, XML converter with templates
Stars: ✭ 65 (+160%)
Mutual labels:  yaml
VSC-React-Native-React-Redux-Snippets
Snippets for React and React-Native with a bit of Redux for es6/es7 user.
Stars: ✭ 56 (+124%)
Mutual labels:  visual-studio-code
spring-boot-jpa-rest-demo-filter-paging-sorting
Spring Boot Data JPA with Filter, Pagination and Sorting
Stars: ✭ 70 (+180%)
Mutual labels:  sort
gson
Algorithms on data formats - JSON, CBOR, Collation.
Stars: ✭ 17 (-32%)
Mutual labels:  sort
cryptorious
CLI Password Manager
Stars: ✭ 15 (-40%)
Mutual labels:  yaml
pipeline
Spline is a tool that is capable of running locally as well as part of well known pipelines like Jenkins (Jenkinsfile), Travis CI (.travis.yml) or similar ones.
Stars: ✭ 29 (+16%)
Mutual labels:  yaml
statics
Base class and modules for YAML backed static models.
Stars: ✭ 41 (+64%)
Mutual labels:  yaml
Guice-configuration
Guice configuration module allows inject values from files as JSON, HOCON and Properties format
Stars: ✭ 28 (+12%)
Mutual labels:  yaml
Python-Course
🐍 This is the most complete course in Python, completely practical and all the lessons are explained with examples, so that they can be easily understood. 🍫
Stars: ✭ 18 (-28%)
Mutual labels:  visual-studio-code
snipped
🖥️ 🖼️ Create fancy screenshots of your code without leaving the editor.
Stars: ✭ 98 (+292%)
Mutual labels:  visual-studio-code

YAML Sort

YAML Sort extends VS Code to sort, format and validate YAML files.

Coverage Status GitHub issues open

Preview

Preview

Commands

This extension contributes the following commands:

Command Description
Custom Sort 1 This command will sort a given YAML with custom order. If some of the keys of customSortKeywords_1 will be found at the top level of the YAML, these will be put at the beginning of the YAML file (in the given order). You can use this e. g. to sort Kubernetes configmaps.
Custom Sort 2 Same as Custom Sort 1
Custom Sort 3 Same as Custom Sort 1
Format Document Formats a yaml document without sorting it. Also possible using the shortcut (e. g. SHIFT + OPTION + F on Mac).
Recursively sort YAML files Sorts all .yaml and .yml files in a directory and all its subdirectories.
Sort YAML Sorts a given YAML. You can either sort the whole YAML document or sort only a selection of the text.
Validate YAML Validates a given YAML.

Configuration

This extension contributes the following settings:

Setting Description Default
emptyLinesUntilLevel When bigger than 0, will add a new line before each keyword on level n. 0
customSortKeywords_1 List of keywords for Custom Sort 1 ["apiVersion", "kind", "metadata", "spec", "data"]
customSortKeywords_2 List of keywords for Custom Sort 2 -
customSortKeywords_3 List of keywords for Custom Sort 3 -
forceQuotes When true, all non-key strings will be quoted even if they normally don't need to. false
indent Indentation width in spaces 2
lineWidth Maximum line width for YAML files 500
locale Language whose sort order should be used en
noArrayIndent When true, will not add an indentation level to array elements. false
noCompatMode When true, don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 false
notifySuccess When true, will notify on successfully performed tasks. true
quotingType Strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. '
schema Schema to use. Possible values are HOMEASSISTANT_SCHEMA, CLOUDFORMATION_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA. DEFAULT_SCHEMA
sortOnSave When true, will sort file when saving document. Only works in combination with editor.formatOnSave and vscode-yaml-sort.useAsFormatter both set to true. true
useAsFormatter When true, will enable default YAML formatter (requires restart). false
useCustomSortRecursively When true, will use the custom sort keywords recursively on a file, when using custom sort. false
useLeadingDashes When true, sorted YAML files begin with leading dashes. true

FAQ

How to sort on save?

Register this extension as VS Code formatter. Also configure VS Code to format files on save. Caution: This setting will apply for all files. Changes will require a restart of VS Code. If you wish to also sort (not only format) the file on saving, set sortOnSave to true.

.vscode/settings.json

{    
    "editor.formatOnSave": true,
    "vscode-yaml-sort.sortOnSave": true,
    "vscode-yaml-sort.useAsFormatter": true
}

Support

If you like YAML Sort, please feel free to rate it on the marketplace.

If you miss something or found a bug, please let me know and open an issue on this project on GitHub. Do not hesitate to open a pull request with your changes.

Check open issues on GitHub.

Known problems

Be careful with anchors and references, these don't work very well in this extension.

License

YAML Sort is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].