For various reasons (mostly due to the fact that iTerm would regularly spike in CPU usage whenever I was causing it to redraw large portions of the screen, causing noticeable lag), I’ve been forced to switch away from iTerm as my terminal emulator of choice, back to the standard Terminal.app. It’s a decent piece of software, but it has a few issues of its own.
First, it’s 16-color only, and there’s no way to change the colors. While the former can’t be helped, the latter can: if you install SIMBL, then download TerminalColors (either the Leopard version or the Snow Leopard version, whichever is appropriate), then unzip and move the resulting directory into /Library/Application Support/SIMBL/Plugins, then restart, you’ll be able to modify colors under Settings -> Text by clicking the new ‘More’ button.
Second, the Home and End keys, to put it bluntly, suck. They don’t work in most programs. The fix for this is to go to Settings -> Keyboard, then creating/editing the entry for the home key. Select ‘send string to shell’, and in the text entry field, press escape, then capital O, then capital H, so it reads \033OH. Then do the same for the end key, only this time insert \033OF. It should work pretty much everywhere. Page up is \033[5~ and page down is \033[6~.
There are a couple other things: add
alias grep="grep --color=auto"
alias rgrep="grep -r --color=auto"
alias grip="grep -i --color=auto"
alias rgrip="grep -ir --color=auto"
alias ls="ls -G"
to colorize ls and grep by default, as well as add some convenient aliases (grip for case-insensitivity, rgrep for recursive grep).

Lex Johnson
/ July 12, 2010Correction: 33OH and 33OF are not the same as the home and end keys on your keyboard, and in certain applications (such as vim), this causes ridiculously grotesque behavior. For home, you really want 33[1~ while for end you want 33[4~ and for shift home and shift end you want 33[7~ and 33[8~ respectively.
Patrick Hurst
/ July 12, 2010They work fine for me in vi, whereas 33[1~ and 33[4~ don’t work at all for me. (I just get a ~).