Terminal.app vs. iTerm

Having used Apple’s own Terminal.app for all my terminal emulator needs since I switched to OS X on my primary workstation, I decided to take iTerm for a spin this weekend – it was a pleasant surprise.

Compared to Terminal.app, iTerm seems to suck up a few more system resources, but this is – imho – easily made up for with the added features. Especially tab support is much better in iTerm than in Terminal.app. Being able to set the title of tabs from the running shell (using the XTerm “icon name” escape sequence) along with the tab activity indicators rocks. Copy-on-selection and Cmd-click to launch URLs are also nice additions, that – once you get used to them – are very hard to work without.

There is, however, one missing feature of both Terminal.app and iTerm: The ability to click an icon in the Dock and have a new terminal emulator window open in the currently selected space. I’ve written a small AppleScript to do just that for iTerm:

tell application "System Events"
set iTermCount to (count (every process whose name is "iTerm"))
end tell
if (iTermCount is not 0) then
tell application "iTerm"
set newterm to (make new terminal)
tell newterm
launch session "Default"
activate
end tell
end tell
else
tell application "iTerm"
activate
end tell
end if

Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.

As a long-time user of Terminal, I wanted to continue using it, but my recent desire to use colorschemes in vim while accessing my Ubuntu box finally made me switch from Terminal to iTerm. Unlike the current version of Terminal, iTerm supports 256-vterm which will allow you to render nice colorschemes in vim. For example, particularly useful are:

One annoying thing about iTerm, though, is the keyboard shortcuts for next/previous Tab (command-right arrow?!?!) and next/previous Terminal. However, both of these can be customized through OSX’s Keyboard under System Preferences… I set my previous/previous Tab to the more standard Shift-Command-[ and Shift-Command-]. With these commands out of the way and a nice colorscheme loaded, I find that I don’t miss Terminal so much…