打开vim的配置文件/etc/vim/vimrc
在其中加入
set fileencodings=utf-8,gb2312,gbk,gb18030 set termencoding=utf-8 set encoding=prc
保存退出。