vim打开文件乱码的解决方法

vim ~/.vimrc

写入如下内容后保存,

set termencoding=utf-8
set encoding=utf8
set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030