datasert / vscode-texty

Sweet set of Text utilities for VS Code
https://marketplace.visualstudio.com/items?itemName=datasert.vscode-texty
Apache License 2.0
7 stars 4 forks source link

Single Line Sorting with Delimiter #17

Open hl2guide opened 1 year ago

hl2guide commented 1 year ago

Please consider adding a command to sort one single line, or within a selection of one line, using a delimiter.

e.g.

1|2|3|4|6|5

becomes

1|2|3|4|5|6

Example written in PowerShell:

# Sorts a one-line list
$text = "1|2|3|4|6|5"
$delimiter = "|"
$text = $text.Split($delimiter) | Sort-Object
$text = $text -join $delimiter
# Set-Clipboard -Value $text
$text

It would be useful.