1、末行模式下

:set encoding=utf-8

:set termencoding=utf-8

:set fileencoding=utf-8

:set fileencodings=ucs-bom,utf-8,chinese,cp936


2、vimrc

set encoding=utf-8

set termencoding=utf-8

set fileencoding=utf-8

set fileencodings=ucs-bom,utf-8,chinese,cp936