“排序选择中的行"对于 Xcode 4 [英] "Sort Lines in Selection" for Xcode 4

查看:22
本文介绍了“排序选择中的行"对于 Xcode 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常喜欢 Textmate 的排序选择中的行"功能.Xcode 4 有类似的东西吗?如果没有,集成此类功能(插件、Applescript 等)的最佳方式是什么?

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

推荐答案

您可以使用 Automator 做到这一点:

You can do this with Automator:

  • 启动 Automator 并选择:
    服务"对于 macOS 10.7 或
    新建文档"其次是快速行动"适用于 macOS 11
  • 找到并拖动Run Shell Script"进入工作流面板
  • 选择输出替换所选文本"
  • 在Run Shell Script"中输入 sort -f文本字段
  • 保存

现在您可以对任何文本字段中的行进行排序.选择一些文本并右键单击或 Control 单击并选择您刚刚创建的服务.

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

这篇关于“排序选择中的行"对于 Xcode 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆