oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Text Tricks and More Text Tricks
Pages: 1, 2

Send Text To...

Want to read something on your Palm? Use PalmDocCoverter to change it to Palm-ready text.

Thanks to the widget, you can send SMS text messages to mobile phones straight from your desktop.

Devon TechnologiesBlue Service throws text snippets around your Bluetooth network, making it easy to send something to a phone or PDA with Bluetooth smarts.

Interlude: A Tip from Merlin Mann

Merlin Mann, of 43 Folders fame and well-known for his addiction to plain text, sent us this great tip about TextExpander.

"TextExpander stores strings of text (or images) and pastes them behind your cursor position based on abbreviations and conditional triggers that you choose.

So, for example, you could set it so that whenever you type "LOL", TextExpander will spit out "That remark you just made is, in my estimation, humorous." Or, maybe next time that you IM a cool new website to A-List blogger Anil Dash, and he says "Seen it," you can just type, "sorryanil" and TE will automatically produce "Sorry, Anil, I didn't know you'd seen this link already. I'll let you get back to work." Time saved all around! Signatures, links to Goatse, or even entire form letter responses--it's all possible, so let your imagination run wild.

To make best use of TextExpander, it helps to start watching for the items that you find yourself repeatedly typing (or mis-typing). TextExpander makes the rapid creation of new abbreviations really easy via the OS X "Services" menu. Just type the full (correct and expanded) text that you want to reuse, then highlight it, and select "[Application you're in] > Services > TextExpander > Create Snippet". This opens up the TextExpander PreferencePane with your desired text added as a new entry, so all you need to do is type the desired abbreviation or triggering text. Fast and easy."

BBEdit Tricks

O'Reilly contributor Kevin O'Malley wrote about BBEdit's Unix support back in 2004. That article is an oldie, but a goodie.

Like young upstart competitor TextMate, BBEdit's expandability is one of its most appealing features. Hence add-ons like Todd Ditchendorf's XSLPalette, a set of XSL debugging tools in one handy panel. Or Michael Tsai's Character-level diff, or Joe Brandt's XML tools.

Jan Erik Mostrom wrote a useful little Python script for previewing Markdown-formatted text directly in BBEdit. Entable is a great plug-in for BBEdit or it's little cousin TextWrangler; it does a superb job of turning rough columns of data into nicely presented ASCII tables.

Thanks to John Gruber and AppleScript, you can even implement a Select Word feature if you feel you need one.

Mess Around with DevonThink from the Command Line

DevonThink is a powerful and popular information manager and digital archive application for OS X. Some of these scripts from Eric Fedel might come in handy for advanced messing with your DevonThink databases. They're a mixture of shell and AppleScripts, and are released under a BSD license.

Edit Text Better in Browser Form Fields

OmniWeb external edit
Figure 2. OmniWeb external edit

One of the best things about OmniWeb is that it deals with forms a lot better than most browsers. Every text box has a little control that, when clicked, opens a mini editor within OmniWeb (see Figure 2). It's pretty limited as editors goes, but it's nicer to use than a box embedded in a web page. One day all browsers will have a preference setting to allow your choice of external editor. For the time being, External Editor does the job as an extension in Firefox.

Interlude: A Tip from Glenn Fleishman

Writer and author Glenn Fleishman offered this snippet of regexp wisdom:

"I'm a long-time grepper and have learned how to use regexp features in most of the software I regularly use. I prefer BBEdit for its robust grep and related search-and-replace features, and when I'm working with text, I immediately go to BBEdit.

I often encounter lists that I'm trying to stick into a database, and thus regexp becomes my friend. For instance, it's very frequent to find something like

[space][space][space]Richard W. Wellperson[tab]234 W. Street[tab]West Futhersold[tab]W.V.[return]

But all you need is the person's name in last, first order. I'll write my little regexp to do


replace with : $1

and then


replace with: $2, $1 "

Extra Text Toys

A quick dictionary

Figure 3. A quick dictionary

In Cocoa text apps like TextEdit, hitting Option+Escape when you're half way through a word will pull up a list of likely correct spellings for you to choose from. There's no faster way of accessing the built-in dictionary (see Figure 3).

Mike Ferris' TextExtras adds more features in any Cocoa text editing environments (including TextEdit windows or Safari text boxes). I have found it handy for spotting rogue non-ASCII characters in documents.

Michael McCracken's Incremental search plug-in adds very convenient searching to TextEdit and other apps based on NSTextView.

Drag a folder full of files on to Folderlister and it will helpfully spit out a plain text listing of the contents.

Write in blissful isolation with Hog Bay's Writeroom (see Figure 4).

Thumbnail, click for full-size image.
Figure 4. Writeroom writing (click for full-size image)

Using Text2MP3 you can turn your texts into lovely audio files perfect for playing on an iPod.

Split and join files into sizes that make sense for you, with Split+Join.

We've barely scratched the surface here. If you have a particular favorite text trick, plug-in, or hack, please share it with the rest of us via the comments.

Giles Turnbull is a freelance writer and editor. He has been writing on and about the Internet since 1997. He has a web site at

Return to the Mac DevCenter.