ArticleDirectory
- Replace the _ vimrc file in the installation directory with the following code:
Replace the _ vimrc file in the installation directory with the following Code You can:
Set nocompatiblesource $ vimruntime/vimrc_example.vimsource $ vimruntime/mswin. vimbehave mswinset diffexpr = mydiff () function mydiff () Let opt = '-A -- binary' If & diffopt = ~ 'Icase' | let opt = opt. '-I' | endif if & diffopt = ~ 'Iwhite' | let opt = opt. '-B' | endif let arg1 = V: fname_in if arg1 = ~ ''| Let arg1 = '"'. arg1. '"' | endif let arg2 = V: fname_new if arg2 = ~ ''| Let arg2 = '"'. arg2. '"' | endif let arg3 = V: fname_out if arg3 = ~ ''| Let arg3 = '"'. arg3. '"' | endif let eq ='' if $ vimruntime = ~ ''If & SH = ~ '\ <Cmd' let cmd = '""'. $ vimruntime. '\ diff "'Let eq ='" 'else let cmd = substitute ($ vimruntime ,'','"',''). '\ diff "' endif else let cmd = $ vimruntime. '\ diff 'endif silent execute '! '. Cmd. ''. OPT. arg1. ''. arg2. '> '. arg3. eqendfunction "solves Chinese garbled characters in Windows "" "set encoding = UTF-8" set termencoding = utf-8set fileencodings = UCS- bom, UTF-8, Chinese, latin-1if has ("Win32") set fileencoding = chineseelseset fileencoding = utf-8endif "solve Chinese menu garbled set langmenu = zh_CN.utf-8source $ vimruntime/delmenu. vimsource $ vimruntime/menu. vim "addresses console output garbled language messages zh_cn.utf-8