这里提供两种方法 方法一 在 ~/.vimrc里面加入 syntax on 方法二 在 /.bashrc或者/.bashprofile里面加入 TERM=xterm export TERM 然后运行 source ~/.bashrc 即可。