I was looking for a way to sort a selection of text lines (specifically in Xcode, which doesn’t have a builtin way to do this) today. Thinking this wasn’t possible at all and I’d have to use another editor (such as BBEdit which has a menu entry for this), I looked it up online.
And what do I find: https://stackoverflow.com/a/8104750
A way to do exactly this, in a completely generic way, with the Automator app. Allows you to run any program over selected text in any application, plus of course other Automator actions. Super cool, both for the user of course and also for app developers because they don’t need to take the effort replicating features like this in every single app that is text editor adjacent.
I definitely need to look into Automator more.
Rant:
As a relatively recent Mac user having used only Linux for a long time before this honestly blew me away. This level of integration is unthinkable under Linux until now, and people usually point to this kind of thing being “impossible” as a reason for using the terminal extensively as opposed to graphical programs. But no, turns out, it is completely possible if your graphical environment has a solid foundation and isn’t just a hodgepodge of mostly questionable UI toolkits (not you, Qt Widgets) with the only common interface being “you can open a window and get a framebuffer to draw on”.
MacOS has great power user features in general.
pbcopy
andpbpaste
in the terminal are super useful. You can also change the shortcuts of menu items for all applications in syatem settings. Sadly this doesn’t work for Electron and some cross platform applications. Many of those even forgot putting commands in a menu in the first place.