A little more GTD with TextMate

Back in July, I posted a writeup of a simple, GTD-influenced system for keeping track of projects and next actions in TextMate. It worked OK, but it didn’t handle contexts the way they should be handled. I had separate files for each context: work, home, computer, etc. Each project—and the all next actions associated with each project—were defined entirely within a single context. For example, projects for work were in the “work” file, even though some of the actions would have been better off in a “phone,” or “computer” context. (This article [and David Allen’s GTD book itself, of course] describes how project actions are supposed to be split among the various contexts.)

The problem I have with context-based action lists is that when I’m making up a list of things to do I think primarily in terms of projects, not contexts. So my lists are most easily written project by project, one item after another. Skipping from one context file to another as I think of next actions is a distraction that can make me lose my train of thought.

Of course, for actually accomplishing things, actions grouped by context makes the most sense. If I’m sitting in an airport waiting for my flight and I have time to make a few phone calls, it’s best to have one list with all the calls I ought to make. My project-based system didn’t do this, so it’s fair to say that it wasn’t a GTD system at all.

I abandoned my original system and tried out Tracks for a while. It’s pretty nice, allowing me to enter my next actions through a single user interface. Yes, I have to choose a context for each action, but the means of doing so is unobtrusive, and I don’t recall ever “losing” an action as I made up a list. But eventually I decided Tracks wasn’t right for me because:

  1. It’s a Rails application, with its information kept in a database and accessed through a browser. Because I have a desktop and a laptop and did not want to maintain two installations of Tracks, working from my laptop meant establishing an ssh tunnel to my desk machine whenever I wanted access to my lists. Setting up an ssh tunnel isn’t hard, but it can’t be done from an airplane, and airplane time is prime list-fiddling time.

  2. Tracks has an issue with Safari that make working with it in that browser a little clumsy. I have no interest in switching to Firefox or Camino.

  3. Tracks has no mechanism for printing lists on index cards, an important feature of my original Textmate-based system. I suppose I could have created a CSS style for print media, but figuring out someone else’s system of classes, ids, and divs is no fun.

My experience with Tracks made me think more clearly about the deficiencies of my old TextMate system and how I could change it to get a system that juggled actions between projects and contexts in a way that made sense for me. I wanted both project-based lists and context-based lists, tied together so I could:

  1. write my lists on a project-by-project bases, as I had before;
  2. generate context-based lists automatically from the project-based lists;
  3. delete completed actions from the context-based lists and have those deletions reflected automatically in the project-based lists; and
  4. print my lists on index cards.

Further, I wanted the lists to be text files in Markdown format, because I write almost everything in Markdown nowadays, and I wanted to use TextMate to edit the files.

What I came up with is a set of scripts, configuration files, commands, and snippets that I’ve put together into the LGTD (Little GTD) bundle. I’ll be explaining what it does and how it does it over the next few days, but here’s a quickstart for the adventurous and foolhardy.

Installation

Download and unzip the archive. You should now have a bundle entitled “LGTD.tmbundle.” Drag the bundle into your ~/Library/Application Support/TextMate/Bundles folder and start (or restart) TextMate.

Open the Bundle Editor window and make sure that LGTD is in the list of bundles along the left side of the window. Close the Bundle Editor window.

(You can click on the snapshot to see a larger version.)

Go to the Finder and create a new folder for your GTD files. I suggest creating it in your home directory and naming it “gtd,” but feel free to give it a different name if you already have a “gtd” folder. Whatever you call it, I’m going to be calling it “gtd” for the rest of the post.

Go back to TextMate and open TextMate’s preferences. Go to the Advanced section, and click on the Shell Variables selector. Add a new shell variable named “TM\_LGTD\_DIRECTORY” and make its value the path to the directory you just created—”/Users/yourname/gtd” if you’ve followed my suggestion.

Now create a new text file in TextMate and paste this into it:

# Dynamic picture frame #

Next actions:

* search web for Compaq conversion [computer]
* read PopSci article on ThinkPad conversion [home]

Waiting for:

- photo screensaver info from Bess

# Media #

Next actions:

* Check Mac version of TiVo server [home]

Waiting for:

Save the new file as “projects.gtd” (there are no provisions for another name—sue me) in your new gtd directory. After saving, the window should look something like this:

Unless you made the changes I talked about back in July, your syntax highlighting won’t be the same as mine, but you should see “LGTD” as the language down at the bottom of the window. Now you’re ready to make a context-based list.

Push Command-S. Yes, I know you’ve made no changes since the first save, but do it anyway. Now look in your gtd folder. You should see a new file called “contexts.gtd.” Open it and you’ll see this:

Command-S generated the context-based list (and saved the projects-based list, even though there were no changes to be saved). Now that you have both lists, you’re ready to work with them together as a TextMate project. (Sorry about the overlapping terminology. When you work with more than one file in a single window, TextMate refers to that as a “project.” It has nothing to do with GTD projects.)

Close both context.gtd and projects.gtd. Now open the gtd folder in TextMate. You can use TextMate’s Open… command from the File menu or just drag the gtd folder icon to the TextMate icon in the Dock. You’ll get a new, empty window called “gtd” with a drawer sticking out one side, like this:

Open both files listed in the drawer by double-clicking on them and make the contexts file active. Assume that Bess has given you the information on screensavers you’ve been waiting for. Delete that item from the contexts file and push Command-S to save the change. Activate the projects tab and you’ll see that that item has been removed from the “Dynamic picture frame” project.

This is the essence of the LGTD system. Two files: “projects.gtd” and “contexts.gtd.” They contain the same information, but ordered and presented in a different way for different purposes. Enter actions in the projects file, and when you save the additions with Command-S those new actions will be added to the contexts file. Work from the contexts file and when you’ve completed an action, delete it and save with Command-S. The deleted action will also be removed from the projects file.

In the next post I’ll show how to print your lists onto index cards, and after that I’ll discuss how the whole system works and some of its deficiencies.

Update The later posts on LGTD are here, here, here, and here.

Tags: