1. Using a black background in my xterms.
First of all, the lack of mouse passthrough for vim in Terminal.app means it's a non-starter for me. Here's what my ~/.Xresources file looks like:
XTerm*background: black XTerm*foreground: white XTerm*scrollBar: false XTerm*utf8: 1 xterm*saveLines: 10000 xterm*jumpScroll: true XTerm*scrollBar: false xterm*visualBell: true xterm*loginShell: trueSome of those options are on by default but I included them for posterity.
2. Environment fixes for black terminals and XTerm titles
The defaults really stink for a dark background terminal and the default static title of 'xterm' is not terribly useful. Here are the interesting parts of my .profile and .bashrc.
.profile:
. ~/.bashrc
.bashrc:
#Mac OS colors
alias ls="ls -G"
export LSCOLORS='DxGxfxfxcxDxDxhbhDecec'
# Xterm Titles in mac os
# are we an interactive shell?
if [ "$PS1" ]; then
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
fi
I also highly recommend MacVim (http://code.google.com/p/macvim/). I've got the latest snapshot installed and it works incredibly well. Use 'mvim' to open files from xterm.
I've got a few other personalizations that are just personal preference that I'll have to toss on here later.