以centos为例,执行yum install -y vim
后,打开php、py等文件,发现中文乱码了。。。
google之
解决办法:
vim /etc/.vimrc
将以下内容写入
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
再次打开,中文已正常显示。
如若转载,请注明出处:https://www.ozabc.com/jianzhan/36871.html