背景:
习惯用xshell 作为ssh客户端软件,也是vim的忠实用户,但是发现在ssh客户端下,vim的语法高亮即使启用,ssh终端显示还是黑白的,于是google 英文 关键字搜索了一番,终于找到原因,特此记录。
解决方法:
Depending on your Shell environment, you may have to use a different terminal type. Color syntax works on xterm or vt320 for me.
To change your terminal type, use the following commnad.
# export TERM=xterm
or
# export TERM=vt320
配置xshell (alt+P) 的终端类型和系统配置一致,如下图:
配置 .vimrc,添加一行:
syntax on
然后,再试试,世界又清静了。