This VS Code extension sorts JSON, YAML, and plain text files. It can sort the selected lines of code or the entire file (if no lines are selected).
Open the extensions' marketplace site and click "Install".
Alternative:
- Start Visual Studio Code
- Press Ctrl + Shift + X to browse for extensions
- Search for
bennycode.sort-everything
- Select the "Sort Everything" extension and click on "Install"
By default, sorting is applied when using the shortcut Alt + Shift + L.
You can change the keybinding in your Keyboard Shortcuts editor:
The Command ID is bennycode.sort-everything.sortFile
.
- Sort plain text file
- Sort plain text selection
- Sort JSON file
- Sort JSON selection
- Sort YAML file
- Sort YAML selection
There is a publish-extension GitHub Action which can be used to publish the extension on the Visual Studio Marketplace.