Windows下,用管理员权限打开文件:
C:\Program Files (x86)\Vim\_vimrc
添加下面的代码:
set encoding=utf-8 set fileencodings=utf-8,chinese,latin-1 if has("win32") set fileencoding=chinese else set fileencoding=utf-8 endif "解决菜单乱码 source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim "解决consle输出乱码 language messages zh_CN.utf-8 set autoindent set shiftwidth=4 set tabstop=4 set softtabstop=4 set expandtab set hlsearch set nobackup set encoding=utf-8 set noundofile colo darkblue set guifont=consolas:h14