vim中文乱码

    用vim打开中文的时候可能会出现乱码,解决方法:修改vimrc。

    vi /usr/share/vim/vimrc,在vimrc最后添加:

        set fileencodings=utf-8,gb2312,gbk,gb18030i

        set termencoding=utf-8

        set encoding=utf-8

    另, 转一篇vim编码的文章:http://edyfox.codecarver.org/html/vim_fileencodings_detection.html