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.

4 thoughts on “Terminal.app vs. iTerm”

  1. I created the script as instructed above and placed a shortcut to the application in the dock.

    When I click on the shortcut iTerm always opens up to my Home folder, no matter where I may be in Finder… I am a little confused. How do you use this script?

  2. The script above has nothing to do with the initial working directory of the shell, it opens. It merely makes it possible to spawn a new terminal window on the currently active desktop space.

  3. 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:

    http://kpumuk.info/mac-os-x/customizing-iterm-creating-a-display-profile-with-pastel-colors/
    http://blog.infinitered.com/entries/show/8

    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…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>