coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.22k stars 424 forks source link

Add ability to sort selection #1575

Closed rinchen closed 5 months ago

rinchen commented 5 months ago

Is your feature request related to a problem? Please describe. As a user, When editing a file I want the ability to sort a selected number of rows, So that I can put the contents in alphabetical/numerical order to compare with my other source file.

Describe the solution you'd like Select a few rows, go up into the menu, select "Sort Selection", and the rows will be sorted on the first character.

Describe alternatives you've considered I could grab the info and paste it into VIM or another tool but it's painful.

Thanks!

1024jp commented 5 months ago

CotEditor already has a feature to sort lines. Go Text > Line, and select an appropriate command to sort lines. When some lines are selected, CotEditor sorts selected lines, otherwise it sorts the entire document. You can even sort with complex options by performing "Sort by Pattern."

Screenshot 2024-01-17 at 8 39 34
rinchen commented 5 months ago

Thanks. I looked everywhere for that but apparently not there.