首页 > IT职业 > IT图书 > centos7 vim乱码解决方法

centos7 vim乱码解决方法:(推荐:vim教程)
使用sudo vim /etc/vimrc命令打开vimrc文件,在文件中加入如下几行:
set fileencodings=ucs-bom,utf-8,gbk,gb2312,cp936,gb18030,big5,latin-1 set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8
在 Vim 中,有四个与编码有关的选项,它们是:fileencodings、fileencoding、encoding 和 termencoding。在实际使用中,任何一个选项出现错误,都会导致出现乱码。因此,每一个 Vim 用户都应该明确这四个选项的含义。
更多python知识请关注python视频教程。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1051/viewspace-2834435/ ,如需转载,请注明出处,否则将追究法律责任。