摘要:Vim有四个与编码相关的选项:encoding,termencoding,fileencoding,fileencodings,具体参见Reference 1。为防止乱码,可在~/.vimrc脚本中添加如下几行set encoding=utf-8set termencoding=utf-8set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1Referencehttp://edyfox.codecarver.org/html/vim_fileencodings_detection.html。
阅读全文