This image was lost some time after publication, but you can still view it here

by Gina Trapani

There are approximately 17 million software applications and web sites out there built to manage your to do list. But for those of you comfortable on the command line who don't want to depend on someone else's data format or someone else's server, there's an age-old method that's perfect for tracking your stuff: plain text.


Today we're going to go over one method for tracking your todo list, Getting Things Done style, using your favorite text editor and some old-school Unix command line know-how.

Why .txt?

Plain text is software and operating system agnostic. It's searchable, portable, lightweight and easily manipulated. It's unstructured. It works when someone else's web server is down or your Outlook .PST file gets corrupted. Since it's been around since the dawn of computing time, it's safe to say it's completely future-proof. There's no exporting and importing, no databases or tags or flags or stars or prioritizing or [Insert company name here]-induced rules on what you can and can't do with it. Plain text is your friend. Let's make it so.


Quick GTD primer: Three axes of an effective todo list

Context. Getting Things Done author and patron saint of lifehackers David Allen suggests splitting up your task lists by context - ie, the place and situation where you'll work on the job. Messages that you need to send go in the "@email" context; calls to be made "@phone", household projects "@home." That way, when you've got a few minutes in the car with your cell phone, you can easily check your "@phone" tasks and make a call or two while you have the opportunity.

Project. The only way a big project is going to get done is if you split it up into small, doable chunks. Those small tasks move a project forward, so associating your project-associated small tasks is key as well. In order to move along a project like "Cleaning out the garage," my task list should give me the next logical action to take in order to move that project along. "Clean out the garage" isn't a good todo item; but "Call Goodwill to schedule pickup" in the "Clean out garage" project is.

Priority. Your todo list should be able to tell you what's the next most important thing for you to get done - either by project or by context or overall. Tasks should optionally get assigned a priority that'll bubble them up to the top of the list.


This is all possible with a simple file called todo.txt.

Case study: todo.txt

Taking the context and project into consideration, one line in my todo.txt might read:

p:lh.com @mac @pc @paper @offline Draft todo.txt feature

Here the "p:lh.com" denotes the Lifehacker.com project. Contexts where I might complete this task include at my Mac, at my PC or at my tree-killer notebook. Finally, "Draft todo.txt feature" is a brief description of the task.


There are a few great ways to append text to a .txt file without ever opening a text editor: Quicksilver for Mac OS X provides one and I wrote a little Windows script that lets you do the same on a PC. For those of you comfortable with the command line, the line:

Using Quicksilver's Append Quicksilver is a great productivity application for OS X, and a power user can really do quite a… Read more


echo 'text to be added to file' >> todo.txt

Will work just fine. (Windows peeps, that and the ensuing Unix commands will not work in a plain old DOS window; you'll need the free Unix emulator Cygwin to use 'em. )


After adding several items to this todo.txt, it can become huge, unruly and difficult to work with. Now's when we start slicing and dicing. Using the grep Unix command, you can extract sub-lists from your todo list based on context or project.

Say my todo.txt looks like this:

p:lh.com @mac @pc @paper @offline Draft todo.txt feature

p:garage @phone Schedule Goodwill pickup 555-1212

@phone Thank Mom for the package

p:incometax @homeoffice Gather tax documents

p:lh.com @mac @pc @online Update FAQ

p:lh.com @pc @offline Test drive WhizFolders

p:garage @shopping Bike rack at Lowe's

p:incometax @email Inquire re: K1 form

p:garage @email Neighbors re: joint garage sale Sat, June 10


What the heck do I do with that? Well, let's say it's April 1st and I want to check what's up next to move my income tax return along. The command:

grep p:incometax todo.txt

Says "Show me only the lines that contain the phrase 'p:incometax.' The result is:

p:incometax @homeoffice Gather tax documents

p:incometax @email Inquire re: K1 form


Note that you can daisy-chain grep statements to narrow down contexts. Say I'm on a plane on my Mac without Internet access, I might slice out a sublist by the @mac and @offline context:

grep @mac todo.txt | grep @offline

This gives me:

p:lh.com @mac @pc @paper @offline Draft todo.txt feature

Sorting lists by priority

Once you get comfortable with this system, the problem of large sublists in no particular order arises. To add a layer of prioritization to your todo.txt, optionally add a letter enclosed in parentheses to the beginning of a task line.


For example, here I've added a (A) in front of high-priority next actions, (B) next to lesser important actions, and left others unprioritized.

(A) p:lh.com @mac @pc @paper @offline Draft todo.txt feature

(B) p:garage @phone Schedule Goodwill pickup 555-1212

@phone Thank Mom for the package

p:incometax @homeoffice Gather tax documents

p:lh.com @mac @pc @online Update FAQ

p:lh.com @pc @offline Test drive WhizFolders

p:garage @shopping Bike rack at Lowe's

p:incometax @email Inquire re: K1 form

(A) p:garage @email Neighbors re: joint garage sale Sat, June 10


To get my list of tasks in order of priority to move along the "Clean out the garage" project, the command:

grep p:garage todo.txt | sort

Gives me:

(A) p:garage @email Neighbors re: joint garage sale Sat, June 10

(B) p:garage @phone Schedule Goodwill pickup 555-1212

p:garage @shopping Bike rack at Lowe's


Get your todo.txt to go

A nice thing about this method is that it's easy to get your todo list in context. Grep out your @phone items and SMS them to your cell phone. Print out @paper and stick it inside your Moleskine. Sublist @pc and make it your screensaver.


Download of the Day: Words screensaver for goals and todo's Here's a neat way to keep your long-term goals at the forefront of your mind. Lifehacker reader… Read more

From the command line, you can SMS yourself your @phone list like this:

grep @phone todo.txt | sort | mail -s "to call" yourphonenumber@teleflip.com

(Cygwin users, replace "mail" with "email.") Schedule that little script to run for a daily - or weekly - SMS reminder to make the phonecalls on your todo list.


Other stuff to dump into .txt

Text files are great for any kind of list or braindump, not just to do's. Keep a running grocery.txt for when you go to the supermarket (also good for SMS'sing to your phone). How about a yayme.txt to track your achievements, or a mistake log, or a text file where that ranty email you didn't send gets added instead.


See also:

Are you a plain text ninja? Let us know what you get done in .txt in the comments or in an email to tips at lifehacker.com.


UPDATE: I've put together a series of scripts that manage todo.txt. See Script your life in .txt for more.


Gina Trapani, the editor of Lifehacker, loves her .txt files. Her semi-weekly feature, Geek to Live, appears every Wednesday and Friday on Lifehacker. Subscribe to the Geek to Live feed to get new installments in your newsreader.