I like Textmate's "Sort Lines in Selection" feature a lot. Is there something similar for Xcode 4? If not, what would be the best way to integrate such a feature (a plugin, Applescript, ...)?
You can do this with Automator:
sort -f
into the "Run Shell Script" textfieldNow you can sort lines in any textfield. Select some text and right-click or Control click and select the service you just created.
After 4 years Xcode still doesn't have this feature builtin, but now it supports extensions. So here you go: "xcsort" is an extension to sort text in Xcode 8. It adds a command to sort lines in selection.
For macOS 10.14+ (Mojave) users who are looking at epatel's answer, Automator has renamed Services
to Quick Action
. I was lost for a moment until I figured it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With