Filed under: Software, Tips and tricks, Friday Favorite
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.
Get a WordPress.com Blog
![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 2)
Justin said 12:57PM on 4-17-2009
-10 Geek Cred
Reply
Unknown said 1:21PM on 4-17-2009
What the heck are you talking about? Inbox.txt? Wtf?
Code in a .txt file?? Huh??
** looks at calendar **
It's april SEVENTEENTH, not first... hrm..
What's going on here?
Reply
Yazdgerd said 3:55PM on 4-17-2009
Dude:
* Inbox.txt: your GTD file (a list of "to do" items saved as a printable text file)
* Code in a text file: keeping your code snippets as a text file
Also by using GeekTool you can always see your transparent text on desktop. What's wrong with that?
Quine said 1:23PM on 4-17-2009
It also opens open office writer files (odt I think the extension is) - unlike, I might add, any version of notepad or wordpad before win7's (I mention that since a microsuck rep bragged about that at a talk at my school, and every other OS has been able to open odt files for years without even having open office)
Reply
HandyMac said 4:44PM on 4-19-2009
Yes, it's nice that TextEdit can open and save Open Document (.odt) files (though it has this ability only in 10.5); be nice if Pages could too:
http://www.petitiononline.com/appleodf/petition.html
See also:
http://en.wikipedia.org/wiki/Open_Document
Quine said 1:25PM on 4-17-2009
Also, sorry for the double post, but why would anyone EVER ditch quicksilver?
Reply
Yazdgerd said 3:45PM on 4-17-2009
Because:
Double-clicking "Hard Disk", clicking on "Applications" folder, scrolling down, finding your app in a long list, and again double-clicking to run your app,
Is easier under QS:
Cmd-Space, Type App name and enter.
Victor Agreda, Jr. said 3:49PM on 4-17-2009
QS wound up gobbling processes and completely destroying my MBP's performance. When an app becomes an inconvenience, it's no convenience at all.
As for app launching, I do that all via Spotlight now.
Quine said 3:56PM on 4-17-2009
@yazgerd
you completely misread what I said.
@Victor
Then you were doing it wrong. You had a bad vers of qs or had some other app interfering with it, which was less useful than qs.
QS is totally amazing and every user should use it (or a similar program) to its full potential; it will save loads of time every day.
Yazdgerd said 4:00PM on 4-17-2009
@Victor Agreda, Jr.:
I've had the same problem, killing and running it again solves the problem. For me personally the "Shelf", "Clipboard List" and "Tasks viewer" (Cmd-K) are necessary enough, not just the launching ability.
Harvey said 1:28PM on 4-17-2009
TextEdit is the only editor I've ever used where the formatting of the printed output depends on the size of the window. I'm sure someone thought this was a great idea at the time, but what a pain.
Reply
bart said 6:42PM on 4-17-2009
format>wrap to page
Joseph said 2:04PM on 4-17-2009
Textwrangler for the win! free too.
Reply
Thomas said 3:58PM on 4-17-2009
"Instead, when I ditched Quicksilver . . . ."
Wait, what?! Who ditches Quicksilver, and why?
Reply
Chris said 1:32PM on 4-29-2009
Second TextWrangler FTW!
unlike TextEdit, TextWrangler opens up HTML without trying to render it as a webpage - TW goes straight to code... you can have multiple pages open and jump between pages easily and well the TextWrangler icon/logo is cooler...
Reply
Unknown said 4:20PM on 4-17-2009
Eh, never got onto the "GTD" bandwagon, so the "inbox.txt" bit was lost on me. I have good internal prioritization apparently.
As for storing code snippets in a text file, I think you're probably a different kind of developer than me if this sounds like a useful solution.
Reply
Mike said 5:20PM on 4-17-2009
Textedit chokes and dies on 1.4GB log files, though.
Reply
Bones3D said 6:39PM on 4-17-2009
TextEdit... Seriously?!
You've probably never used BBedit back when they used to have a "lite" version. If you can still locate it on the web, BBedit Lite 6.1 for Mac OS X is well worth the search effort.
It's sleek, powerful and fast and opens literally anything. (as much as a raw text editor should, anyway...) It even runs under 10.5.
Also, the editor features a slew of other features, such as GREP searching of a file.
Best of all... none of that Rich Text Format crap!
Reply
Victor Agreda, Jr. said 9:13PM on 4-23-2009
In fact, I did use BBEdit, but thanks for assuming I'm a Luddite.
Yoram Blumenberg said 8:37PM on 4-17-2009
1.) IF you’re on Mac OS X 10.5 you don’t really need QS; just invoke Spotlight type tex… and (if you set in the System Prefs.>Spotlight to list Apps first) voila! TextEdit starts. Well ok, you can much more w/ QS -- but for me it’s to "overloaded".
2.) You don’t "need" the Service Menu: just drag’n’drop marked text from eg. Safari to any text aware application -- eg. TextEdit, Mail, BBEdit 9.x, etc. besides TextMate which is not working that way -- and here you go again: new document (Mail: new e-mail) opens w/ the dropped text, incl. styles and links in case of TextEdit, and if you choose as drag’n’drop application Safari: you’ll get a Google-Search w/ the choosen text. Also works if you drag’n’drop text to icon while doing cmd-tab to change/choose application.
Reply