Source $ vimruntime/vimrc_example.vim
Source $ vimruntime/mswin. Vim
Behave mswin
Map <F2> :! Python % <CR>
Set diffexpr = mydiff ()
Set fileencodings = UTF-8, Chinese, Latin-1, cp936, gb2312
Set fenc = UTF-8
Set tabstop = 4
Set shiftwidth = 4
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. EQ
Endfunction
Back up Vim configurations