OSX + iTerm + screen + vim + 256 colors
screen (Git!!!!)
% git clone git://git.savannah.gnu.org/screen.git % cd screen/src % ./autogen.sh % ./configure --prefix=/usr/local \ --enable-telnet \ --enable-pam \ --enable-colors256 \ --enable-rxvt_osc \ --enable-use-locale % sudo make && sudo make install
.screenrc
#terminfo and termcap for nice 256 color terminal # allow bold colors - necessary for some reason attrcolor b ".I" # tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm* "Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm" # erase background with current bg color defbce "on"
.vimrc
if 200 < &t_Co || &term ==# 'screen-bce' set t_Co=256 colorscheme wombat256 endif
参考
http://pjkh.com/articles/2008/07/09/osx-iterm-screen-vim-256-colors/