"Turn off compatibility modeSetnocompatible"imitate Select all, copy, pasteSOURCE $VIMRUNTIME/Vimrc_example.vimsource $VIMRUNTIME/Mswin.vimbehave Mswin"gvim font SettingsSetGuifont=monaco:h22"Gvim Internal CodeSetencoding=utf-8"the currently edited file encodingSetfileencoding=utf-8"Gvim Opening a file that supports encoding"setfileencodings=utf-8,gbk,gb2312,latin1"solve Consle output garbledLanguage Messages zh_cn.utf-8"Fix Menu garbledSOURCE $VIMRUNTIME/Delmenu.vimsource $VIMRUNTIME/Menu.vim"set the terminal encoding to gvim internal encoding encodingLet &termencoding=&encoding"color schemeColor Desert"prevent special symbols from appearing properlySetAmbiwidth=Double"do not generate backup filesSetNobackup"turn on line number markersSet NumberSetDiffexpr=Mydiff () function Mydiff () let opt='-A --binary' if&diffopt =~'icase'| Let opt = opt.'- I.'|endifif&diffopt =~'Iwhite'| Let opt = opt.'- b'|endif let Arg1=v:fname_inifArg1 =~' '| Let arg1 ='"'. Arg1.'"'|endif let Arg2=v:fname_newifArg2 =~' '| Let arg2 ='"'. Arg2.'"'|endif let Arg3=V:fname_outifArg3 =~' '| Let Arg3 ='"'. Arg3.'"'|endif let eq="' if$VIMRUNTIME =~' ' if&sh =~'\<cmd'Let cmd='""'. $VIMRUNTIME.'\diff "'Let eq='"' ElseLet cmd= Substitute ($VIMRUNTIME,' ','" ',"') .'\diff "'endifElseLet cmd= $VIMRUNTIME.'\diff'endif Silent Execute'!'. Cmd.' '. Opt. Arg1.' '. Arg2.'>'. Arg3. Eqendfunction
Gvim configuration file