Advertisement

Friday Favorite: TextEdit

What's free, flexible, easy-to-use but powerful and can handle a wide variety of file types? Our good friend, TextEdit, an app that ships with every Mac. TextEdit is, of course, a simple text editing tool like Notepad or WordPad on Windows. But there's a lot more to "simple text editing" that you might imagine, especially when TextEdit connects to services and other apps. I'm going to show you a few cool things you can do with TextEdit: create an inbox, use it as a development tool, or grab snippets of text on the go.

First, you should know that TextEdit defaults to the .rtf format. If you're not familiar with it, RTF is "rich text" and, unlike the .txt files generated by something like NotePad, RTF includes formatting, like bold or italics or bullet lists. "Plain text" .txt files are pretty much just the basic ASCII characters and paragraph breaks. So what? Well, if you want things to look pretty, you'll stick with .rtf, a format which is easy to share across platforms. Side note: did you know TextEdit will open Word documents? It isn't perfect, but it works if you don't have Word on your machine. The older .txt format is better for coding or when you don't need or can't have formatting.

To create an inbox, I suggest the simpler .txt format. What I used to do was set up Quicksilver to easily append to an inbox.txt file, and I used GeekTool to pin that .txt file to my desktop. You could also use LaunchBar to append, and I'm sure there's a way to whip up an AppleScript, but I never bothered. Instead, when I ditched Quicksilver, I started keeping the text file in the Dock, and I just open it up to add items. All this is portable, indexed by Spotlight, and fully cross-platform compatible.

Next up: munging HTML with TextEdit, and grabbing snippets of text from any app and dropping them into a file.


Now TextEdit isn't anywhere near as powerful as something like TextMate or even Smultron, but the simple fact that you can easily convert RTF to TXT is useful (same goes for "downgrading" Word documents). Similarly, according to a tip on Mac OS X Hints, you can convert formatted text to HTML. You set the text format in the Format menu, and if you convert a file to TXT, you're all set to write any type of code you like. So, you could edit hidden configuration files. But TextEdit actually allows you do a little HTML insertion as well. Under Format > Text there's a series of commands like "Link" and "Table" which will render just fine if you go to Save As... and choose HTML. More about creating web content with TextEdit here.

For our final trick, there's grabbing snippets. Let's say you go to a website and you want to grab some text and put it in a text document. OS X actually provides a nifty framework for these sorts of things, called "Services." To do this, select some text from Safari, then go to the Safari menu and choose Services, which could open up a large or small list of available services. Look for TextEdit and choose New Window Containing Selection. Voila! A new document with the selected text.

There are plenty of other things TextEdit can do. Check these links out:

TextEdit Used to Create a Text Graphic
Typography in TextEdit (excerpt from Pogue's excellent Mac OS X The Missing Manual)
Editing hidden configuration files with TextEdit
TextEdit creative tricks
Save time with TextEdit
Creating web content with TextEdit

Got more stuff you can do with TextEdit? Share it in the comments.