How can I stop Windows Terminal from re-sorting my manually sorted commands section of settings.json #17942
-
I'm trying out the snippets feature by creating some commands that devs on our team would find useful. But every time I save setting.json from VSCode, the commands array gets resorted. 🤦♂️ At first, I thought the command I just added had been deleted (I have a fair number of commands BEFORE adding these snippet commands). I eventually discovered the command wasn't deleted but moved up where I couldn't see it without scrolling. Anyway, is there a way that I can determine the sort order because I'd like all of these Also, can snippet commands be |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Try Performing the Sorting Order @rkeithhill-keysight : Thus to maintain a custom order, you can use the sortOrder property in the commands object. However, this property is not officially documented and might be subject to change. For Example:
Hence, We Can Categorizing Snippets:
] |
Beta Was this translation helpful? Give feedback.
-
I figured it out by running this script: https://gist.github.com/zadjii-msft/2250c49c29e1fe1dc6ec510aaf06c31b#file-dump-workflows-py You nest commands for the categorization bit: {
"name": "winget ...",
"commands": [
{
"command":
{
"action": "sendInput",
"input": "winget install --id Microsoft.DotNet.Sdk.8 --source winget --rainbow"
},
"id": "winget.install-dotnetsdk.0",
"name": "winget install --id Microsoft.DotNet.Sdk.8"
},
{
"command":
{
"action": "sendInput",
"input": "winget search --id Microsoft.DotNet.Sdk --versions"
},
"id": "winget.search-dotnetsdk-versions",
"name": "winget search --id Microsoft.DotNet.Sdk --versions"
}
]
} |
Beta Was this translation helpful? Give feedback.
I figured it out by running this script: https://gist.github.com/zadjii-msft/2250c49c29e1fe1dc6ec510aaf06c31b#file-dump-workflows-py
You nest commands for the categorization bit: