partial screenshot of my notes.txt fileSo Walt Crawford did a post the other day about how he composes his blog posts, titled The joys of real-time wordsmithing.
I have been meaning to do something along those lines to talk about the tools I use, so here goes. Warning: serious geeking out ahead.

TextWrangler

I write just about everything in a file called notes.txt in TextWrangler, a free text editor from Bare Bones Software. I don’t like writing in the little text entry box from Movable Type, or a blog comment form or the like. Anything longer than name and address gets written up in TextWrangler first, spell checked, and cut & pasted.

I think Cory Doctorow was the first person I read extolling the virtues of doing everything in a text editor rather than Word or another specialized application. Then I read text.editor.addicts.txt by Giles Turnbull on O’Reilly’s mac devcenter site, and got hooked for good. I have tried other text editors for the Mac like Smultron and SubEthaEdit, and have settled on TextWrangler, mainly because TextWrangler made it easy to integrate Markdown (see below). For Windows, I have used Crimson Editor a bit, and it seems fine. Almost any text editor (short of Notepad or TextEdit) will do the trick.

And what trick is that?

  • Writing without dealing with Word trying to “help” me.
  • Writing without getting distracted by fiddling with fonts, sizes, margins, etc.
  • Keeping my words in the simplest possible format, making it easy to cut-and-paste to the web, to turn into HTML or CSS or email or whatever and not worry too much about file compatibility or obsolescence (after World War III, the cockroaches will be eating Twinkies and reading .txt files).
  • Saving with small file sizes (my notes.txt is close to 4,000 words and weighs in at 24KB; a two word MS Word doc is 20KB).
  • Displaying in an eye-saving green-on-black (which also makes me feel 1ee7 and kewl).
  • Syntax coloring so my HTML and CSS is easy to read, too.
  • TextWrangler uses the same spelling dictionary as the rest of the MacOS.

The BATF

I also tend to use just one file; every blog entry, comment, shopping list, meeting agenda and notes, etc. starts out in notes.txt. That file lives on my .Mac iDisk so I can get to it from work or home. It also gets backed up to the local hard drive every single time I save it on my PowerBook (another reason why small file sizes are good; looks like I saved the file 26 times today, as I have 26 backups from today on my drive).

I got the idea for notes.txt from the 43Folders post Life inside one big text file, which is really just a write up of (and a heck of a lot of comments on) Living in text files, a post by that same Giles Turnbull over at mac devcenter.

Why one BATF (Big-Ass Text File)?

  • When writing, I don’t have to think about “what do I call this file? Where should I save it?” Just add a divider with a few “-” characters and a few lines of blank space, and start typing (I usually put new stuff at the top of the file–a reverse-chronological blogger to the core).
  • When searching for something I have written, I don’t have to think “what did I call that file? Where did I save it?” It is all in notes.txt.

To avoid going insane, once something is more-or-less finished, it gets kicked out of the nest into its own file. If it’s just for my own reference, it stays in text. If it is something I have to make presentable, it gets dumped into Word and fitted for a suit and tie, complete with proportionally-spaced type and everything. Theoretically, I clean up the file at least once a week, deleting blog posts and comments that are now making their own way in the blogosphere.

Markdown

I write just about everything in Markdown, a syntax for writing plain text that can easily be converted to HTML. As its creator, John Gruber (of the blog Daring Fireball, writes,

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

So, for example, the Markdown for this section so far looks like this:

####Markdown

I write just about everything in [Markdown][], a syntax for writing plain text that can easily be converted to HTML. As its creator, John Gruber (of the blog [Daring Fireball][df], writes,

> Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

So, for example, the Markdown for this section so far looks like this:

[df]: http://daringfireball.net/
[Markdown]: http://daringfireball.net/projects/markdown/

The “####” means “<h4>,” a level-four heading in HTML; the brackets are a more human-readable way to do links than HTML’s “<a href=“; the “>” at the beginning of a line indicates a blockquote, and so on. When I’m ready, I select the text I want Markdown to convert, and select “Markdown” on the Perl script menu from the menu bar, and I (should) get valid HTML in place of my Markdown, ready to cut and paste into Movable Type (I set my MT composition preferences for “don’t convert line breaks,” because Markdown puts in all the paragraph tags for me). For more, see the Markdown Syntax Documentation.

Movable Type

Once it’s in MT, I can ideally just preview, check the links, and publish. In reality, I usually do at least a little editing and changing at this point. I also seem to inevitably publish with an error or two remaining. If I notice and fix it right away, I don’t worry about marking it as an update or edit. Um, like just now, when I forgot to put in the stupid tags for this entry (now below).

Tags: , ,