Lars Schneider Lars Schneider - 1 year ago 147
AppleScript Question

"Sort Lines in Selection" for Xcode 4

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, ...)?

Answer Source

You can do this with Automator in Lion.

  • Start Automator and select "Service"
  • Find and drag "Run Shell Script" into the workflow panel
  • Select "Output replaces selected text"
  • Type sort -f into the "Run Shell Script" textfield
  • Save

Now you can sort lines in any textfield. Select some text and right-click or Control click and select the service you just created.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download