当前:

重建

vim

最近修改: 2026-04-09 12:41

中文

  • sudo dpkg-reconfigure locales
  • vim /etc/default/locale内容:
    #  File generated by update-locale
    LANG="zh_CN.UTF-8"
    LC_ALL="zh_CN.UTF-8"
    LANGUAGE="zh_CN:zh"
  • vim /etc/vim/vimrc或vim ~/.vimrc
    • 末尾追加
      syntax on
      set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936,latin1
      set encoding=utf-8
      set termencoding=utf-8
      set fileencoding=utf-8