Tyriar / vscode-sort-lines

Visual Studio Code extension to sort lines of text
https://marketplace.visualstudio.com/items/Tyriar.sort-lines
MIT License
146 stars 42 forks source link

Feature Request: Sort all lines by default #110

Closed bennycode closed 2 years ago

bennycode commented 2 years ago

I just tried the Sort lines extension and noticed that I have to select all lines before I can sort them by pressing "F9". Is it possible to just sort all lines in a file when nothing is selected but "F9" is pressed?

Tyriar commented 2 years ago

While ctrl+a (and ctrl+u after) is an easy workaround, I think this makes sense since undo is so easy to do if a mistake is made 👍

M1CK431 commented 2 years ago

image src: https://github.com/Tyriar/vscode-sort-lines/blob/092d91e8dc76a39a840eb0436b272edae0e91654/README.md

Tyriar commented 2 years ago

Oh right, it's already a thing 😅

bennycode commented 2 years ago

That's cool! I completely missed this setting. 😅 Meanwhile I also created my own sorting extension (supporting JSON, YAML & plain text) because I was curious how to build VS code extensions using TypeScript: https://github.com/bennycode/sort-everything 😊