How to get Mac OS X Terminal.app and screen/vim scrolling to play nice?

In Lion, the default terminal type is different, so you should use this line in your .screenrc instead:

termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@


In your home directory, put in the file .screenrc the following text:

# Make xterm scrolling work properly with screen.
termcapinfo xterm-color|xterm|xterms|xs|rxvt ti@:te@

Works for Terminal.app too.