1、登录root用户 2、到etc目录下,打开vimrc 文件 3.在vimrc文件最末尾添加下面这行代码,然后保存退出 set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936