Today I helped my brother with a Keyboard Maestro macro he needed. Basically, he wanted to take some text from a PDF created by Notability, which inserts new lines to have text flow around images, and remove these new lines.
Pretty easy, I thought:
tr and remove
\n. Nope. For some reason, maybe some old Mac OS 9 heritage, when copying text from Preview new lines are saved as carriage returns, i.e.
This stupid behavior means that if you try to pbpaste something which contains line breaks in your terminal, you only get the last line. You can view the full output by replacing
This lame thing had me waste some time, so I hope this short post makes your life easier.
P.S.: The full command I had my brother put in Keyboard Maestro is:
pbpaste | tr '\r' ' ' | pbcopy
Followed by a Paste action. This replaces line breaks with spaces and pastes the result.
Since the introduction of iCloud in many OS X apps in Mountain Lion, we’ve had to live with the pointless “Open from iCloud” window every time we launched these apps. I’m speaking mainly of TextEdit and Preview, but recently even more apps got this useful feature, such as Automator and AppleScript Editor.
This. We all hate this.
But last month Apple released Mavericks, which came to save us from this hell. It offers a great solution: the ability to enable/disable iCloud on a per-app basis, thus allowing us to only have it on apps that benefit from it (Pages and Byword, for example).
Without further ado, let’s go and kill iCloud for TextEdit & co.
It’s pretty easy: just go to System Preferences/iCloud and click the “Options…” button next to “Documents & Data.
A nice popover will appear and it will let you chose the apps in which iCloud documents will be available. Deselect any apps you wish, and then click “Done”.
Freedom. Enjoy the sense of freedom that comes from your apps being iCloud-free again, like in the good ol’ days.
Now, the next time you open TextEdit, you will be greeted with a glorious empty document, ready to be filled with your awesome words.