在vim的.vimrc文件中添加下面代码 set encoding=utf-8 set fileencodings=ucs-bom,utf-8,cp936,gbk,big5,latin1 注:等号前后不能有空格,逗号前后不能有空格