在~/.vimrc文件中添加如下两行即: set encoding=GB2312 set fileencoding=GB2312 转载于:https://www.cnblogs.com/aquester/archive/2012/07/24/9891995.html