File contents remains in terminal after exiting Vim? I'm using the stock terminal with zsh and vim. After I exit vim, the file contents remains in the terminal. Ideally, only the previous history would be in the terminal when I exit vim (such as the behavior I've seen with linux/bash). 

How can I accomplish that?

Update

I'm running os x Yosemite 10.10.1

I tried glenn jackman's suggestion below, but still no dice. 

Additional information:

echo $TERM produces ansi

I also tried in bash with the same results. 

I also tried removing .vimrc completely with the same results.
Try adding:

if &amp;term =~ "xterm"
    let &amp;t_ti = "\&lt;Esc&gt;[?47h"
    let &amp;t_te = "\&lt;Esc&gt;[?47l"
endif


to your ~/.vimrc

Ref: https://forums.vandyke.com/showthread.php?t=3431