I recently wrote that iTerm is better than Terminal.app.

Later that day, I received this reply on Twitter.

@tangledhelix iTerm2 > iTerm –George Nachman (@gnachman)

He was right.

iTerm2 is a fork of the original iTerm project. By and large, they are the same, but iTerm2 has a considerable number of improvements. Here are a few.

Smart cursor color

This may seem minor, but it’s nice to have. iTerm2 watches the colors being displayed, and will adjust the cursor color to ensure it is fairly visible on the screen.

Paste history

The last 20 items you copied from iTerm2, or pasted into it, are memorized. You can access that list with a hotkey combo.

Even if you use a clipboard history manager, like the one built into LaunchBar, this is useful because it is limited to the iTerm2 application. You can copy and paste all you want in other parts of the system, and the last 20 items that dealt with iTerm2 are always waiting for you when you get back.

Find and autocomplete

The Find feature in iTerm2 is really nice. Cmd-F brings up a search bar at the bottom of the window, similar to the one used in Safari. Enter your search string. Hit Tab to select to the end of the word (or Shift-Tab to go to the beginning of the word). You can find, select, and copy, all without needing to touch a mouse or trackpad.

But even better is autocomplete. Start typing, then hit Cmd-; to bring up an autocomplete list, built from the contents of the window as well as the aforementioned paste history. Type some more to refine the selection list. Use the Up and Down arrow keys to choose what you are after, then Enter to insert it at the cursor position.

Instant replay

Last, but absolutely not least, is the most innovative feature I’ve seen in a terminal emulator since… well, since ever. This is iTerm2’s “wow factor.”

Instant reply is TiVo for your terminal session.

No, I don’t mean you can scroll backward. Any terminal can do that. Instant replay is like having someone stand over your shoulder with a videocamera, recording your session. At any moment you can turn to them and ask for the tape to be rewound and played back.

If that doesn’t sound useful to you, you aren’t thinking hard enough.

How many times have you lost output because something like vim or less render in a way that doesn’t appear in your scrollback buffer? What about curses-driven interfaces, which vanish forever when they close? Even when they’re still running, the screens change and you can lose what you were looking at before. Instant reply captures all of it. You can scrub back and forth in time, just like when you play a video file.

It even remembers when you resized the window, and resizes it appropriately as you step back and forth in time.

Give iTerm2 a try. I’m loving it.