Calendars, TextMate, and the iPhone

I’ve written a couple of posts about my calendar events bundle for TextMate. Its purpose is to allow users to create several events for their calendars in a very short time, avoiding the plodding nature of adding events to iCal. Tonight I used it in a new way.

Briefly, the bundle lets you write out events, one per line, in a format like this, with the fields separated by pipe characters:

Soccer|04/16/11 12:30 pm|1.00|Watson Park|navy jersey

The field are

  1. the event summary;
  2. the starting date and time;
  3. the duration in hours;
  4. the location; and
  5. notes.

There’s a snippet, bound to the “ev” tab trigger that makes entering an event easy. More important, when you have a bunch of events that are mostly the same—like the eight-game soccer schedule I just entered—you can create the first one from the snippet, copy and paste all the others, and then edit the differences. For the soccer schedule, all I had to change was the date and time and sometimes the jersey color.

Once you have all the events entered, there’s a command, Make ICS, that generates (you guessed it) an ICS file that can be imported into iCal.

So I made the ICS, but I didn’t import it into iCal because I’m at home on my MacBook Air, and I don’t keep my calendar on that computer (it’s long story, and even longer when I tell it 1). My calendar is in two places: my iMac at work and my iPhone, which sync when I connect them.

Where I really wanted the new events was in my iPhone’s calendar. So I sent myself an email with the ICS file attached, opened the email on the phone, and clicked on the attachment. I was taken to a screen that asked me if I wanted to import the events.

Import events on iPhone

When I tapped the Add All button, I was taken to another screen that asked me which calendar I wanted to add them to.

Choose calendar for events

Make the choice, tap Done and my calendar is now filled with a schedule that would have taken a long time to enter by hand. And it’ll sync with my canonical calendar at the office when I connect the phone to it Monday morning.


  1. OK, here’s the short version: In my experience, the only way to avoid syncing problems is to avoid syncing. That isn’t practical, but I do try to keep my syncing to a minimum. Because I need the calendar on my work computer and on my phone, I sync those two. But there’s no real need for a calendar on my laptop, so I don’t bother.