bug1: vim文档中文注释为乱码

step1:
vim /var/lib/locales/supported.d/local
在其中添加下面的中文字符集
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.GB18030 GB18030
使其生效:
\(sudo dpkg-reconfigure locales step2: \)sudo vim .vimrc
在其中最后添加:
set fileencodings=gb2312,utf-8
set fileencoding=gb2312
set termencoding=utf-8

bug2: 保存文件时提示, Error E513

Error E513, write error, conversion failed (make 'fenc' empty to override)"
解决:
先查看一下当前的编码:
:set fenc?
如果不是utf-8的编码格式,用下面的命令改成utf-8的格式
:set fileencoding=utf-8

相关文章:

  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-08-13
  • 2021-11-10
  • 2021-08-20
猜你喜欢
  • 2021-12-01
  • 2021-10-05
  • 2022-01-12
  • 2022-01-12
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案